//! moment.js //! version : 2.16.0 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return od.apply(null,arguments)} // This is done to register the method called with moment() // without creating circular dependencies. function b(a){od=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){ // IE8 will treat undefined and null as object if it wasn't for // input != null return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function e(a){var b;for(b in a) // even if its not own property I'd still call it non-empty return!1;return!0}function f(a){return"number"==typeof value||"[object Number]"===Object.prototype.toString.call(a)}function g(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function h(a,b){var c,d=[];for(c=0;c0)for(c in rd)d=rd[c],e=b[d],p(e)||(a[d]=e);return a} // Moment prototype object function r(b){q(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN), // Prevent infinite loop in case updateOffset creates new moment // objects. sd===!1&&(sd=!0,a.updateOffset(this),sd=!1)}function s(a){return a instanceof r||null!=a&&null!=a._isAMomentObject}function t(a){return a0?"future":"past"];return z(c)?c(b):c.replace(/%s/i,b)}function J(a,b){var c=a.toLowerCase();Dd[c]=Dd[c+"s"]=Dd[b]=a}function K(a){return"string"==typeof a?Dd[a]||Dd[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)i(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(a,b){Ed[a]=b}function N(a){var b=[];for(var c in a)b.push({unit:c,priority:Ed[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function O(b,c){return function(d){return null!=d?(Q(this,b,d),a.updateOffset(this,c),this):P(this,b)}}function P(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function Q(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)} // MOMENTS function R(a){return a=K(a),z(this[a])?this[a]():this}function S(a,b){if("object"==typeof a){a=L(a);for(var c=N(a),d=0;d=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d} // token: 'M' // padded: ['MM', 2] // ordinal: 'Mo' // callback: function () { this.month() + 1 } function U(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Id[a]=e),b&&(Id[b[0]]=function(){return T(e.apply(this,arguments),b[1],b[2])}),c&&(Id[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function V(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function W(a){var b,c,d=a.match(Fd);for(b=0,c=d.length;b=0&&Gd.test(a);)a=a.replace(Gd,c),Gd.lastIndex=0,d-=1;return a}function Z(a,b,c){$d[a]=z(b)?b:function(a,d){return a&&c?c:b}}function $(a,b){return i($d,a)?$d[a](b._strict,b._locale):new RegExp(_(a))} // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function _(a){return aa(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function aa(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ba(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),f(b)&&(d=function(a,c){c[b]=u(a)}),c=0;c=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function ta(a){var b=new Date(Date.UTC.apply(null,arguments)); //the Date.UTC function remaps years 0-99 to 1900-1999 return a=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b} // start-of-first-week - start-of-year function ua(a,b,c){var// first-week day -- which january is always in the first week (4 for iso, 1 for other) d=7+b-c, // first-week day local weekday -- which local weekday is fwd e=(7+ta(a,0,d).getUTCDay()-b)%7;return-e+d-1} //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday function va(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ua(a,d,e),j=1+7*(b-1)+h+i;return jpa(a)?(f=a+1,g=j-pa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function wa(a,b,c){var d,e,f=ua(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return gxa(a.year(),b,c)?(d=g-xa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function xa(a,b,c){var d=ua(a,b,c),e=ua(a+1,b,c);return(pa(a)-d+e)/7} // HELPERS // LOCALES function ya(a){return wa(a,this._week.dow,this._week.doy).week}function za(){return this._week.dow}function Aa(){return this._week.doy} // MOMENTS function Ba(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ca(a){var b=wa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")} // HELPERS function Da(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Ea(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Fa(a,b){return a?c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:this._weekdays}function Ga(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort}function Ha(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin}function Ia(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d11?c?"pm":"PM":c?"am":"AM"}function Xa(a){return a?a.toLowerCase().replace("_","-"):a} // pick the locale from the array // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root function Ya(a){for(var b,c,d,e,f=0;f0;){if(d=Za(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1) //the next array item is better than a shallower substring of this one break;b--}f++}return null}function Za(a){var b=null; // TODO: Find a better way to register and load all the locales in Node if(!Be[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=xe._abbr,require("./locale/"+a), // because defineLocale currently also sets the global locale, we // want to undo that for lazy loaded locales $a(b)}catch(a){}return Be[a]} // This function will load locale and then set the global locale. If // no arguments are passed in, it will simply return the current global // locale key. function $a(a,b){var c; // moment.duration._locale = moment._locale = data; return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}function _a(a,b){if(null!==b){var c=Ae;if(b.abbr=a,null!=Be[a])y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=Be[a]._config;else if(null!=b.parentLocale){if(null==Be[b.parentLocale])return Ce[b.parentLocale]||(Ce[b.parentLocale]=[]),Ce[b.parentLocale].push({name:a,config:b}),null;c=Be[b.parentLocale]._config} // backwards compat for now: also set the locale // make sure we set the locale AFTER all child locales have been // created, so we won't end up with the child locale set. return Be[a]=new C(B(c,b)),Ce[a]&&Ce[a].forEach(function(a){_a(a.name,a.config)}),$a(a),Be[a]} // useful for testing return delete Be[a],null}function ab(a,b){if(null!=b){var c,d=Ae; // MERGE null!=Be[a]&&(d=Be[a]._config),b=B(d,b),c=new C(b),c.parentLocale=Be[a],Be[a]=c, // backwards compat for now: also set the locale $a(a)}else // pass null for config to unupdate, useful for tests null!=Be[a]&&(null!=Be[a].parentLocale?Be[a]=Be[a].parentLocale:null!=Be[a]&&delete Be[a]);return Be[a]} // returns locale data function bb(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return xe;if(!c(a)){if( //short-circuit everything else b=Za(a))return b;a=[a]}return Ya(a)}function cb(){return wd(Be)}function db(a){var b,c=a._a;return c&&m(a).overflow===-2&&(b=c[be]11?be:c[ce]ea(c[ae],c[be])?ce:c[de]24||24===c[de]&&(0!==c[ee]||0!==c[fe]||0!==c[ge])?de:c[ee]59?ee:c[fe]59?fe:c[ge]999?ge:-1,m(a)._overflowDayOfYear&&(bce)&&(b=ce),m(a)._overflowWeeks&&b===-1&&(b=he),m(a)._overflowWeekday&&b===-1&&(b=ie),m(a).overflow=b),a} // date from iso format function eb(a){var b,c,d,e,f,g,h=a._i,i=De.exec(h)||Ee.exec(h);if(i){for(m(a).iso=!0,b=0,c=Ge.length;bpa(e)&&(m(a)._overflowDayOfYear=!0),c=ta(e,0,a._dayOfYear),a._a[be]=c.getUTCMonth(),a._a[ce]=c.getUTCDate()),b=0;b7)&&(i=!0);else{f=a._locale._week.dow,g=a._locale._week.doy;var j=wa(sb(),f,g);c=gb(b.gg,a._a[ae],j.year), // Default to current week. d=gb(b.w,j.week),null!=b.d?( // weekday -- low day numbers are considered next week e=b.d,(e6)&&(i=!0)):null!=b.e?( // local weekday -- counting starts from begining of week e=b.e+f,(b.e6)&&(i=!0)): // default to begining of week e=f}dxa(c,f,g)?m(a)._overflowWeeks=!0:null!=i?m(a)._overflowWeekday=!0:(h=va(c,d,e,f,g),a._a[ae]=h.year,a._dayOfYear=h.dayOfYear)} // date from string and format string function kb(b){ // TODO: Move this to another part of the creation flow to prevent circular deps if(b._f===a.ISO_8601)return void eb(b);b._a=[],m(b).empty=!0; // This array is used to make a Date, either with `new Date` or `Date.UTC` var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Y(b._f,b._locale).match(Fd)||[],c=0;c0&&m(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length), // don't parse if it's not a known token Id[f]?(d?m(b).empty=!1:m(b).unusedTokens.push(f),da(f,d,b)):b._strict&&!d&&m(b).unusedTokens.push(f); // add remaining unparsed input length to the string m(b).charsLeftOver=i-j,h.length>0&&m(b).unusedInput.push(h), // clear _12h flag if hour is 0&&(m(b).bigHour=void 0),m(b).parsedDateParts=b._a.slice(0),m(b).meridiem=b._meridiem, // handle meridiem b._a[de]=lb(b._locale,b._a[de],b._meridiem),ib(b),db(b)}function lb(a,b,c){var d; // Fallback return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&b // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) // from the actual represented time. That is why we call updateOffset // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. function Db(b,c){var d,e=this._offset||0;if(!this.isValid())return null!=b?this:NaN;if(null!=b){if("string"==typeof b){if(b=Ab(Xd,b),null===b)return this}else Math.abs(b)this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Kb(){if(!p(this._isDSTShifted))return this._isDSTShifted;var a={};if(q(a,this),a=pb(a),a._a){var b=a._isUTC?k(a._a):sb(a._a);this._isDSTShifted=this.isValid()&&v(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Lb(){return!!this.isValid()&&!this._isUTC}function Mb(){return!!this.isValid()&&this._isUTC}function Nb(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ob(a,b){var c,d,e,g=a, // matching against regexp is expensive, do it on demand h=null;// checks for null or undefined return xb(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:f(a)?(g={},b?g[b]=a:g.milliseconds=a):(h=Ne.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:u(h[ce])*c,h:u(h[de])*c,m:u(h[ee])*c,s:u(h[fe])*c,ms:u(yb(1e3*h[ge]))*c}):(h=Oe.exec(a))?(c="-"===h[1]?-1:1,g={y:Pb(h[2],c),M:Pb(h[3],c),w:Pb(h[4],c),d:Pb(h[5],c),h:Pb(h[6],c),m:Pb(h[7],c),s:Pb(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=Rb(sb(g.from),sb(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new wb(g),xb(a)&&i(a,"_locale")&&(d._locale=a._locale),d}function Pb(a,b){ // We'd normally use ~~inp for this, but unfortunately it also // converts floats to ints. // inp may be undefined, so careful calling replace on it. var c=a&&parseFloat(a.replace(",",".")); // apply sign while we're at it return(isNaN(c)?0:c)*b}function Qb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Rb(a,b){var c;return a.isValid()&&b.isValid()?(b=Bb(b,a),a.isBefore(b)?c=Qb(a,b):(c=Qb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}} // TODO: remove 'name' arg after deprecation is removed function Sb(a,b){return function(c,d){var e,f; //invert the arguments, but complain about it return null===d||isNaN(+d)||(y(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}function Tb(b,c,d,e){var f=c._milliseconds,g=yb(c._days),h=yb(c._months);b.isValid()&&(e=null==e||e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&Q(b,"Date",P(b,"Date")+g*d),h&&ja(b,P(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function Ub(a,b){var c=a.diff(b,"days",!0);return cc.valueOf():c.valueOf()f&&(b=f),Fc.call(this,a,b,c,d,e))}function Fc(a,b,c,d,e){var f=va(a,b,c,d,e),g=ta(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this} // MOMENTS function Gc(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)} // HELPERS // MOMENTS function Hc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Ic(a,b){b[ge]=u(1e3*("0."+a))} // MOMENTS function Jc(){return this._isUTC?"UTC":""}function Kc(){return this._isUTC?"Coordinated Universal Time":""}function Lc(a){return sb(1e3*a)}function Mc(){return sb.apply(null,arguments).parseZone()}function Nc(a){return a}function Oc(a,b,c,d){var e=bb(),f=k().set(d,b);return e[c](f,a)}function Pc(a,b,c){if(f(a)&&(b=a,a=void 0),a=a||"",null!=b)return Oc(a,b,c,"month");var d,e=[];for(d=0;d 1 year return f>=0&&g>=0&&h>=0||f0,k[4]=c,id.apply(null,k)} // This function allows you to set the rounding function for relative time strings function kd(a){return void 0===a?of:"function"==typeof a&&(of=a,!0)} // This function allows you to set a threshold for relative time strings function ld(a,b){return void 0!==pf[a]&&(void 0===b?pf[a]:(pf[a]=b,!0))}function md(a){var b=this.localeData(),c=jd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function nd(){ // for ISO strings we do not use the normal bubbling rules: // * milliseconds bubble up until they become hours // * days do not bubble at all // * months bubble up until they become years // This is because there is no context-free conversion between hours and days // (think of clock changes) // and also not between days and months (28-31 days per month) var a,b,c,d=qf(this._milliseconds)/1e3,e=qf(this._days),f=qf(this._months); // 3600 seconds -> 60 minutes -> 1 hour a=t(d/60),b=t(a/60),d%=60,a%=60, // 12 months -> 1 year c=t(f/12),f%=12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(m>>0,d=0;d68?1900:2e3)}; // MOMENTS var pe=O("FullYear",!0); // FORMATTING U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"), // ALIASES J("week","w"),J("isoWeek","W"), // PRIORITIES M("week",5),M("isoWeek",5), // PARSING Z("w",Od),Z("ww",Od,Kd),Z("W",Od),Z("WW",Od,Kd),ca(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=u(a)});var qe={dow:0,// Sunday is the first day of the week. doy:6}; // FORMATTING U("d",0,"do","day"),U("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),U("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),U("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"), // ALIASES J("day","d"),J("weekday","e"),J("isoWeekday","E"), // PRIORITY M("day",11),M("weekday",11),M("isoWeekday",11), // PARSING Z("d",Od),Z("e",Od),Z("E",Od),Z("dd",function(a,b){return b.weekdaysMinRegex(a)}),Z("ddd",function(a,b){return b.weekdaysShortRegex(a)}),Z("dddd",function(a,b){return b.weekdaysRegex(a)}),ca(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict); // if we didn't get a weekday name, mark the date as invalid null!=e?b.d=e:m(c).invalidWeekday=a}),ca(["d","e","E"],function(a,b,c,d){b[d]=u(a)}); // LOCALES var re="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),se="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),te="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ue=Zd,ve=Zd,we=Zd;U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ra),U("k",["kk",2],0,Sa),U("hmm",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)}),U("hmmss",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ta("a",!0),Ta("A",!1), // ALIASES J("hour","h"), // PRIORITY M("hour",13),Z("a",Ua),Z("A",Ua),Z("H",Od),Z("h",Od),Z("HH",Od,Kd),Z("hh",Od,Kd),Z("hmm",Pd),Z("hmmss",Qd),Z("Hmm",Pd),Z("Hmmss",Qd),ba(["H","HH"],de),ba(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),ba(["h","hh"],function(a,b,c){b[de]=u(a),m(c).bigHour=!0}),ba("hmm",function(a,b,c){var d=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d)),m(c).bigHour=!0}),ba("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d,2)),b[fe]=u(a.substr(e)),m(c).bigHour=!0}),ba("Hmm",function(a,b,c){var d=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d))}),ba("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d,2)),b[fe]=u(a.substr(e))});var xe,ye=/[ap]\.?m?\.?/i,ze=O("Hours",!0),Ae={calendar:xd,longDateFormat:yd,invalidDate:zd,ordinal:Ad,ordinalParse:Bd,relativeTime:Cd,months:le,monthsShort:me,week:qe,weekdays:re,weekdaysMin:te,weekdaysShort:se,meridiemParse:ye},Be={},Ce={},De=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ee=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fe=/Z|[+-]\d\d(?::?\d\d)?/,Ge=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/], // YYYYMM is NOT allowed by the standard ["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],He=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ie=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=x("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}), // constant that refers to the ISO standard a.ISO_8601=function(){};var Je=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=sb.apply(null,arguments);return this.isValid()&&a.isValid()?athis?this:a:o()}),Le=function(){return Date.now?Date.now():+new Date};zb("Z",":"),zb("ZZ",""), // PARSING Z("Z",Xd),Z("ZZ",Xd),ba(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ab(Xd,a)}); // HELPERS // timezone chunker // '+10:00' > ['10', '00'] // '-1530' > ['-15', '30'] var Me=/([\+\-]|\d\d)/gi; // HOOKS // This function will be called whenever a moment is mutated. // It is intended to keep the offset in sync with the timezone. a.updateOffset=function(){}; // ASP.NET json date format regex var Ne=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Oe=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ob.fn=wb.prototype;var Pe=Sb(1,"add"),Qe=Sb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Re=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)}); // FORMATTING U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),zc("gggg","weekYear"),zc("ggggg","weekYear"),zc("GGGG","isoWeekYear"),zc("GGGGG","isoWeekYear"), // ALIASES J("weekYear","gg"),J("isoWeekYear","GG"), // PRIORITY M("weekYear",1),M("isoWeekYear",1), // PARSING Z("G",Vd),Z("g",Vd),Z("GG",Od,Kd),Z("gg",Od,Kd),Z("GGGG",Sd,Md),Z("gggg",Sd,Md),Z("GGGGG",Td,Nd),Z("ggggg",Td,Nd),ca(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=u(a)}),ca(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}), // FORMATTING U("Q",0,"Qo","quarter"), // ALIASES J("quarter","Q"), // PRIORITY M("quarter",7), // PARSING Z("Q",Jd),ba("Q",function(a,b){b[be]=3*(u(a)-1)}), // FORMATTING U("D",["DD",2],"Do","date"), // ALIASES J("date","D"), // PRIOROITY M("date",9), // PARSING Z("D",Od),Z("DD",Od,Kd),Z("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),ba(["D","DD"],ce),ba("Do",function(a,b){b[ce]=u(a.match(Od)[0],10)}); // MOMENTS var Se=O("Date",!0); // FORMATTING U("DDD",["DDDD",3],"DDDo","dayOfYear"), // ALIASES J("dayOfYear","DDD"), // PRIORITY M("dayOfYear",4), // PARSING Z("DDD",Rd),Z("DDDD",Ld),ba(["DDD","DDDD"],function(a,b,c){c._dayOfYear=u(a)}), // FORMATTING U("m",["mm",2],0,"minute"), // ALIASES J("minute","m"), // PRIORITY M("minute",14), // PARSING Z("m",Od),Z("mm",Od,Kd),ba(["m","mm"],ee); // MOMENTS var Te=O("Minutes",!1); // FORMATTING U("s",["ss",2],0,"second"), // ALIASES J("second","s"), // PRIORITY M("second",15), // PARSING Z("s",Od),Z("ss",Od,Kd),ba(["s","ss"],fe); // MOMENTS var Ue=O("Seconds",!1); // FORMATTING U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}), // ALIASES J("millisecond","ms"), // PRIORITY M("millisecond",16), // PARSING Z("S",Rd,Jd),Z("SS",Rd,Kd),Z("SSS",Rd,Ld);var Ve;for(Ve="SSSS";Ve.length',f.showTopbar&&(t+='

',f.customTopBar?("function"==typeof f.customTopBar&&(f.customTopBar=f.customTopBar()),t+='
'+f.customTopBar+"
"):(t+='
'+K("selected")+' ...',f.singleDate||(t+=' '+f.separator+' ... (3 '+K("days")+")"),t+="
",t+='
error
default
'),t+='',t+="
");var a=f.showWeekNumbers?6:5,n="<";f.customArrowPrevSymbol&&(n=f.customArrowPrevSymbol);var r=">";if(f.customArrowNextSymbol&&(r=f.customArrowNextSymbol),t+='
'+E()+"
'+n+' '+(f.singleDate||!f.stickyMonths?''+r+"":"")+'
",f.singleMonth||(t+='
'+function(){for(var e=['
'],t=0;t
');return e.push("
"),e.join("")}()+'
'+E()+"
'+(f.stickyMonths?"":''+n+"")+' '+r+'
"),t+='
',f.singleDate||(t+='
'),t+='
',t+='")}().hide()).append('
'),U(f.container).append(m),f.inline?m.addClass("inline-wrapper"):i();f.alwaysOpen&&m.find(".apply-btn").hide();var e=_();if(G(e),f.time.enabled)if(f.startDate&&f.endDate||f.start&&f.end)Y(Q(f.start||f.startDate).toDate(),"time1"),Y(Q(f.end||f.endDate).toDate(),"time2");else{var a=f.defaultEndTime?f.defaultEndTime:e;Y(e,"time1"),Y(a,"time2")}var n="";n=f.singleDate?K("default-single"):f.minDays&&f.maxDays?K("default-range"):f.minDays?K("default-more"):f.maxDays?K("default-less"):K("default-default");m.find(".default-top").html(n.replace(/\%d/,f.minDays).replace(/\%d/,f.maxDays)),f.singleMonth?m.addClass("single-month"):m.addClass("two-months");setTimeout(function(){l(),s=!0},0),m.on("click",function(e){e.stopPropagation()}),U(document).on("click.datepicker",Z),m.find(".next").on("click",function(){f.stickyMonths?function(e){var t=F(f.month1),a=F(f.month2);if(q(a))return;if(!f.singleDate&&0f.end){var a=f.end;f.end=v(f.start),f.start=p(a),f.time.enabled&&f.swapTime&&(u("time1",f.start),u("time2",f.end))}f.start=parseInt(f.start),f.end=parseInt(f.end),b(),f.start&&!f.end&&(U(n).trigger("datepicker-first-date-selected",{date1:new Date(f.start)}),y(e)),w(),M(),S(),C(),x()}}function g(e){if(e=parseInt(e,10),f.startDate&&H(e,f.startDate)f.maxDays)return!1;if(0f.start)return!1;if(f.beforeShowDay&&"function"==typeof f.beforeShowDay){for(var t=!0,a=e;1f.start&&(a-=864e5),a'+e.attr("data-tooltip")+"";else if(!e.hasClass("invalid"))if(f.singleDate)m.find(".day.hovering").removeClass("hovering"),e.addClass("hovering");else if(m.find(".day").each(function(){var e=parseInt(U(this).attr("time"));f.start,f.end;e==t?U(this).addClass("hovering"):U(this).removeClass("hovering"),f.start&&!f.end&&(f.starte&&tf.maxDays?(f.start=!1,f.end=!1,m.find(".day").removeClass("checked"),m.find(".drp_top-bar").removeClass("normal").addClass("error").find(".error-top").html(K("less-than").replace("%d",f.maxDays))):f.minDays&&et.getTime()){var n=t;t=e,e=n,n=null}var r=!0;if(f.startDate&&H(e,f.startDate)'+A(a)+"";if(!f.monthSelect)return n;var r=!!f.startDate&&Q(f.startDate).add(f.singleMonth||"month2"!==t?0:1,"month"),s=!!f.endDate&&Q(f.endDate).add(f.singleMonth||"month1"!==t?0:-1,"month"),o=r&&e.isSame(r,"year")?r.get("month"):0,i=s&&e.isSame(s,"year")?s.get("month"):11,d=Math.min(o,a),l=Math.max(i,a);if(d===l)return n;return P("month",V({minSelectable:o,maxSelectable:i,minVisible:d,maxVisible:l},a,function(e){return A(e)}))}(e=Q(e).toDate(),t),n=function(e,t){var a=(e=Q(e)).get("year"),n='
'+a+"
";if(!f.yearSelect)return n;var r=f.yearSelect&&"function"==typeof f.yearSelect,s=!!f.startDate&&Q(f.startDate).add(f.singleMonth||"month2"!==t?0:1,"month"),o=!!f.endDate&&Q(f.endDate).add(f.singleMonth||"month1"!==t?0:-1,"month"),i=r?f.yearSelect(a):f.yearSelect.slice(),d=s?Math.max(i[0],s.get("year")):Math.min(i[0],a),l=o?Math.min(i[1],o.get("year")):Math.max(i[1],a),u=Math.min(d,a),m=Math.max(l,a);if(u===m)return n;return P("year",V({minSelectable:d,maxSelectable:l,minVisible:u,maxVisible:m},a))}(e,t);m.find("."+t+" .month-name").html(a+" "+n),m.find("."+t+" tbody").html(function(e){var t=[];e.setDate(1);new Date(e.getTime()-864e5);var a,n,r=new Date,s=e.getDay();0===s&&"monday"===f.startOfWeek&&(s=7);if(0");for(var i=0;i
'+f.getWeekNumber(a.date)+"
"),l.push("
"+J(a.time,a.day)+"
")}l.push("")}return l.join("")}(e)),f[t]=e,w(),m.find(".day").off("click").on("click",function(e){k(U(this))}),m.find(".day").off("mouseenter").on("mouseenter",function(e){y(U(this))}),m.find(".day").off("mouseleave").on("mouseleave",function(e){m.find(".date-range-length-tip").hide(),f.singleDate&&b()}),m.find(".week-number").off("click").on("click",function(e){var t,a,n,r;t=U(this),r=parseInt(t.attr("data-start-time"),10),f.startWeek?(m.find(".week-number-selected").removeClass("week-number-selected"),a=new Date(re.maxSelectable});return n}function P(e,t){for(var a,n='
"+a+"
"}function Y(e,t){m.find("."+t).append("
"+K("Time")+': 00:00
'),u(t,e)}function A(e){return K("month-name")[e]}function W(e){return Q(e).format(f.format)}function I(){C();var e=parseInt(Q(f.month1).format("YYYYMM")),t=parseInt(Q(f.month2).format("YYYYMM")),a=Math.abs(e-t);1"+K("week-number")+"":"";return"monday"==f.startOfWeek?e+""+K("week-1")+""+K("week-2")+""+K("week-3")+""+K("week-4")+""+K("week-5")+""+K("week-6")+""+K("week-7")+"":e+""+K("week-7")+""+K("week-1")+""+K("week-2")+""+K("week-3")+""+K("week-4")+""+K("week-5")+""+K("week-6")+""}function q(e){return e=Q(e),!(!f.startDate||!e.endOf("month").isBefore(f.startDate))||!(!f.endDate||!e.startOf("month").isAfter(f.endDate))}function $(e,t,r){var s=U.extend(!0,{},e);U.each(t,function(e,t){var a=t(r);for(var n in a)s.hasOwnProperty(n)?s[n]+=a[n]:s[n]=a[n]});var a="";for(var n in s)s.hasOwnProperty(n)&&(a+=n+'="'+s[n]+'" ');return a}function J(e,t){return f.showDateFilter&&"function"==typeof f.showDateFilter?f.showDateFilter(e,t):t}function K(e){var t=e.toLowerCase(),a=e in r?r[e]:t in r?r[t]:null,n=U.dateRangePickerLanguages.default;return null==a&&(a=e in n?n[e]:t in n?n[t]:""),a}function _(){var e=f.defaultTime?f.defaultTime:new Date;return f.lookBehind?(f.startDate&&L(e,f.startDate){window.initializePasswordValidation=()=>{const t=(n,t)=>{const r="glyphicon-ok",u="glyphicon-exclamation-sign",i=n.querySelector("i");if(t){n.style.color="green";n.parentElement.classList.remove("error");i.style.color="green";i.classList.add(r);i.classList.remove(u);return}n.style.color="red";n.parentElement.classList.add("error");i.style.color="red";i.classList.add(u);i.classList.remove(r)},e=document.querySelector("#password_username_validation"),o=document.querySelector("#password_length_validation"),s=document.querySelector("#password_alphanumeric_validation"),h=document.querySelector("#password_symbol_validation"),i=document.querySelector("#password_validations"),u=document.querySelector("#username_field"),n=document.querySelector("#password_field"),r=()=>{const r=u.value,i=n.value,f=!r.length||i.toLowerCase().indexOf(r.toLowerCase())=8&&i.length]/.test(i);t(e,f);t(o,c);t(s,l&&a);t(h,v)};u.onkeyup=r;n.onkeyup=r;r();const f=()=>{i.style.display=n===document.activeElement||i.classList.contains("error")?"":"none"};n.focusin=f;n.focusout=f}}); $(()=>{window.initializeRegisterInfo=()=>{const n=document.querySelector("#register_form");if(n){const h=document.querySelector("#birthday_input");h&&$(h).dateRangePicker({singleDate:!0,singleMonth:!0,monthSelect:!0,yearSelect:[1900,moment().get("year")],showShortcuts:!1,format:"YYYY-MM-DD",yearRange:"-100:+0"}).bind("datepicker-closed",()=>$(h).valid());const a=document.querySelector("#copy_phone_button"),k=document.querySelector("#Phone");a&&(a.onclick=()=>{navigator.clipboard&&navigator.clipboard.writeText(k.value.replaceAll("-","")).then(()=>registerPopup({content:n.dataset.copiedText})).catch(n=>console.log("Error when copying phone number: "+n))});const v=document.querySelectorAll(".password_input_trigger");v.length&&v.forEach(n=>{const t=n.parentNode.querySelector("input[type=password]");n.onclick=()=>{if(t.type==="password"){t.type="text";return}t.type="password"}});const d=document.querySelectorAll(".form_subcategory");d.forEach(n=>{n.childElementCount{n.required=!!t.value,i.required=!!t.value}}const i=document.querySelector("#selected_emoney_select");if(i&&i.required!==!0){const n=document.querySelector("#emoney_account_name_input"),t=document.querySelector("#emoney_account_number_input");i.onchange=()=>{n.required=!!i.value,t.required=!!i.value}}const y=document.querySelector(".register_message");y&&registerPopup({content:y.innerText});const c=document.querySelector("#bank_account_section"),l=document.querySelector("#emoney_account_section");if(c&&l){const n=c.querySelectorAll('input[name="bank_section_radio_group"]'),t=l.querySelectorAll('input[name="emoney_section_radio_group"]');[...n,...t].forEach(i=>{i.onclick=()=>{c.hidden=i.value!=="bank",l.hidden=i.value!=="emoney",n.forEach(n=>n.checked=n.value===i.value),t.forEach(n=>n.checked=n.value===i.value)}});n[0].click()}const g=document.querySelector('form[data-ajax="true"]');if(g){const n=document.querySelector("#register_alert"),t=document.querySelector("#register_success_alert");n.hidden=!0;t.hidden=!0;const i=document.querySelector("#referral_code_header");if(i){const t=document.querySelector("#referral_code_detail_toggler"),n=document.querySelector("#referral_code_content");i.onclick=()=>{const i=t.querySelector("i");n.classList.contains("expand")?(n.classList.remove("expand"),i.classList.remove("glyphicon-chevron-down"),i.classList.add("glyphicon-chevron-right")):(n.classList.add("expand"),i.classList.remove("glyphicon-chevron-right"),i.classList.add("glyphicon-chevron-down"))}}window.onRegisterAjaxRequestSuccess=i=>{if(n.hidden=!0,t.hidden=!0,registerPopup({contentTitle:i.statusText,content:i.message}),i.status!==!0){n.innerText=i.message;n.hidden=!1;return}t.innerText=i.message;t.hidden=!1;window.location.href=i.externalUrl;setTimeout(()=>{const n=document.querySelectorAll(".btn-primary");$(n).prop("disabled",!0)})}}const nt=document.querySelectorAll(".captcha_container");Array.prototype.slice.call(nt).forEach(n=>{initializeCaptcha({button:n.querySelector(".refresh_captcha_button"),image:n.querySelector(".captcha_image")})});const p=document.querySelector(".refresh_captcha_button");p&&p.click();const tt=document.querySelector("#password_validations");tt&&window.initializePasswordValidation();const w=$("#register_form").data("validator");w.settings.onfocusout=n=>{$(n).valid()};w.settings.onkeyup=!1;const r=document.querySelector("#bank_account_number_input"),f=document.querySelector("#selected_bank_select");if(r&&f){$(r).rules("add",{remote:{param:{url:"/validate/bank-account",data:{Bank:()=>$(f).val()}},depends:()=>$(f).val()!=""}});$(f).on("focusout change",function(){if($(r).removeData("previousValue"),$(this).val()==""||$(r).val()=="")return!1;$(r).valid()})}const e=document.querySelector("#bank_account_name_input"),b=document.querySelector("#FullName");e&&e.required&&b&&$(e).rules("add",{equalTo:"#FullName",messages:{equalTo:e.dataset.valEqualTo}});const u=document.querySelector("#emoney_account_number_input"),o=document.querySelector("#selected_emoney_select");if(u&&o){$(u).rules("add",{remote:{param:{url:"/validate/emoney-account",data:{EMoney:()=>$(o).val()}},depends:()=>$(o).val()!=""}});$(o).on("focusout change",function(){if($(u).removeData("previousValue"),$(this).val()==""||$(u).val()=="")return!1;$(u).valid()})}const s=document.querySelector("#emoney_account_name_input");s&&s.required&&b&&$(s).rules("add",{equalTo:"#FullName",messages:{equalTo:s.dataset.valEqualTo}})}}}); $(()=>{const n=document.querySelector("#request_registration_otp_button");if(n){const i=document.querySelector("#registration_otp_type_select"),t=document.querySelector("#registration_otp_contact_input");n.onclick=r=>{r.preventDefault();const u=t.value.trim();if(t.classList.remove("input-validation-error"),u.length===0){t.classList.add("input-validation-error");return}n.disabled=!0;window.$.ajax({type:"POST",url:"/register/otp/request",data:JSON.stringify({username:u,channelType:i.value}),contentType:"application/json; charset=utf-8",dataType:"json",success:t=>{if(isNaN(t.expiryInSeconds)||t.expiryInSeconds{n.disabled=!1,n.innerText=n.dataset.title},i);return}const r=document.querySelector("#otp_code_id_container");r&&(t.otpId!==null||t.otpId!=="")&&(r.innerHTML=`${t.otpId}-`);let i=t.expiryInSeconds+1;const f=n=>Math.floor(n/60).toString().padStart(2,"0")+":"+Math.floor(n%60).toString().padStart(2,"0"),u=function(){if(i-=1,i{window.initializeBonusSelection=()=>{const t=document.querySelector(".deposit_amount_display"),n=document.querySelector("#bonus_selection_container"),i=document.querySelector("#selected_bonus_title"),r=document.querySelector("#selected_bonus_amount");if(n){const f=n.dataset.currency;n.onclick=t=>{t.target.classList.contains("cancel_bonus_button")==!1&&a(n.dataset.selectedBonusRecId)};const e=document.querySelector("#cancel_bonus_button");e&&(e.onclick=()=>{s()});const o=(t,u,e,o,s,h,l,a,v)=>{var y=e,p=a;n.dataset.selected=!0;n.dataset.selectedBonusRecId=t;i.innerText=u;h=="FreeRound"&&(r.innerText=`${n.dataset.bonusFreeSpinCountText}: ${l} ${n.dataset.bonusFreeSpinCountTimesText}`);h=="BuyBonus"&&(r.innerText=`${n.dataset.bonusFreeSpinRoundText}: ${n.dataset.bonusFreeSpinRoundWorthText} ${f} ${window.formatNumber(new Decimal(p).toNumber())}`);e>0&&(r.innerText=`${n.dataset.bonusText}: ${f} ${window.formatNumber(new Decimal(parseFloat(y)).toNumber())}`);c(t,e,o,s,v,h,l,a)},s=()=>{const t=document.querySelectorAll(".bonus_selection_card");t.length>0&&Array.from(t).forEach(n=>{n.classList.remove("selected")});n.dataset.selected="false";n.dataset.selectedBonusRecId=n.dataset.emptyRecId;i.innerText=i.dataset.selectBonusText;l()},c=(n,i,r,u,f,e,o,s)=>{const a=document.querySelector("#bonus_amount_container"),v=document.querySelector("#bonus_recid_input"),h=document.querySelector("#deposit_bonus_amount_display");if(a&&(a.style.display=""),v&&(v.value=n),h){var c=i,l="BonusBalance";e=="FreeRound"&&(c=o,l="FreeRound");e=="BuyBonus"&&(c=s,l="BuyBonus");h.value=c;h.dataset.depositAmount=f;h.dataset.bonusType=l;h.dataset.bonusPercentage=r;h.dataset.bonusMaxPayout=u}t&&t.onkeyup()},l=()=>{const n=document.querySelector("#bonus_amount_container"),i=document.querySelector("#bonus_amount"),r=document.querySelector("#bonus_recid_input"),u=document.querySelector("#deposit_bonus_amount_display");n&&(n.style.display="none");i&&(i.innerText="");r&&(r.value="");u&&(u.value=0);t&&t.onkeyup()},h=()=>registerPopup({content:"Please try again in few minutes. Code:005BS"}),a=n=>{const i=document.querySelector(".deposit_amount_input"),t=document.querySelector("#bonus_selection_popup_container");if(t){let r=0;i&&(r=i.value==""?0:i.value);let f="/Claims/DepositBonusSelectionPopup";t.dataset.page=="register"&&(f="/Register/RegisterBonusSelectionPopup");$.ajax({type:"POST",url:f,data:JSON.stringify({selectedBonusRecId:n,depositAmount:u(r)}),contentType:"application/json; charset=utf-8",dataType:"html",success:n=>{t.innerHTML=n,window.initializeBonusSelectionPopup({page:t.dataset.page})},error:h})}};window.initializeBonusSelectionPopup=({page:n})=>{const t=document.querySelector("#bonus_selection_popup"),r=document.querySelector("#bonus_selection_popup_close_button"),i=document.querySelectorAll(".use_bonus_button");t.classList.add("open");r.onclick=()=>{t.classList.remove("open")};i.length>0&&Array.from(i).forEach(i=>{i.onclick||(i.onclick=()=>{const e=document.querySelectorAll(".bonus_selection_card"),r=document.querySelector(`.bonus_selection_card[data-id="${i.dataset.bonusId}"]`),f=document.querySelector(`.bonus_selection_card .bonus-button[data-bonus-id="${i.dataset.bonusId}"]`);if(i.dataset.availableForWeb=="false"){window.open("/download-apk","_blank");return}if(e.length>0&&Array.from(e).forEach(n=>{n.dataset.id!=i.dataset.bonusId&&n.classList.remove("selected")}),r)if(r.classList.contains("selected"))f.innerText=i.dataset.useText,s();else{const s=document.querySelector(".deposit_amount_input");let e=0;s&&(e=s.value);n=="register"&&(r.classList.add("selected"),f.innerText=i.dataset.cancelText,o(i.dataset.bonusId,i.dataset.bonusTitle,i.dataset.bonusAmount,i.dataset.bonusPercentage,i.dataset.bonusMaxPayout,i.dataset.freeSpinType,i.dataset.totalFreeSpin,i.dataset.totalBetAmount,u(e)),setTimeout(()=>{t.classList.remove("open")},1e3));n=="deposit"&&$.ajax({type:"POST",url:"/Claims/IsAllowActivateBonus",data:JSON.stringify({recId:i.dataset.bonusId,depositAmount:u(e)}),contentType:"application/json; charset=utf-8",dataType:"json",success:n=>{n.errorCode==0?(r.classList.add("selected"),f.innerText=i.dataset.cancelText,o(i.dataset.bonusId,i.dataset.bonusTitle,i.dataset.bonusAmount,i.dataset.bonusPercentage,i.dataset.bonusMaxPayout,i.dataset.freeSpinType,i.dataset.totalFreeSpin,i.dataset.totalBetAmount,u(e)),setTimeout(()=>{t.classList.remove("open")},1e3)):registerPopup({contentTitle:n.statusText,content:n.message})},error:h})}})});const f=document.querySelectorAll(".bonus-selection-card-footer");f.forEach(n=>{n.addEventListener("click",()=>{n.classList.toggle("expand");const t=n.nextElementSibling;t&&t.classList.contains("bonus-selection-card-detail")&&t.classList.toggle("expand")})})};const u=n=>n==0?n:n.replace(/\D/g,"")}}});