1parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"IDgC":[function(require,module,exports) { 2"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDefaultOptions=t,exports.setDefaultOptions=o;var e={};function t(){return e}function o(t){e=t} 3},{}],"2kK6":[function(require,module,exports) { 4"use strict";function e(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e; 5},{}],"KYJg":[function(require,module,exports) { 6"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=t(require("../_lib/requiredArgs/index.js"));function t(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){(0,e.default)(1,arguments);var n=Object.prototype.toString.call(t);return t instanceof Date||"object"===o(t)&&"[object Date]"===n?new Date(t.getTime()):"number"==typeof t||"[object Number]"===n?new Date(t):("string"!=typeof t&&"[object String]"!==n||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))} 7},{"../_lib/requiredArgs/index.js":"2kK6"}],"deQt":[function(require,module,exports) { 8"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=r(require("../toDate/index.js")),t=r(require("../_lib/requiredArgs/index.js"));function r(e){return e&&e.__esModule?e:{default:e}}function u(r,u){(0,t.default)(2,arguments);var i=(0,e.default)(r),d=(0,e.default)(u),a=i.getTime()-d.getTime();return a<0?-1:a>0?1:a} 9},{"../toDate/index.js":"KYJg","../_lib/requiredArgs/index.js":"2kK6"}],"2741":[function(require,module,exports) { 10"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=r(require("../toDate/index.js")),t=r(require("../_lib/requiredArgs/index.js"));function r(e){return e&&e.__esModule?e:{default:e}}function u(r,u){(0,t.default)(2,arguments);var l=(0,e.default)(r),a=(0,e.default)(u);return 12*(l.getFullYear()-a.getFullYear())+(l.getMonth()-a.getMonth())} 11},{"../toDate/index.js":"KYJg","../_lib/requiredArgs/index.js":"2kK6"}],"yofJ":[function(require,module,exports) { 12"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=t(require("../toDate/index.js")),r=t(require("../_lib/requiredArgs/index.js"));function t(e){return e&&e.__esModule?e:{default:e}}function u(t){(0,r.default)(1,arguments);var u=(0,e.default)(t);return u.setHours(23,59,59,999),u} 13},{"../toDate/index.js":"KYJg","../_lib/requiredArgs/index.js":"2kK6"}],"vBxK":[function(require,module,exports) { 14"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=t(require("../toDate/index.js")),r=t(require("../_lib/requiredArgs/index.js"));
14function t(e){return e&&e.__esModule?e:{default:e}}function u(t){(0,r.default)(1,arguments);var u=(0,e.default)(t),l=u.getMonth();return u.setFullYear(u.getFullYear(),l+1,0),u.setHours(23,59,59,999),u} 15},{"../toDate/index.js":"KYJg","../_lib/requiredArgs/index.js":"2kK6"}],"4L5G":[function(require,module,exports) { 16"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e=d(require("../toDate/index.js")),r=d(require("../endOfDay/index.js")),t=d(require("../endOfMonth/index.js")),u=d(require("../_lib/requiredArgs/index.js"));function d(e){return e&&e.__esModule?e:{default:e}}function i(d){(0,u.default)(1,arguments);var i=(0,e.default)(d);return(0,r.default)(i).getTime()===(0,t.default)(i).getTime()} 17},{"../toDate/index.js":"KYJg","../endOfDay/index.js":"yofJ","../endOfMonth/index.js":"vBxK","../_lib/requiredArgs/index.js":"2kK6"}],"/txd":[function(require,module,exports) { 18"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=d(require("../toDate/index.js")),t=d(require("../differenceInCalendarMonths/index.js")),r=d(require("../compareAsc/index.js")),u=d(require("../_lib/requiredArgs/index.js")),a=d(require("../isLastDayOfMonth/index.js"));function d(e){return e&&e.__esModule?e:{default:e}}function n(d,n){(0,u.default)(2,arguments);var s,i=(0,e.default)(d),f=(0,e.default)(n),l=(0,r.default)(i,f),o=Math.abs((0,t.default)(i,f));if(o<1)s=0;else{1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*o);var M=(0,r.default)(i,f)===-l;(0,a.default)((0,e.default)(d))&&1===o&&1===(0,r.default)(d,f)&&(M=!1),s=l*(o-Number(M))}return 0===s?0:s} 19},{"../toDate/index.js":"KYJg","../differenceInCalendarMonths/index.js":"2741","../compareAsc/index.js":"deQt","../_lib/requiredArgs/index.js":"2kK6","../isLastDayOfMonth/index.js":"4L5G"}],"H70G":[function(require,module,exports) { 20"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=r(require("../toDate/index.js")),t=r(require("../_lib/requiredArgs/index.js"));function r(e){return e&&e.__esModule?e:{default:e}}function u(r,u){return(0,t.default)(2,arguments),(0,e.default)(r).getTime()-(0,e.default)(u).getTime()} 21},{"../toDate/index.js":"KYJg","../_lib/requiredArgs/index.js":"2kK6"}],"tKq7":[function(require,module,exports) { 22"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getRoundingMethod=r;var t={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},e="trunc";function r(r){return r?t[r]:t[e]} 23},{}],"p1JG":[function(require,module,exports) { 24"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=i(require("../differenceInMilliseconds/index.js")),r=i(require("../_lib/requiredArgs/index.js")),d=require("../_lib/roundingMethods/index.js");function i(e){return e&&e.__esModule?e:{default:e}}function n(i,n,u){(0,r.default)(2,arguments);var t=(0,e.default)(i,n)/1e3;return(0,d.getRoundingMethod)(null==u?void 0:u.roundingMethod)(t)} 25},{"../differenceInMilliseconds/index.js":"H70G","../_lib/requiredArgs/index.js":"2kK6","../_lib/roundingMethods/index.js":"tKq7"}],"2ACz":[function(require,module,exports) { 26"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var o={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},e=function(e,t,n){var s,r=o[e];return s="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s},t=e;exports.default=t; 27},{}],"byVx":[function(require,module,exports) { 28"use strict";function t(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t; 29},{}],"H2a+":[function(require,module,exports) { 30"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("../../../_lib/buildFormatLongFn/index.js"));
30function t(e){return e&&e.__esModule?e:{default:e}}var d={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},a={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u={date:(0,e.default)({formats:d,defaultWidth:"full"}),time:(0,e.default)({formats:l,defaultWidth:"full"}),dateTime:(0,e.default)({formats:a,defaultWidth:"full"})},m=u;exports.default=m; 31},{"../../../_lib/buildFormatLongFn/index.js":"byVx"}],"ZyeE":[function(require,module,exports) { 32"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},t=function(t,o,r,a){return e[t]},o=t;exports.default=o; 33},{}],"6VNZ":[function(require,module,exports) { 34"use strict";function t(t){return function(e,a){var l;if("formatting"===(null!=a&&a.context?String(a.context):"standalone")&&t.formattingValues){var n=t.defaultFormattingWidth||t.defaultWidth,r=null!=a&&a.width?String(a.width):n;l=t.formattingValues[r]||t.formattingValues[n]}else{var u=t.defaultWidth,i=null!=a&&a.width?String(a.width):t.defaultWidth;l=t.values[i]||t.values[u]}return l[t.argumentCallback?t.argumentCallback(e):e]}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t; 35},{}],"PTsv":[function(require,module,exports) { 36"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=e(require("../../../_lib/buildLocalizeFn/index.js"));function e(n){return n&&n.__esModule?n:{default:n}}var i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},t={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},r={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},a={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},d={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(n,e){var i=Number(n),t=i%100;if(t>20||t<10)switch(t%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},g={ordinalNumber:u,era:(0,n.default)({values:i,defaultWidth:"wide"}),quarter:(0,n.default)({values:t,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:(0,n.default)({values:r,defaultWidth:"wide"}),day:(0,n.default)({values:a,defaultWidth:"wide"}),dayPeriod:(0,n.default)({values:o,defaultWidth:"wide",formattingValues:d,defaultFormattingWidth:"wide"})},m=g;exports.default=m; 37},{"../../../_lib/buildLocalizeFn/index.js":"6VNZ"}],"J9yN":[function(require,module,exports) { 38"use strict";function t(t){return function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=n.width,l=u&&t.matchPatterns[u]||t.matchPatterns[t.defaultMatchWidth],i=a.match(l);if(!i)return null;var s,c=i[0],f=u&&t.parsePatterns[u]||t.parsePatterns[t.defaultParseWidth],o=Array.isArray(f)?r(f,function(t){return t.test(c)}):e(f,function(t){return t.test(c)});return s=t.valueCallback?t.valueCallback(o):o,{value:s=n.valueCallback?n.valueCallback(s):s,rest:a.slice(c.length)}}}function e(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function r(t,e){for(var r=0;r<t.length;r++)if(e(t[r]))return r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t; 39},{}],"VWmv":[function(require,module,exports) { 40"use strict";function e(e){return function(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.match(e.matchPattern);if(!t)return null;var r=t[0],u=a.match(e.parsePattern);if(!u)return null;var n=e.valueCallback?e.valueCallback(u[0]):u[0];return{value:n=l.valueCallback?l.valueCallback(n):n,rest:a.slice(r.length)}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e; 41},{}],"2txO":[function(require,module,exports) { 42"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var a=e(require("../../../_lib/buildMatchFn/index.js")),i=e(require("../../../_lib/buildMatchPatternFn/index.js"));function e(a){return a&&a.__esModule?a:{default:a}}var t=/^(\d+)(th|st|nd|rd)?/i,n=/\d+/i,r={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},d={any:[/^b/i,/^(a|c)/i]},s={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},o={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},m={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},h={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},f={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},l={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},c={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},b={ordinalNumber:(0,i.default)({matchPattern:t,parsePattern:n,valueCallback:function(a){return parseInt(a,10)}}),era:(0,a.default)({matchPatterns:r,defaultMatchWidth:"wide",parsePatterns:d,defaultParseWidth:"any"}),quarter:(0,a.default)({matchPatterns:s,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:(0,a.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:m,defaultParseWidth:"any"}),day:(0,a.default)({matchPatterns:h,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),dayPeriod:(0,a.default)({matchPatterns:l,defaultMatchWidth:"any",parsePatterns:c,defaultParseWidth:"any"})},y=b;exports.default=y; 43},{"../../../_lib/buildMatchFn/index.js":"J9yN","../../../_lib/buildMatchPatternFn/index.js":"VWmv"}],"lcWw":[function(require,module,exports) { 44"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("./_lib/formatDistance/index.js")),t=l(require("./_lib/formatLong/index.js")),a=l(require("./_lib/formatRelative/index.js")),i=l(require("./_lib/localize/index.js")),r=l(require("./_lib/match/index.js"));
44function l(e){return e&&e.__esModule?e:{default:e}}var o={code:"en-US",formatDistance:e.default,formatLong:t.default,formatRelative:a.default,localize:i.default,match:r.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},u=o;exports.default=u; 45},{"./_lib/formatDistance/index.js":"2ACz","./_lib/formatLong/index.js":"H2a+","./_lib/formatRelative/index.js":"ZyeE","./_lib/localize/index.js":"PTsv","./_lib/match/index.js":"2txO"}],"2PB/":[function(require,module,exports) { 46"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("../../locale/en-US/index.js"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default;exports.default=r; 47},{"../../locale/en-US/index.js":"lcWw"}],"rJvg":[function(require,module,exports) { 48"use strict";function e(e,r){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e; 49},{}],"XO/K":[function(require,module,exports) { 50"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("../assign/index.js"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t){return(0,e.default)({},t)} 51},{"../assign/index.js":"rJvg"}],"aFbL":[function(require,module,exports) { 52"use strict";function e(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e; 53},{}],"sgN6":[function(require,module,exports) { 54"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=x;var e=require("../_lib/defaultOptions/index.js"),t=l(require("../compareAsc/index.js")),a=l(require("../differenceInMonths/index.js")),r=l(require("../differenceInSeconds/index.js")),n=l(require("../_lib/defaultLocale/index.js")),i=l(require("../toDate/index.js")),s=l(require("../_lib/cloneObject/index.js")),o=l(require("../_lib/assign/index.js")),u=l(require("../_lib/getTimezoneOffsetInMilliseconds/index.js")),f=l(require("../_lib/requiredArgs/index.js"));function l(e){return e&&e.__esModule?e:{default:e}}var d=1440,c=2520,m=43200,D=86400;function x(l,x,v){var M,h;(0,f.default)(2,arguments);var b=(0,e.getDefaultOptions)(),j=null!==(M=null!==(h=null==v?void 0:v.locale)&&void 0!==h?h:b.locale)&&void 0!==M?M:n.default;if(!j.formatDistance)throw new RangeError("locale must contain formatDistance property");var q=(0,t.default)(l,x);if(isNaN(q))throw new RangeError("Invalid time value");var X,_,p=(0,o.default)((0,s.default)(v),{addSuffix:Boolean(null==v?void 0:v.addSuffix),comparison:q});q>0?(X=(0,i.default)(x),_=(0,i.default)(l)):(X=(0,i.default)(l),_=(0,i.default)(x));var S,g=(0,r.default)(_,X),T=((0,u.default)(_)-(0,u.default)(X))/1e3,O=Math.round((g-T)/60);if(O<2)return null!=v&&v.includeSeconds?g<5?j.formatDistance("lessThanXSeconds",5,p):g<10?j.formatDistance("lessThanXSeconds",10,p):g<20?j.formatDistance("lessThanXSeconds",20,p):g<40?j.formatDistance("halfAMinute",0,p):g<60?j.formatDistance("lessThanXMinutes",1,p):j.formatDistance("xMinutes",1,p):0===O?j.formatDistance("lessThanXMinutes",1,p):j.formatDistance("xMinutes",O,p);if(O<45)return j.formatDistance("xMinutes",O,p);if(O<90)return j.formatDistance("aboutXHours",1,p);if(O<d){var w=Math.round(O/60);return j.formatDistance("aboutXHours",w,p)}if(O<c)return j.formatDistance("xDays",1,p);if(O<m){var y=Math.round(O/d);return j.formatDistance("xDays",y,p)}if(O<D)return S=Math.round(O/m),j.formatDistance("aboutXMonths",S,p);if((S=(0,a.default)(_,X))<12){var I=Math.round(O/m);return j.formatDistance("xMonths",I,p)}var A=S%12,Y=Math.floor(S/12);return A<3?j.formatDistance("aboutXYears",Y,p):A<9?j.formatDistance("overXYears",Y,p):j.formatDistance("almostXYears",Y+1,p)} 55},{"../_lib/defaultOptions/index.js":"IDgC","../compareAsc/index.js":"deQt","../differenceInMonths/index.js":"/txd","../differenceInSeconds/index.js":"p1JG","../_lib/defaultLocale/index.js":"2PB/","../toDate/index.js":"KYJg","../_lib/cloneObject/index.js":"XO/K","../_lib/assign/index.js":"rJvg","../_lib/getTimezoneOffsetInMilliseconds/index.js":"aFbL","../_lib/requiredArgs/index.js":"2kK6"}],"CzT4":[function(require,module,exports) { 56"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=t(require("../formatDistance/index.js")),r=t(require("../_lib/requiredArgs/index.js"));
56function t(e){return e&&e.__esModule?e:{default:e}}function u(t,u){return(0,r.default)(1,arguments),(0,e.default)(t,Date.now(),u)} 57},{"../formatDistance/index.js":"sgN6","../_lib/requiredArgs/index.js":"2kK6"}],"7ZgQ":[function(require,module,exports) { 58"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderLeaderboard=void 0;var e=t(require("date-fns/formatDistanceToNow"));function n(t){var e=t.split(/[-:\s\.]/).slice(0,6),n=e[0],a=e[1],r=e[2],d=e[3],s=e[4],i=e[5];return new Date(Date.UTC(n,a-1,r,d,s,i))}function a(t){return'\n<table class="leaders">\n <thead>\n <th>Rank</th>\n <th>Score</th>\n <th>Who</th>\n <th>When</th>\n <th>How</th>\n </thead>\n <tbody>\n '+t.scores.map(function(t,a){return"\n <tr>\n <td>"+(a+1)+"</td>\n <td>"+t.score+'</td>\n <td>\n <a class="leaders-namewrapper" href="https://'+t.authProvider+".com/"+t.displayName+'" target="_blank">\n <img class="leaders-avatar" src="'+t.avatarUrl+'" />\n <div>\n @'+t.displayName+'\n </div>\n </a>\n </td>\n <td>\n <p title="'+n(t.timestamp)+'">\n '+e.default(n(t.timestamp),{addSuffix:!0})+'\n </p>\n </td>\n <td>\n <div class="leaders-gamethumb">\n <img src="'+t.gameImage+'" />\n </div>\n </td>\n </tr>\n '}).join("")+"\n </tbody>\n</table>\n"}exports.renderLeaderboard=a; 59},{"date-fns/formatDistanceToNow":"CzT4"}],"yh9p":[function(require,module,exports) { 60"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; 61},{}],"JgNJ":[function(require,module,exports) { 62exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; 63},{}],"REa7":[function(require,module,exports) { 64var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; 65},{}],"dskh
vendor: 19,997 bytes, lines 65-69
65":[function(require,module,exports) { 66 67var global = arguments[3]; 68var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} 69},{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"
69dskh"}],"/C7X":[function(require,module,exports) { 70var global = arguments[3]; 71var Buffer = require("buffer").Buffer; 72var t=arguments[3],e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.User=exports.SchemaField=exports.Record=exports.LogRequest=exports.LocalAuthStore=exports.ExternalAuth=exports.Collection=exports.ClientResponseError=exports.BaseAuthStore=exports.Admin=void 0;var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function r(t,e,n,i){return new(n||(n=Promise))(function(o,r){function s(t){try{u(i.next(t))}catch(t){r(t)}}function a(t){try{u(i.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}u((i=i.apply(t,e||[])).next())})}function s(t,e){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=e.call(t,s)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}var a,u=function(t){function e(n){var i,o=this;return(o=t.call(this,"ClientResponseError")||this).url="",o.status=0,o.data={},o.isAbort=!1,o.originalError=null,Object.setPrototypeOf(o,e.prototype),n instanceof e||(o.originalError=n),null!==n&&"object"==typeof n&&(o.url="string"==typeof n.url?n.url:"",o.status="number"==typeof n.status?n.status:0,o.data=null!==n.data&&"object"==typeof n.data?n.data:{}),"undefined"!=typeof DOMException&&n instanceof DOMException&&(o.isAbort=!0),o.name="ClientResponseError "+o.status,o.message=(null===(i=o.data)||void 0===i?void 0:i.message)||"Something went wrong while processing your request.",o}return i(e,t),e.prototype.toJSON=function(){return o({},this)},e}(Error),l=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function c(t,e,n){var i=Object.assign({},n||{}),o=i.encode||p;if(!l.test(t))throw new TypeError("argument name is invalid");var r=o(e);if(r&&!l.test(r))throw new TypeError("argument val is invalid");var s=t+"="+r;if(null!=i.maxAge){var a=i.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(i.domain){if(!l.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain="+i.domain}if(i.path){if(!l.test(i.path))throw new TypeError("option path is invalid");s+="; Path="+i.path}if(i.expires){if(!function(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}(i.expires)||isNaN(i.expires.valueOf()))throw new TypeError("option expires is invali
72d");s+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.priority)switch("string"==typeof i.priority?i.priority.toLowerCase():i.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}function d(t){return-1!==t.indexOf("%")?decodeURIComponent(t):t}function p(t){return encodeURIComponent(t)}function h(t){if(t)try{var e=decodeURIComponent(a(t.split(".")[1]).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(e)||{}}catch(t){}return{}}exports.ClientResponseError=u,a="function"==typeof atob?atob:function(n){return(e=t.Buffer||require("buffer").Buffer).from(n,"base64").toString("binary")};var f=function(){function t(t){void 0===t&&(t={}),this.load(t||{})}return t.prototype.load=function(t){this.id=void 0!==t.id?t.id:"",this.created=void 0!==t.created?t.created:"",this.updated=void 0!==t.updated?t.updated:""},Object.defineProperty(t.prototype,"isNew",{get:function(){return!this.id||"00000000-0000-0000-0000-000000000000"===this.id},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new this.constructor(JSON.parse(JSON.stringify(this)))},t.prototype.export=function(){return Object.assign({},this)},t}(),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.load=function(e){t.prototype.load.call(this,e);for(var n=0,i=Object.entries(e);n<i.length;n++){var o=i[n],r=o[0],s=o[1];this[r]=s}this["@collectionId"]=void 0!==e["@collectionId"]?e["@collectionId"]:"",this["@collectionName"]=void 0!==e["@collectionName"]?e["@collectionName"]:"",this["@expand"]=void 0!==e["@expand"]?e["@expand"]:{}},e}(f),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.load=function(e){t.prototype.load.call(this,e),this.email="string"==typeof e.email?e.email:"",this.verified=!!e.verified,this.lastResetSentAt="string"==typeof e.lastResetSentAt?e.lastResetSentAt:"",this.lastVerificationSentAt="string"==typeof e.lastVerificationSentAt?e.lastVerificationSentAt:"",this.profile=e.profile?new v(e.profile):null},e}(f),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.load=function(e){t.prototype.load.call(this,e),this.avatar="number"==typeof e.avatar?e.avatar:0,this.email="string"==typeof e.email?e.email:"",this.lastResetSentAt="string"==typeof e.lastResetSentAt?e.lastResetSentAt:""},e}(f),b=function(){function t(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}return Object.defineProperty(t.prototype,"token",{get:function(){return this.baseToken},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this.baseModel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return!function(t,e){void 0===e&&(e=0);var n=h(t);return!(Object.keys(n).length>0&&(!n.exp||n.exp-e>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),t.prototype.save=function(t,e){this.baseToken=t||"",this.baseModel=null!==e&&"object"==typeof e?"undefined"!==(null==e?void 0:e.verified)?new y(e):new m(e):null,this.triggerChange()},t.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},t.prototype.loadFromCookie=function(t,e){void 0===e&&(e="pb_auth");var n=function(t,e){var n={};if("string"!=typeof t)return n;for(var i=Object.assign({},{}).decode||d,o=0;o<t.length;){var r=t.indexOf("=",o);if(-1===r)break;var s=t.indexOf(";",o);if(-1===s)s=t.length;else if(s<r){o=t.lastIndexOf(";",r-1)+1;continue}var a=t.slice(o,r).trim();if(void 0===n[a]){var u=t.slice(r+1,s).trim();
7234===u.charCodeAt(0)&&(u=u.slice(1,-1));try{n[a]=i(u)}catch(t){n[a]=u}}o=s+1}return n}(t||"")[e]||"",i={};try{(null===typeof(i=JSON.parse(n))||"object"!=typeof i||Array.isArray(i))&&(i={})}catch(t){}this.save(i.token||"",i.model||{})},t.prototype.exportToCookie=function(t,e){var n,i,o;void 0===e&&(e="pb_auth");var r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=h(this.token);(null==s?void 0:s.exp)?r.expires=new Date(1e3*s.exp):r.expires=new Date("1970-01-01"),t=Object.assign({},r,t);var a={token:this.token,model:(null===(n=this.model)||void 0===n?void 0:n.export())||null},u=c(e,JSON.stringify(a),t),l="undefined"!=typeof Blob?new Blob([u]).size:u.length;return a.model&&l>4096&&(a.model={id:null===(i=null==a?void 0:a.model)||void 0===i?void 0:i.id,email:null===(o=null==a?void 0:a.model)||void 0===o?void 0:o.email},this.model instanceof y&&(a.model.verified=this.model.verified),u=c(e,JSON.stringify(a),t)),u},t.prototype.onChange=function(t){var e=this;return this._onChangeCallbacks.push(t),function(){for(var n=e._onChangeCallbacks.length-1;n>=0;n--)if(e._onChangeCallbacks[n]==t)return delete e._onChangeCallbacks[n],void e._onChangeCallbacks.splice(n,1)}},t.prototype.triggerChange=function(){for(var t=0,e=this._onChangeCallbacks;t<e.length;t++){var n=e[t];n&&n(this.token,this.model)}},t}(),g=function(t){function e(e){void 0===e&&(e="pocketbase_auth");var n=t.call(this)||this;return n.storageFallback={},n.storageKey=e,n}return i(e,t),Object.defineProperty(e.prototype,"token",{get:function(){return(this._storageGet(this.storageKey)||{}).token||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){var t,e=this._storageGet(this.storageKey)||{};return null===e||"object"!=typeof e||null===e.model||"object"!=typeof e.model?null:void 0!==(null===(t=e.model)||void 0===t?void 0:t.verified)?new y(e.model):new m(e.model)},enumerable:!1,configurable:!0}),e.prototype.save=function(e,n){this._storageSet(this.storageKey,{token:e,model:n}),t.prototype.save.call(this,e,n)},e.prototype.clear=function(){this._storageRemove(this.storageKey),t.prototype.clear.call(this)},e.prototype._storageGet=function(t){var e;if("undefined"!=typeof window&&(null===window||void 0===window?void 0:window.localStorage)){var n=(null===(e=null===window||void 0===window?void 0:window.localStorage)||void 0===e?void 0:e.getItem(t))||"";try{return JSON.parse(n)}catch(t){return n}}return this.storageFallback[t]},e.prototype._storageSet=function(t,e){var n;if("undefined"!=typeof window&&(null===window||void 0===window?void 0:window.localStorage)){var i=e;"string"!=typeof e&&(i=JSON.stringify(e)),null===(n=null===window||void 0===window?void 0:window.localStorage)||void 0===n||n.setItem(t,i)}else this.storageFallback[t]=e},e.prototype._storageRemove=function(t){var e;"undefined"!=typeof window&&(null===(e=null===window||void 0===window?void 0:window.localStorage)||void 0===e||e.removeItem(t)),delete this.storageFallback[t]},e}(b),w=function(t){this.client=t},S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getAll=function(t){return void 0===t&&(t={}),this.client.send("/api/settings",{method:"GET",params:t}).then(function(t){return t||{}})},e.prototype.update=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.client.send("/api/settings",{method:"PATCH",params:e,body:t}).then(function(t){return t||{}})},e.prototype.testS3=function(t){return void 0===t&&(t={}),this.client.send("/api/settings/test/s3",{method:"POST",params:t}).then(function(){return!0})},e.prototype.testEmail=function(t,e,n){void 0===n&&(n={});var i={email:t,template:e};return this.client.send("/api/settings/test/email",{method:"POST",params:n,body:i}).then(function(){return!0})},e}(w),C=function(t,e,n,i,o){this.page=t>0?t:1,this.perPage=e>=0?e:0,this.totalItems=n>=0?n:0,this.totalPages=i>=0?i:0,this.items=o||[]},O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._getFullList=function(t,e,n){var i=this;void 0===e&&(e=100),void 0===n&&(n={});var o=[],a=function(u){return r(i,void 0,void 0,function(){return s(this,function(i){return[2,this._getList(t,u,e,n).then(function(t){var e=t,n=e.items,i=e.totalItems;return o=o.concat(n),n.length&&i>o.length?a(u+1):o})]})})};return a(1)},e.prototype._getList=function(t,e,n,i){var o=this;return void 0===e&&(e=1),void 0===n&&(n=30),void 0===i&&(i={}),i=Object.assign({page:e,perPage:n},i),this.client.send(t,{method:"GET",params:i}).then(function(t){var e=[];
72if(null==t?void 0:t.items){t.items=t.items||[];for(var n=0,i=t.items;n<i.length;n++){var r=i[n];e.push(o.decode(r))}}return new C((null==t?void 0:t.page)||1,(null==t?void 0:t.perPage)||0,(null==t?void 0:t.totalItems)||0,(null==t?void 0:t.totalPages)||0,e)})},e.prototype._getOne=function(t,e,n){var i=this;return void 0===n&&(n={}),this.client.send(t+"/"+encodeURIComponent(e),{method:"GET",params:n}).then(function(t){return i.decode(t)})},e.prototype._create=function(t,e,n){var i=this;return void 0===e&&(e={}),void 0===n&&(n={}),this.client.send(t,{method:"POST",params:n,body:e}).then(function(t){return i.decode(t)})},e.prototype._update=function(t,e,n,i){var o=this;return void 0===n&&(n={}),void 0===i&&(i={}),this.client.send(t+"/"+encodeURIComponent(e),{method:"PATCH",params:i,body:n}).then(function(t){return o.decode(t)})},e.prototype._delete=function(t,e,n){return void 0===n&&(n={}),this.client.send(t+"/"+encodeURIComponent(e),{method:"DELETE",params:n}).then(function(){return!0})},e}(w),P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getFullList=function(t,e){return void 0===t&&(t=100),void 0===e&&(e={}),this._getFullList(this.baseCrudPath(),t,e)},e.prototype.getList=function(t,e,n){return void 0===t&&(t=1),void 0===e&&(e=30),void 0===n&&(n={}),this._getList(this.baseCrudPath(),t,e,n)},e.prototype.getOne=function(t,e){return void 0===e&&(e={}),this._getOne(this.baseCrudPath(),t,e)},e.prototype.create=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this._create(this.baseCrudPath(),t,e)},e.prototype.update=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),this._update(this.baseCrudPath(),t,e,n)},e.prototype.delete=function(t,e){return void 0===e&&(e={}),this._delete(this.baseCrudPath(),t,e)},e}(O),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.decode=function(t){return new m(t)},e.prototype.baseCrudPath=function(){return"/api/admins"},e.prototype.authResponse=function(t){var e=this.decode((null==t?void 0:t.admin)||{});return(null==t?void 0:t.token)&&(null==t?void 0:t.admin)&&this.client.authStore.save(t.token,e),Object.assign({},t,{token:(null==t?void 0:t.token)||"",admin:e})},e.prototype.authViaEmail=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n=Object.assign({email:t,password:e},n),this.client.send(this.baseCrudPath()+"/auth-via-email",{method:"POST",params:i,body:n,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.refresh=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.client.send(this.baseCrudPath()+"/refresh",{method:"POST",params:e,body:t}).then(this.authResponse.bind(this))},e.prototype.requestPasswordReset=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),e=Object.assign({email:t},e),this.client.send(this.baseCrudPath()+"/request-password-reset",{method:"POST",params:n,body:e}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,e,n,i,o){return void 0===i&&(i={}),void 0===o&&(o={}),i=Object.assign({token:t,password:e,passwordConfirm:n},i),this.client.send(this.baseCrudPath()+"/confirm-password-reset",{method:"POST",params:o,body:i}).then(this.authResponse.bind(this))},e}(P),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.load=function(e){t.prototype.load.call(this,e),this.userId="string"==typeof e.userId?e.userId:"",this.provider="string"==typeof e.provider?e.provider:"",this.providerId="string"==typeof e.providerId?e.providerId:""},e}(f),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.decode=function(t){return new y(t)},e.prototype.baseCrudPath=function(){return"/api/users"},e.prototype.authResponse=function(t){var e=this.decode((null==t?void 0:t.user)||{});return(null==t?void 0:t.token)&&(null==t?void 0:t.user)&&this.client.authStore.save(t.token,e),Object.assign({},t,{token:(null==t?void 0:t.token)||"",user:e})},e.prototype.listAuthMethods=function(t){return void 0===t&&(t={}),this.client.send(this.baseCrudPath()+"/auth-methods",{method:"GET",params:t}).then(function(t){return Object.assign({},t,{emailPassword:!!(null==t?void 0:t.emailPassword),authProviders:Array.isArray(null==t?void 0:t.authProviders)?null==t?void 0:t.authProviders:[]})})},e.prototype.authViaEmail=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n=Object.assign({email:t,password:e},n),this.client.send(this.baseCrudPath()+"/auth-via-email",{method:"POST",params:i,body:n,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.authViaOAuth2=function(t,e,n,i,o,r){return void 0===o&&(o={}),void 0===r&&(r={}),o=Object.assign({provider:t,code:e,codeVerifier:n,redirectUrl:i},o),this.client.send(this.baseCrudPath()+"/auth-via-oauth2",{method:"POST",params:r,body:o,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.refresh=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.client.send(this.baseCrudPath()+"/refresh",{method:"POST",params:e,body:t}).then(this.authResponse.bind(this))},e.prototype.requestPasswordReset=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),e=Object.assign({email:t},e),this.client.send(this.baseCrudPath()+"/request-password-reset",{method:"POST",params:n,body:e}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,e,n,i,o){return void 0===i&&(i={}),void 0===o&&(o={}),i=Object.assign({token:t,password:e,passwordConfirm:n},i),this.client.send(this.baseCrudPath()+"/confirm-password-reset",{method:"POST",params:o,body:i}).then(this.authResponse.bind(this))},e.prototype.requestVerification=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),e=Object.assign({email:t},e),this.client.send(this.baseCrudPath()+"/request-verification",{method:"POST",params:n,body:e}).then(function(){return!0})},e.prototype.confirmVerification=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),e=Object.assign({token:t},e),this.client.send(this.baseCrudPath()+"/confirm-verification",{method:"POST",params:n,body:e}).then(this.authResponse.bind(this))},e.prototype.requestEmailChange=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),e=Object.assign({newEmail:t},e),this.client.send(this.baseCrudPath()+"/request-email-change",{method:"POST",params:n,body:e}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n=Object.assign({token:t,password:e},n),this.client.send(this.baseCrudPath()+"/confirm-email-change",{method:"POST",params:i,body:n}).then(this.authResponse.bind(this))},e.prototype.listExternalAuths=function(t,e){return void 0===e&&(e={}),this.client.send(this.baseCrudPath()+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:e}).then(function(t){var e=[];
72if(Array.isArray(t))for(var n=0,i=t;n<i.length;n++){var o=i[n];e.push(new j(o))}return e})},e.prototype.unlinkExternalAuth=function(t,e,n){return void 0===n&&(n={}),this.client.send(this.baseCrudPath()+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(e),{method:"DELETE",params:n}).then(function(){return!0})},e}(P),k=function(){function t(t){void 0===t&&(t={}),this.load(t||{})}return t.prototype.load=function(t){this.id=void 0!==t.id?t.id:"",this.name=void 0!==t.name?t.name:"",this.type=void 0!==t.type?t.type:"text",this.system=!!t.system,this.required=!!t.required,this.unique=!!t.unique,this.options="object"==typeof t.options&&null!==t.options?t.options:{}},t}(),A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.load=function(e){t.prototype.load.call(this,e),this.name="string"==typeof e.name?e.name:"",this.system=!!e.system,this.listRule="string"==typeof e.listRule?e.listRule:null,this.viewRule="string"==typeof e.viewRule?e.viewRule:null,this.createRule="string"==typeof e.createRule?e.createRule:null,this.updateRule="string"==typeof e.updateRule?e.updateRule:null,this.deleteRule="string"==typeof e.deleteRule?e.deleteRule:null,e.schema=Array.isArray(e.schema)?e.schema:[],this.schema=[];for(var n=0,i=e.schema;n<i.length;n++){var o=i[n];this.schema.push(new k(o))}},e}(f),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.decode=function(t){return new A(t)},e.prototype.baseCrudPath=function(){return"/api/collections"},e.prototype.import=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n={}),r(this,void 0,void 0,function(){return s(this,function(i){return[2,this.client.send(this.baseCrudPath()+"/import",{method:"PUT",params:n,body:{collections:t,deleteMissing:e}}).then(function(){return!0})]})})},e}(P),T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.decode=function(t){return new v(t)},e.prototype.baseCrudPath=function(t){return"/api/collections/"+encodeURIComponent(t)+"/records"},e.prototype.getFileUrl=function(t,e,n){void 0===n&&(n={});var i=[];i.push(this.client.baseUrl.replace(/\/+$/gm,"")),i.push("api"),i.push("files"),i.push(t["@collectionId"]),i.push(t.id),i.push(e);var o=i.join("/");if(Object.keys(n).length){var r=new URLSearchParams(n);o+=(o.includes("?")?"&":"?")+r}return o},e}(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getFullList=function(t,e,n){return void 0===e&&(e=100),void 0===n&&(n={}),this._getFullList(this.baseCrudPath(t),e,n)},e.prototype.getList=function(t,e,n,i){return void 0===e&&(e=1),void 0===n&&(n=30),void 0===i&&(i={}),this._getList(this.baseCrudPath(t),e,n,i)},e.prototype.getOne=function(t,e,n){return void 0===n&&(n={}),this._getOne(this.baseCrudPath(t),e,n)},e.prototype.create=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),this._create(this.baseCrudPath(t),e,n)},e.prototype.update=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),this._update(this.baseCrudPath(t),e,n,i)},e.prototype.delete=function(t,e,n){return void 0===n&&(n={}),this._delete(this.baseCrudPath(t),e,n)},e}(O)),I=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.load=function(e){t.prototype.load.call(this,e),e.remoteIp=e.remoteIp||e.ip,this.url="string"==typeof e.url?e.url:"",this.method="string"==typeof e.method?e.method:"GET",this.status="number"==typeof e.status?e.status:200,this.auth="string"==typeof e.auth?e.auth:"guest",this.remoteIp="string"==typeof e.remoteIp?e.remoteIp:"",this.userIp="string"==typeof e.userIp?e.userIp:"",this.referer="string"==typeof e.referer?e.referer:"",this.userAgent="string"==typeof e.userAgent?e.userAgent:"",this.meta="object"==typeof e.meta&&null!==e.meta?e.meta:{}},e}(f),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getRequestsList=function(t,e,n){return void 0===t&&(t=1),void 0===e&&(e=30),void 0===n&&(n={}),n=Object.assign({page:t,perPage:e},n),this.client.send("/api/logs/requests",{method:"GET",params:n}).then(function(t){var e=[];
72if(null==t?void 0:t.items){t.items=(null==t?void 0:t.items)||[];for(var n=0,i=t.items;n<i.length;n++){var o=i[n];e.push(new I(o))}}return new C((null==t?void 0:t.page)||1,(null==t?void 0:t.perPage)||0,(null==t?void 0:t.totalItems)||0,(null==t?void 0:t.totalPages)||0,e)})},e.prototype.getRequest=function(t,e){return void 0===e&&(e={}),this.client.send("/api/logs/requests/"+encodeURIComponent(t),{method:"GET",params:e}).then(function(t){return new I(t)})},e.prototype.getRequestsStats=function(t){return void 0===t&&(t={}),this.client.send("/api/logs/requests/stats",{method:"GET",params:t}).then(function(t){return t})},e}(w),L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clientId="",e.eventSource=null,e.subscriptions={},e}return i(e,t),e.prototype.subscribe=function(t,e){var n;return r(this,void 0,void 0,function(){return s(this,function(i){switch(i.label){case 0:if(!t)throw new Error("subscription must be set.");return this.subscriptions[t]&&(null===(n=this.eventSource)||void 0===n||n.removeEventListener(t,this.subscriptions[t])),this.subscriptions[t]=function(t){var n,i=t;try{n=JSON.parse(null==i?void 0:i.data)}catch(t){}e(n||{})},this.eventSource?[3,1]:(this.connect(),[3,3]);case 1:return this.clientId?[4,this.submitSubscriptions()]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})},e.prototype.unsubscribe=function(t){var e;return r(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:if(t){if(!this.subscriptions[t])return[2];null===(e=this.eventSource)||void 0===e||e.removeEventListener(t,this.subscriptions[t]),delete this.subscriptions[t]}else this.removeSubscriptionListeners(),this.subscriptions={};return this.clientId?[4,this.submitSubscriptions()]:[3,2];case 1:n.sent(),n.label=2;case 2:return Object.keys(this.subscriptions).length||this.disconnect(),[2]}})})},e.prototype.submitSubscriptions=function(){return r(this,void 0,void 0,function(){return s(this,function(t){return this.addSubscriptionListeners(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:Object.keys(this.subscriptions)},params:{$autoCancel:!1}}).then(function(){return!0})]})})},e.prototype.addSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeSubscriptionListeners(),this.subscriptions)this.eventSource.addEventListener(t,this.subscriptions[t])},e.prototype.removeSubscriptionListeners=function(){if(this.eventSource)for(var t in this.subscriptions)this.eventSource.removeEventListener(t,this.subscriptions[t])},e.prototype.connectHandler=function(t){var e=t;this.clientId=null==e?void 0:e.lastEventId,this.submitSubscriptions()},e.prototype.connect=function(){var t=this;this.disconnect(),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.addEventListener("PB_CONNECT",function(e){return t.connectHandler(e)})},e.prototype.disconnect=function(){var t,e,n=this;this.removeSubscriptionListeners(),null===(t=this.eventSource)||void 0===t||t.removeEventListener("PB_CONNECT",function(t){return n.connectHandler(t)}),null===(e=this.eventSource)||void 0===e||e.close(),this.eventSource=null,this.clientId=""},e}(w),U=function(){function t(t,e,n){void 0===t&&(t="/"),void 0===e&&(e="en-US"),this.cancelControllers={},this.baseUrl=t,this.lang=e,this.authStore=n||new g,this.admins=new R(this),this.users=new x(this),this.records=new T(this),this.collections=new E(this),this.logs=new _(this),this.settings=new S(this),this.realtime=new L(this)}return Object.defineProperty(t.prototype,"AuthStore",{get:function(){return this.authStore},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Settings",{get:function(){return this.settings},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Admins",{get:function(){return this.admins},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Users",{get:function(){return this.users},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Collections",{get:function(){return this.collections},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Records",{get:function(){return this.records}
72,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Logs",{get:function(){return this.logs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Realtime",{get:function(){return this.realtime},enumerable:!1,configurable:!0}),t.prototype.cancelRequest=function(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this},t.prototype.cancelAllRequests=function(){for(var t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this},t.prototype.send=function(t,e){var n,i,o,a,l,c,d,p,h;return r(this,void 0,void 0,function(){var f,v,y,m,b,g,w=this;return s(this,function(S){return(f=Object.assign({method:"GET"},e)).body&&"FormData"!==f.body.constructor.name&&("string"!=typeof f.body&&(f.body=JSON.stringify(f.body)),void 0===(null===(n=null==f?void 0:f.headers)||void 0===n?void 0:n["Content-Type"])&&(f.headers=Object.assign({},f.headers,{"Content-Type":"application/json"}))),void 0===(null===(i=null==f?void 0:f.headers)||void 0===i?void 0:i["Accept-Language"])&&(f.headers=Object.assign({},f.headers,{"Accept-Language":this.lang})),(null===(o=this.authStore)||void 0===o?void 0:o.token)&&void 0===(null===(a=null==f?void 0:f.headers)||void 0===a?void 0:a.Authorization)&&(v="Admin",void 0!==(null===(l=this.authStore.model)||void 0===l?void 0:l.verified)&&(v="User"),f.headers=Object.assign({},f.headers,{Authorization:v+" "+this.authStore.token})),!1!==(null===(c=f.params)||void 0===c?void 0:c.$autoCancel)&&(y=(null===(d=f.params)||void 0===d?void 0:d.$cancelKey)||(f.method||"GET")+t,this.cancelRequest(y),m=new AbortController,this.cancelControllers[y]=m,f.signal=m.signal),null===(p=f.params)||void 0===p||delete p.$autoCancel,null===(h=f.params)||void 0===h||delete h.$cancelKey,b=this.buildUrl(t),void 0!==f.params&&((g=this.serializeQueryParams(f.params))&&(b+=(b.includes("?")?"&":"?")+g),delete f.params),this.beforeSend&&(f=Object.assign({},this.beforeSend(b,f))),[2,fetch(b,f).then(function(t){return r(w,void 0,void 0,function(){var e;return s(this,function(n){switch(n.label){case 0:e={},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,t.json()];case 2:return e=n.sent(),[3,4];case 3:return n.sent(),[3,4];case 4:if(this.afterSend&&(e=this.afterSend(t,e)),t.status>=400)throw new u({url:t.url,status:t.status,data:e});return[2,e]}})})}).catch(function(t){throw new u(t)})]})})},t.prototype.buildUrl=function(t){var e=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return t&&(e+=t.startsWith("/")?t.substring(1):t),e},t.prototype.serializeQueryParams=function(t){var e=[];for(var n in t)if(null!==t[n]){var i=t[n],o=encodeURIComponent(n);if(Array.isArray(i))for(var r=0,s=i;r<s.length;r++){var a=s[r];e.push(o+"="+encodeURIComponent(a))}else i instanceof Date?e.push(o+"="+encodeURIComponent(i.toISOString())):null!==typeof i&&"object"==typeof i?e.push(o+"="+encodeURIComponent(JSON.stringify(i))):e.push(o+"="+encodeURIComponent(i))}return e.join("&")},t}();exports.default=U,exports.LogRequest=I,exports.Collection=A,exports.SchemaField=k,exports.ExternalAuth=j,exports.LocalAuthStore=g,exports.BaseAuthStore=b,exports.Admin=m,exports.User=y,exports.Record=v; 73},{"buffer":"dskh"}],"OQNe":[function(require,module,exports) { 74"use strict";var e=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}u((r=r.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}
74if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(s){i=[6,s],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function n(n){return e(this,void 0,void 0,function(){var r,a,i,o=this;return t(this,function(s){switch(s.label){case 0:return WebAssembly.instantiateStreaming||(WebAssembly.instantiateStreaming=function(n,r){return e(o,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return[4,n];case 1:return[4,t.sent().arrayBuffer()];case 2:return e=t.sent(),[4,WebAssembly.instantiate(e,r)];case 3:return[2,t.sent()]}})})}),r=new Go,[4,WebAssembly.instantiateStreaming(fetch(n),r.importObject)];case 1:return i=s.sent(),i.module,a=i.instance,[2,r.run(a)]}})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.wasmLoader=void 0,exports.wasmLoader=n; 75},{}],"7QCb":[function(require,module,exports) { 76"use strict";var e=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),require("./leaderboard");var r=n(require("pocketbase")),o=require("./leaderboard"),i=require("./wasm-loader");i.wasmLoader("main.wasm");var a=new r.default;window.client=a,window.loadMore=function(){var e=document.getElementById("loadMore");e&&(e.style.display="none"),h(1e3)};var u=document.getElementById("signin"),s=document.getElementById("score"),c=document.getElementById("topScore"),l=document.getElementById("leaders");function d(){a.authStore.token?null==u||u.classList.add("hidden"):null==u||u.classList.remove("hidden")}function f(){var n,r;return e(this,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return[4,a.records.getList("scores",1,1,{filter:'user = "'+(null===(n=a.authStore.model)||void 0===n?void 0:n.id)+'"'})];case 1:return e=t.sent().items,c&&(c.innerText=(null===(r=e[0])||void 0===r?void 0:r.score)||0),[2]}})})}function h(n){return void 0===n&&(n=10),e(this,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return[4,a.records.getList("scores",1,n,{sort:"-score"})];case 1:return e=t.sent().items,l&&(l.innerHTML=o.renderLeaderboard({scores:e})),[2]}})})}function v(){return e(this,void 0,void 0,function(){return t(this,function(e){switch(e.label){case 0:return a.authStore.onChange(d),d(),f(),h(),[4,a.users.listAuthMethods()];case 1:return e.sent().authProviders.forEach(function(e){var t=""+e.authUrl+location.origin+"/redirect.html",n=document.createElement("a");n.classList.add("button"),n.href=t,n.innerText="sign in with "+e.name,n.onclick=function(){localStorage.setItem("provider",JSON.stringify(e))},null==u||u.append(n)}),[2]}})})}window.setScore=function(e){s.innerText=String(e)},window.saveScore=function(e,t){var n=parseInt(c.innerText);if(t>n&&(c.innerText=String(t)),a.authStore.token&&(!n||t>n)){var r=new FormData;r.append("meta",e),r.append("score",String(t)),fetch("/score",{method:"post",body:r,headers:{ContentType:"multipart/form-data",Authorization:"User "+a.authStore.token}}).then(function(){h(10)})}},window.logOut=function(){a.authStore.clear(),c.innerText=0},v(); 77},{"./leaderboard":"7ZgQ","pocketbase":"/C7X","./wasm-loader":"OQNe"}]},{},["7QCb"], null) 78//# sourceMappingURL=/src.8f5cbae1.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.