textbrowser 0.45.1 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,14 @@
1
- function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let o,a;function s(){}const u=(l=function(){return function(e){var t=e();if(t&&t.then)return t.then(s)}((function(){if(!o)return e=import("path"),t=function(e){({dirname:o}=e)},n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e);var e,t,n}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(l.apply(this,e))}catch(e){return Promise.reject(e)}});var l;function c(e){return t=o(new URL(e).pathname),a||(a="win32"===process.platform),t.slice(a?1:0);var t}function f(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let p;function h(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const d=function({baseURL:e,cwd:t}={}){const n="undefined"!=typeof fetch?fetch:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(n){let r=!1;return h((function(){if(/^https?:/u.test(n))return h((function(){if(!p)return f(import("node-fetch"),(function(e){p=e}))}),(function(){const e=p.default(n);return r=!0,e}))}),(function(i){return r?i:h((function(){if(!t)return function(e,t,n){if(n)return t?t(e()):e();try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(u,(function(){t=e?c(e):"undefined"==typeof fetch&&process.cwd()}))}),(function(){return f(import("local-xmlhttprequest"),(function(e){const r=e.default({basePath:t});return new Promise(((e,t)=>{const i=new r;i.open("GET",n,!0),i.onreadystatechange=function(){if(4===i.readyState)if(200!==i.status)t(new SyntaxError("Failed to fetch URL: "+n+"state: "+i.readyState+"; status: "+i.status));else{const t=i.responseText;e({json:()=>JSON.parse(t)})}},i.send()}))}))}))}))})),r=function({fetch:e=("undefined"!=typeof window?window.fetch:self.fetch)}={}){return function t(n,r,o){try{let a=!1;return i(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(Array.isArray(n))return i(Promise.all(n.map((e=>t(e)))),(function(e){return r&&r(...e),a=!0,e}))}),(function(t){return a?t:i(e(n),(function(e){return i(e.json(),(function(e){return"function"==typeof r?r(e):e}))}))}))}),(function(e){if(e.message+=` (File: ${n})`,o)return o(e,n);throw e})))}catch(e){return Promise.reject(e)}}}({fetch:n});return r._fetch=n,r.hasURLBasePath=Boolean(e),r.basePath=t,r}();
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var y=function(){return(y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};var v=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function w(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}function E(e){return this instanceof E?(this.v=e,this):new E(e)}var x=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};var S=Object.freeze({__proto__:null,__extends:m,get __assign(){return y},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},__createBinding:v,__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||v(t,e,n)},__values:b,__read:_,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},__spreadArray:w,__await:E,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof E?Promise.resolve(n.value.v).then(u,l):c(o[0][2],n)}catch(e){c(o[0][3],e)}var n}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:E(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&v(t,e,n);return x(t,e),t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}});function O(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function P(e){var t={exports:{}};return e(t,t.exports),t.exports}var T=P((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorKind=void 0,(n=t.ErrorKind||(t.ErrorKind={}))[n.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",n[n.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",n[n.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",n[n.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",n[n.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",n[n.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",n[n.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",n[n.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",n[n.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",n[n.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",n[n.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",n[n.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",n[n.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",n[n.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",n[n.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",n[n.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",n[n.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",n[n.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",n[n.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",n[n.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",n[n.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",n[n.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",n[n.INVALID_TAG=23]="INVALID_TAG",n[n.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",n[n.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",n[n.UNCLOSED_TAG=27]="UNCLOSED_TAG"})),A=P((function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.createNumberElement=t.createLiteralElement=t.isDateTimeSkeleton=t.isNumberSkeleton=t.isTagElement=t.isPoundElement=t.isPluralElement=t.isSelectElement=t.isTimeElement=t.isDateElement=t.isNumberElement=t.isArgumentElement=t.isLiteralElement=t.SKELETON_TYPE=t.TYPE=void 0,function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(n=t.TYPE||(t.TYPE={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(r=t.SKELETON_TYPE||(t.SKELETON_TYPE={})),t.isLiteralElement=function(e){return e.type===n.literal},t.isArgumentElement=function(e){return e.type===n.argument},t.isNumberElement=function(e){return e.type===n.number},t.isDateElement=function(e){return e.type===n.date},t.isTimeElement=function(e){return e.type===n.time},t.isSelectElement=function(e){return e.type===n.select},t.isPluralElement=function(e){return e.type===n.plural},t.isPoundElement=function(e){return e.type===n.pound},t.isTagElement=function(e){return e.type===n.tag},t.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==r.number)},t.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||e.type!==r.dateTime)},t.createLiteralElement=function(e){return{type:n.literal,value:e}},t.createNumberElement=function(e,t){return{type:n.number,value:e,style:t}}})),k=P((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WHITE_SPACE_REGEX=t.SPACE_SEPARATOR_END_REGEX=t.SPACE_SEPARATOR_START_REGEX=void 0,t.SPACE_SEPARATOR_START_REGEX=/^[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]*/i,t.SPACE_SEPARATOR_END_REGEX=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]*$/i,t.WHITE_SPACE_REGEX=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i})),C=P((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseDateTimeSkeleton=void 0;var n=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;t.parseDateTimeSkeleton=function(e){var t={};return e.replace(n,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}})),N=P((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WHITE_SPACE_REGEX=void 0,t.WHITE_SPACE_REGEX=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i})),L=O(S),I=P((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseNumberSkeleton=t.parseNumberSkeletonFromString=void 0,t.parseNumberSkeletonFromString=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,r=e.split(N.WHITE_SPACE_REGEX).filter((function(e){return e.length>0}));n<r.length;n++){var i=r[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],a=i.slice(1),s=0,u=a;s<u.length;s++){if(0===u[s].length)throw new Error("Invalid number skeleton")}t.push({stem:o,options:a})}return t};var n=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,r=/^(@+)?(\+|#+)?$/g,i=/(\*)(0+)|(#+)(0+)|(0+)/g,o=/^(0+)$/;function a(e){var t={};return e.replace(r,(function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function s(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function u(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!o.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function l(e){var t=s(e);return t||{}}t.parseNumberSkeleton=function(e){for(var t={},c=0,f=e;c<f.length;c++){var p=f[c];switch(p.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=p.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=p.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=L.__assign(L.__assign(L.__assign({},t),{notation:"scientific"}),p.options.reduce((function(e,t){return L.__assign(L.__assign({},e),l(t))}),{}));continue;case"engineering":t=L.__assign(L.__assign(L.__assign({},t),{notation:"engineering"}),p.options.reduce((function(e,t){return L.__assign(L.__assign({},e),l(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(p.options[0]);continue;case"integer-width":if(p.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");p.options[0].replace(i,(function(e,n,r,i,o,a){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(o.test(p.stem))t.minimumIntegerDigits=p.stem.length;else if(n.test(p.stem)){if(p.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");p.stem.replace(n,(function(e,n,r,i,o,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&a?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""})),p.options.length&&(t=L.__assign(L.__assign({},t),a(p.options[0])))}else if(r.test(p.stem))t=L.__assign(L.__assign({},t),a(p.stem));else{var h=s(p.stem);h&&(t=L.__assign(L.__assign({},t),h));var d=u(p.stem);d&&(t=L.__assign(L.__assign({},t),d))}}return t}})),j=P((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),L.__exportStar(C,t),L.__exportStar(I,t)})),D=P((function(e,t){function n(e,t){return{start:e,end:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var r=!!String.prototype.startsWith,i=!!String.fromCodePoint,o=!!Object.fromEntries,a=!!String.prototype.codePointAt,s=!!String.prototype.trimStart,u=!!String.prototype.trimEnd,l=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},c=!0;try{v("","yu")}catch(e){c=!1}var f,p=r?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},h=i?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",i=e.length,o=0;i>o;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},d=o?Object.fromEntries:function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],a=i[1];t[o]=a}return t},g=a?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},m=s?function(e){return e.trimStart()}:function(e){return e.replace(k.SPACE_SEPARATOR_START_REGEX,"")},y=u?function(e){return e.trimEnd()}:function(e){return e.replace(k.SPACE_SEPARATOR_END_REGEX,"")};function v(e,t){return new RegExp(e,t)}if(c){var b=v("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");f=function(e,t){var n;return b.lastIndex=t,null!==(n=b.exec(e)[1])&&void 0!==n?n:""}}else f=function(e,t){for(var n=[];;){var r=g(e,t);if(void 0===r||E(r)||x(r))break;n.push(r),t+=r>=65536?2:1}return h.apply(void 0,n)};var _=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var i=[];!this.isEOF();){var o=this.char();if(123===o){if((a=this.parseArgument(e,r)).err)return a;i.push(a.val)}else{if(125===o&&e>0)break;if(35!==o||"plural"!==t&&"selectordinal"!==t){if(60===o&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(T.ErrorKind.UNMATCHED_CLOSING_TAG,n(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&w(this.peek()||0)){if((a=this.parseTag(e,t)).err)return a;i.push(a.val)}else{var a;if((a=this.parseLiteral(e,t)).err)return a;i.push(a.val)}}else{var s=this.clonePosition();this.bump(),i.push({type:A.TYPE.pound,location:n(s,this.clonePosition())})}}}return{val:i,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:A.TYPE.literal,value:"<"+i+"/>",location:n(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!w(this.char()))return this.error(T.ErrorKind.INVALID_TAG,n(s,this.clonePosition()));var u=this.clonePosition();return i!==this.parseTagName()?this.error(T.ErrorKind.UNMATCHED_CLOSING_TAG,n(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:A.TYPE.tag,value:i,children:a,location:n(r,this.clonePosition())},err:null}:this.error(T.ErrorKind.INVALID_TAG,n(s,this.clonePosition())))}return this.error(T.ErrorKind.UNCLOSED_TAG,n(r,this.clonePosition()))}return this.error(T.ErrorKind.INVALID_TAG,n(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(t);if(o)i+=o;else{var a=this.tryParseUnquoted(e,t);if(a)i+=a;else{var s=this.tryParseLeftAngleBracket();if(!s)break;i+=s}}}var u=n(r,this.clonePosition());return{val:{type:A.TYPE.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(w(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return h.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),h(n))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(T.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,n(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(T.ErrorKind.EMPTY_ARGUMENT,n(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(T.ErrorKind.MALFORMED_ARGUMENT,n(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(T.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,n(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:A.TYPE.argument,value:i,location:n(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(T.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,n(r,this.clonePosition())):this.parseArgumentOptions(e,t,i,r);default:return this.error(T.ErrorKind.MALFORMED_ARGUMENT,n(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=f(this.message,t),i=t+r.length;return this.bumpTo(i),{value:r,location:n(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(T.ErrorKind.EXPECT_ARGUMENT_TYPE,n(a,u));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((w=this.parseSimpleArgStyleIfPossible()).err)return w;if(0===(g=y(w.val)).length)return this.error(T.ErrorKind.EXPECT_ARGUMENT_STYLE,n(this.clonePosition(),this.clonePosition()));l={style:g,styleLocation:n(c,this.clonePosition())}}if((E=this.tryParseArgumentClose(i)).err)return E;var f=n(i,this.clonePosition());if(l&&p(null==l?void 0:l.style,"::",0)){var h=m(l.style.slice(2));if("number"===s)return(w=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?w:{val:{type:A.TYPE.number,value:r,location:f,style:w.val},err:null};if(0===h.length)return this.error(T.ErrorKind.EXPECT_DATE_TIME_SKELETON,f);var g={type:A.SKELETON_TYPE.dateTime,pattern:h,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?j.parseDateTimeSkeleton(h):{}};return{val:{type:"date"===s?A.TYPE.date:A.TYPE.time,value:r,location:f,style:g},err:null}}return{val:{type:"number"===s?A.TYPE.number:"date"===s?A.TYPE.date:A.TYPE.time,value:r,location:f,style:null!==(o=null==l?void 0:l.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":var v=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(T.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS,n(v,L.__assign({},v)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),_=0;if("select"!==s&&"offset"===b.value){if(!this.bumpIf(":"))return this.error(T.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,n(this.clonePosition(),this.clonePosition()));var w;if(this.bumpSpace(),(w=this.tryParseDecimalInteger(T.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return w;this.bumpSpace(),b=this.parseIdentifierIfPossible(),_=w.val}var E,x=this.tryParsePluralOrSelectOptions(e,s,t,b);if(x.err)return x;if((E=this.tryParseArgumentClose(i)).err)return E;var S=n(i,this.clonePosition());return"select"===s?{val:{type:A.TYPE.select,value:r,options:d(x.val),location:S},err:null}:{val:{type:A.TYPE.plural,value:r,options:d(x.val),offset:_,pluralType:"plural"===s?"cardinal":"ordinal",location:S},err:null};default:return this.error(T.ErrorKind.INVALID_ARGUMENT_TYPE,n(a,u))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(T.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,n(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(T.ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,n(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=j.parseNumberSkeletonFromString(e)}catch(e){return this.error(T.ErrorKind.INVALID_NUMBER_SKELETON,t)}return{val:{type:A.SKELETON_TYPE.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?j.parseNumberSkeleton(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,i){for(var o,a=!1,s=[],u=new Set,l=i.value,c=i.location;;){if(0===l.length){var f=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var p=this.tryParseDecimalInteger(T.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR,T.ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=n(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}if(u.has(l))return this.error("select"===t?T.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR:T.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(a=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?T.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:T.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,n(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(e+1,t,r);if(d.err)return d;var g=this.tryParseArgumentClose(h);if(g.err)return g;s.push([l,{value:d.val,location:n(h,this.clonePosition())}]),u.add(l),this.bumpSpace(),l=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?T.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR:T.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR,n(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(T.ErrorKind.MISSING_OTHER_CLAUSE,n(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(!(s>=48&&s<=57))break;o=!0,a=10*a+(s-48),this.bump()}var u=n(i,this.clonePosition());return o?l(a*=r)?{val:a,err:null}:this.error(t,u):this.error(e,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=g(this.message,e);if(void 0===t)throw Error("Offset "+e+" is at invalid UTF-16 code unit boundary");return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(p(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset "+e+" must be greater than or equal to the current offset "+this.offset());for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset "+e+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&E(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function w(e){return e>=97&&e<=122}function E(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function x(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}t.Parser=_})),R=P((function(e,t){function n(e){e.forEach((function(e){if(delete e.location,A.isSelectElement(e)||A.isPluralElement(e))for(var t in e.options)delete e.options[t].location,n(e.options[t].value);else A.isNumberElement(e)&&A.isNumberSkeleton(e.style)||(A.isDateElement(e)||A.isTimeElement(e))&&A.isDateTimeSkeleton(e.style)?delete e.style.location:A.isTagElement(e)&&n(e.children)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0,t.parse=function(e,t){void 0===t&&(t={}),t=L.__assign({shouldParseSkeletons:!0},t);var r=new D.Parser(e,t).parse();if(r.err){var i=SyntaxError(T.ErrorKind[r.err.kind]);throw i.location=r.err.location,i}return(null==t?void 0:t.captureLocation)||n(r.val),r.val},L.__exportStar(A,t)}));function F(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(o);return void 0===a&&(a=e.call(this,r),t.set(o,a)),a}function U(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function $(e,t,n,r,i){return n.bind(t,e,r,i)}function M(e,t){return $(e,this,1===e.length?F:U,t.cache.create(),t.serializer)}function z(){return JSON.stringify(arguments)}function q(){this.cache=Object.create(null)}q.prototype.has=function(e){return e in this.cache},q.prototype.get=function(e){return this.cache[e]},q.prototype.set=function(e,t){this.cache[e]=t};var G={create:function(){return new q}},B=function(e,t){var n=t&&t.cache?t.cache:G,r=t&&t.serializer?t.serializer:z;return(t&&t.strategy?t.strategy:M)(e,{cache:n,serializer:r})},V={variadic:function(e,t){return $(e,this,U,t.cache.create(),t.serializer)},monadic:function(e,t){return $(e,this,F,t.cache.create(),t.serializer)}};B.strategies=V;var W,H=Object.freeze(Object.assign(Object.create(null),B,{default:B,strategies:V}));!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(W||(W={}));var K,X=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return m(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),Y=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(r).join('", "')+'"',W.INVALID_VALUE,i)||this}return m(t,e),t}(X),J=function(e){function t(t,n,r){return e.call(this,'Value for "'+t+'" must be of type '+n,W.INVALID_VALUE,r)||this}return m(t,e),t}(X),Z=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',W.MISSING_VALUE,n)||this}return m(t,e),t}(X);function Q(e){return"function"==typeof e}function ee(e,t,n,r,i,o,a){if(1===e.length&&R.isLiteralElement(e[0]))return[{type:K.literal,value:e[0].value}];for(var s=[],u=0,l=e;u<l.length;u++){var c=l[u];if(R.isLiteralElement(c))s.push({type:K.literal,value:c.value});else if(R.isPoundElement(c))"number"==typeof o&&s.push({type:K.literal,value:n.getNumberFormat(t).format(o)});else{var f=c.value;if(!i||!(f in i))throw new Z(f,a);var p=i[f];if(R.isArgumentElement(c))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),s.push({type:"string"==typeof p?K.literal:K.object,value:p});else if(R.isDateElement(c)){var h="string"==typeof c.style?r.date[c.style]:R.isDateTimeSkeleton(c.style)?c.style.parsedOptions:void 0;s.push({type:K.literal,value:n.getDateTimeFormat(t,h).format(p)})}else if(R.isTimeElement(c)){h="string"==typeof c.style?r.time[c.style]:R.isDateTimeSkeleton(c.style)?c.style.parsedOptions:void 0;s.push({type:K.literal,value:n.getDateTimeFormat(t,h).format(p)})}else if(R.isNumberElement(c)){(h="string"==typeof c.style?r.number[c.style]:R.isNumberSkeleton(c.style)?c.style.parsedOptions:void 0)&&h.scale&&(p*=h.scale||1),s.push({type:K.literal,value:n.getNumberFormat(t,h).format(p)})}else{if(R.isTagElement(c)){var d=c.children,g=c.value,m=i[g];if(!Q(m))throw new J(g,"function",a);var y=m(ee(d,t,n,r,i,o).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),s.push.apply(s,y.map((function(e){return{type:"string"==typeof e?K.literal:K.object,value:e}})))}if(R.isSelectElement(c)){if(!(v=c.options[p]||c.options.other))throw new Y(c.value,p,Object.keys(c.options),a);s.push.apply(s,ee(v.value,t,n,r,i))}else if(R.isPluralElement(c)){var v;if(!(v=c.options["="+p])){if(!Intl.PluralRules)throw new X('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',W.MISSING_INTL_API,a);var b=n.getPluralRules(t,{type:c.pluralType}).select(p-(c.offset||0));v=c.options[b]||c.options.other}if(!v)throw new Y(c.value,p,Object.keys(c.options),a);s.push.apply(s,ee(v.value,t,n,r,i,p-(c.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===K.literal&&t.type===K.literal?n.value+=t.value:e.push(t),e}),[])}(s)}function te(e,t){return t?Object.keys(e).reduce((function(n,r){var i,o;return n[r]=(i=e[r],(o=t[r])?y(y(y({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=y(y({},i[t]),o[t]||{}),e}),{})):i),n}),y({},e)):e}function ne(e){return{create:function(){return{has:function(t){return t in e},get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(K||(K={}));var re=B||H;var ie=function(){function e(t,n,r,i){var o,a=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=a.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===K.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return ee(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.ignoreTag})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=te(e.formats,r),this.locales=n,this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:re((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,w([void 0],t)))}),{cache:ne(o.number),strategy:re.strategies.variadic}),getDateTimeFormat:re((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,w([void 0],t)))}),{cache:ne(o.dateTime),strategy:re.strategies.variadic}),getPluralRules:re((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,w([void 0],t)))}),{cache:ne(o.pluralRules),strategy:re.strategies.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.__parse=R.parse,e.formats={number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function oe(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return oe=function(){return e},e}function ae(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=oe();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function se(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let ue,le;function ce(){}const fe=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(){return function(e){var t=e();if(t&&t.then)return t.then(ce)}((function(){if(!ue)return e=Promise.resolve().then((()=>ae(require("path")))),t=function(e){({dirname:ue}=e)},n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e);var e,t,n}))}));function pe(e){return t=ue(new URL(e).pathname),le||(le="win32"===process.platform),t.slice(le?1:0);var t}function he(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let de;function ge(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const me=function({baseURL:e,cwd:t}={}){const n="undefined"!=typeof fetch?fetch:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(n){let r=!1;return ge((function(){if(/^https?:/u.test(n))return ge((function(){if(!de)return he(Promise.resolve().then((()=>ae(require("node-fetch")))),(function(e){de=e}))}),(function(){return r=!0,de.default(n)}))}),(function(i){return r?i:ge((function(){if(!t)return function(e,t,n){if(n)return t?t(e()):e();try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(fe,(function(){t=e?pe(e):"undefined"==typeof fetch&&process.cwd()}))}),(function(){return he(Promise.resolve().then((()=>ae(require("local-xmlhttprequest")))),(function(e){const r=e.default({basePath:t});return new Promise(((e,t)=>{const i=new r;i.open("GET",n,!0),i.onreadystatechange=function(){if(4===i.readyState)if(200!==i.status)t(new SyntaxError("Failed to fetch URL: "+n+"state: "+i.readyState+"; status: "+i.status));else{const t=i.responseText;e({json:()=>JSON.parse(t)})}},i.send()}))}))}))}))})),r=function({fetch:e=("undefined"!=typeof window?window.fetch:self.fetch)}={}){return function t(n,r,i){try{let o=!1;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(Array.isArray(n))return se(Promise.all(n.map((e=>t(e)))),(function(e){return r&&r(...e),o=!0,e}))}),(function(t){return o?t:se(e(n),(function(e){return se(e.json(),(function(e){return"function"==typeof r?r(e):e}))}))}))}),(function(e){if(e.message+=` (File: ${n})`,i)return i(e,n);throw e}))}catch(e){return Promise.reject(e)}}}({fetch:n});return r._fetch=n,r.hasURLBasePath=Boolean(e),r.basePath=t,r}();class ye{constructor(e){e=e||{},this.defaultNamespace=e.defaultNamespace||"",this.defaultSeparator=void 0===e.defaultSeparator?".":e.defaultSeparator,this.basePath=e.basePath||"locales/",this.fallbackLanguages=e.fallbackLanguages,this.localeFileResolver=e.localeFileResolver||function(e){return this.basePath+e+".json"},this.locales=e.locales||[],this.langs=e.langs,this.fallbackLocales=e.fallbackLocales||[];const t=e=>{this.loadLocales(this.fallbackLanguages,(function(...t){if(this.fallbackLocales.push(...t),e)return e(t)}),!0)};e.languages||e.callback?this.loadLocales(e.languages,(()=>{const n=Array.from(arguments),r=t=>{e.callback&&e.callback.apply(this,[this.getFormatter(e.namespace),this.getFormatter.bind(this),n,t])};!{}.hasOwnProperty.call(e,"fallbackLanguages")?r():t(r)})):{}.hasOwnProperty.call(e,"fallbackLanguages")&&t()}getFormatter(e,t){const n=Array.isArray;return e=void 0===e?this.defaultNamespace:e,t=void 0===t?this.defaultSeparator:t,e=n(e)?e.join(t):e,(r,i,o,a)=>{let s,u=e;if(r&&!n(r)&&"object"==typeof r&&(i=r.values,o=r.formats,a=r.fallback,r=r.key),n(r)){const e=r.pop();u=r.join(t),r=e}else{const e=r.indexOf(t);!u&&e>-1&&(u=r.slice(0,e),r=r.slice(e+1))}function l(e){return e.some((function(e){return s=e[(u?u+t:"")+r]||function(e,t,n,r){let i=e;return t.split(n).every((function(e){return i=i[e],i&&"object"==typeof i}))&&i[r]?i[r]:""}(e,u,t,r),s})),s}if(l(this.locales),!s){if("function"==typeof a)return a({message:this.fallbackLocales.length&&l(this.fallbackLocales),langs:this.langs,namespace:u,separator:t,key:r,values:i,formats:o});if(!1!==a)return this.fallbackLocales.length&&l(this.fallbackLocales);throw new Error("Message not found for locales "+this.langs+(this.fallbackLanguages?" (with fallback languages "+this.fallbackLanguages+")":"")+" with key "+r+", namespace "+u+", and namespace separator "+t)}if(!i&&!o)return s;return new ie(s,this.langs,o).format(i)}}loadLocales(e,t,n){return e=e||navigator.language||"en-US",e=Array.isArray(e)?e:[e],n||(this.langs=e),me(e.map(this.localeFileResolver,this),((...e)=>{n||this.locales.push(...e),t&&t.apply(this,e)}))}}const ve=e=>new ye(e);function be(e,{before:t,after:n,favicon:r,canvas:i,image:o=!0,acceptErrors:a}={}){return e=Array.isArray(e)?e:[e],Promise.all(e.map((e=>function(e){let s={};Array.isArray(e)&&([e,s={}]=e);let{favicon:u=r}=s;const{before:l=t,after:c=n,canvas:f=i,image:p=o}=s;function h(){l?l.before(d):c?c.after(d):document.head.appendChild(d)}const d=document.createElement("link");return new Promise(((t,n)=>{let r=n;if(a&&(r="function"==typeof a?r=>{a({error:r,stylesheetURL:e,options:s,resolve:t,reject:n})}:t),e.endsWith(".css")?u=!1:e.endsWith(".ico")&&(u=!0),u){if(d.rel="shortcut icon",d.type="image/x-icon",!1===p)return d.href=e,h(),void t(d);const r=document.createElement("canvas");r.width=16,r.height=16;const i=r.getContext("2d"),o=document.createElement("img");return o.addEventListener("error",(e=>{n(e)})),o.addEventListener("load",(()=>{i.drawImage(o,0,0),d.href=f?r.toDataURL("image/x-icon"):e,h(),t(d)})),void(o.src=e)}d.rel="stylesheet",d.type="text/css",d.href=e,h(),d.addEventListener("error",(e=>{r(e)})),d.addEventListener("load",(()=>{t(d)}))}))}(e))))}function _e(e){return(_e="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 we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||xe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e){return function(e){if(Array.isArray(e))return Se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){if(e){if("string"==typeof e)return Se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(e,t):void 0}}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}"undefined"!=typeof global&&(global.IntlMessageFormat=ie);var Oe=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i,Te=/(\[[^[\]]*])/g;function Ae(e,t){"object"!==_e(t)?t={hash:Boolean(t)}:void 0===t.hash&&(t.hash=!0);var n=t.hash?{}:"",r=t.serializer||(t.hash?Ce:Ne),i=e&&e.elements?Ee(e.elements):[],o=Object.create(null);return i.forEach((function(e){if((t.disabled||!e.disabled)&&e.name&&Pe.test(e.nodeName)&&!Oe.test(e.type)){var i=e.name,a=e.type,s=e.name,u=e.checked,l=e.value;if("checkbox"!==a&&"radio"!==a||u||(l=void 0),t.empty){if("checkbox"!==a||u||(l=""),"radio"===a&&(o[s]||u?u&&(o[s]=!0):o[s]=!1,void 0===l))return}else if(!l)return;if("select-multiple"===a){var c=!1;return Ee(e.options).forEach((function(e){var o=t.empty&&!e.value,a=e.value||o;e.selected&&a&&(c=!0,n=t.hash&&"[]"!==i.slice(-2)?r(n,i+"[]",e.value):r(n,i,e.value))})),void(!c&&t.empty&&(n=r(n,i,"")))}n=r(n,i,l)}})),t.empty&&Object.entries(o).forEach((function(e){var t=we(e,2),i=t[0];t[1]||(n=r(n,i,""))})),n}function ke(e,t,n){if(0===t.length)return n;var r=t.shift(),i=r.match(/^\[(.+?)]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(ke(null,t,n)):(e._values=e._values||[],e._values.push(ke(null,t,n))),e;if(i){var o=i[1],a=Number(o);isNaN(a)?(e=e||{})[o]=ke(e[o],t,n):(e=e||[])[a]=ke(e[a],t,n)}else e[r]=ke(e[r],t,n);return e}function Ce(e,t,n){if(t.match(Te)){ke(e,function(e){var t=[],n=new RegExp(Te),r=/^([^[\]]*)/.exec(e);for(r[1]&&t.push(r[1]);null!==(r=n.exec(e));)t.push(r[1]);return t}(t),n)}else{var r=e[t];r?(Array.isArray(r)||(e[t]=[r]),e[t].push(n)):e[t]=n}return e}function Ne(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}function Le(e,t){Object.entries(t).forEach((function(t){var n=we(t,2),r=n[0],i=n[1],o=e[r],a=!1;if(!o&&!(o=e.querySelector('[name="'.concat(r,'"]')))){if(!((o=e[r+"[]"])&&"object"===_e(o)&&"length"in o||(o=e.querySelectorAll('[name="'.concat(r,'[]"]'))).length))throw new Error("Name not found ".concat(r));a=!0}var s=o.type;if("checkbox"===s&&(o.checked=""!==i),("radio"===s||o[0]&&"radio"===o[0].type)&&Ee(e.querySelectorAll('[name="'.concat(r+(a?"[]":""),'"]'))).forEach((function(e){e.checked=i===e.value})),o[0]&&"select-multiple"===o[0].type)Ee(o[0].options).forEach((function(e){i.includes(e.value)&&(e.selected=!0)}));else if(Array.isArray(i)){if("select-multiple"===s)return void Ee(o.options).forEach((function(e){i.includes(e.value)&&(e.selected=!0)}));i.forEach((function(e,t){var n=o[t];if("checkbox"!==n.type)"select-multiple"!==n.type?n.value=e:Ee(n.options).forEach((function(t){e.includes(t.value)&&(t.selected=!0)}));else{var r=n.value===e||"on"===e;n.checked=r}}))}else o.value=i}))}function Ie({$p:e,lang:t,langs:n,langData:r,fallbackLanguages:i,resultsDisplay:o,basePath:a="",localeCallback:s=!1}){return new Promise(((u,l)=>{const c=ve({languages:t,fallbackLanguages:i,localeFileResolver:e=>a+r.localeFileBasePath+n.find((t=>t.code===e)).locale.$ref,async callback(...n){s&&s(...n)||await((...n)=>{const[r]=n;return e.l10n||(e.l10n=r),o({l:r,lang:t,fallbackLanguages:i,imfLocales:c.locales,$p:e,basePath:a},...n)})(...n),u()}})}))}let je="undefined"!=typeof window&&window,De="undefined"!=typeof document&&document||je&&je.document;const Re=["$plugins","$map"],Fe="http://www.w3.org/1999/xhtml",Ue=/-([a-z])/gu,$e={maxlength:"maxLength",minlength:"minLength",readonly:"readOnly"},Me=["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected"].concat(["accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"]),ze=["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"],qe=e=>De.querySelector(e),Ge=e=>[...De.querySelectorAll(e)];function Be(e){return e.nodeName&&e.nodeName.toLowerCase()}function Ve(e){if(De.createStyleSheet&&"style"===Be(e)){De.createStyleSheet().cssText=e.cssText}}function We(e,t){const n=Be(e);if(De.createStyleSheet){if("script"===n)return void(e.text=t.nodeValue);if("style"===n)return void(e.cssText=t.nodeValue)}if("template"!==n)try{e.append(t)}catch(r){const i=Be(t);if("select"===n&&"option"===i){try{e.add(t)}catch(n){e.add(t,null)}return}throw r}else e.content.append(t)}function He(e,t,n){if(!/^\w+$/u.test(n))throw new TypeError(`Bad ${e} reference; with prefix "${t}" and arg "${n}"`);const r=De.createElement("div");return r.innerHTML="&"+t+n+";",De.createTextNode(r.innerHTML)}function Ke(e,t){return t.toUpperCase()}function Xe(e){return null==e}function Ye(e){const t=typeof e;switch(t){case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if("nodeType"in e)switch(e.nodeType){case 1:return"element";case 9:return"document";case 11:return"fragment";default:return"non-container node"}default:return t}}function Je(e,t){return e.append(t),e}function Ze(e){return function(t){let n=e[""]?' xmlns="'+e[""]+'"':t;for(const[t,r]of Object.entries(e))""!==t&&(n+=" xmlns:"+t+'="'+r+'"');return n}}function Qe(e){return function(t,n){const r=e.childNodes[n],i=Array.isArray(t)?it(...t):it(t);r.replaceWith(i)}}function et(e){return function(t){Array.isArray(t)?e.append(it(...t)):e.append(it(t))}}function tt(e){return function(t){"string"==typeof t?e.append(t):Array.isArray(t)?e.append(it(...t)):e.append(it(t))}}function nt(e,t,n,r){if(r.$state="attributeValue",n&&"object"==typeof n){const i=rt(r,Object.keys(n)[0]);if(i)return i.set({opts:r,element:e,attribute:{name:t,value:n}})}return n}function rt(e,t){return e.$plugins&&e.$plugins.find((e=>e.name===t))}const it=function e(...t){let n=De.createDocumentFragment();function r(r){for(let[p,h]of Object.entries(r))if(p=p in $e?$e[p]:p,ze.includes(p))h=nt(n,p,h,a),Xe(h)||(n[p]=h);else if(Me.includes(p))h=nt(n,p,h,a),n[p]=h;else switch(p){case"#":a.$state="fragmentChilden",i[i.length]=e(a,h);break;case"$shadow":{const{open:t,closed:r}=h;let{content:i,template:o}=h;const a=n.attachShadow({mode:r||!1===t?"closed":"open"});o?(Array.isArray(o)?o="object"===Ye(o[0])?e("template",...o,De.body):e("template",o,De.body):"string"==typeof o&&(o=qe(o)),e(o.content.cloneNode(!0),a)):(i||(i=t||r),i&&"boolean"!=typeof i&&(Array.isArray(i)?e({"#":i},a):e(i,a)));break}case"$state":case"is":break;case"$custom":Object.assign(n,h);break;case"$define":{const e=n.localName.toLowerCase(),i=!e.includes("-");let o;if(i&&(o=n.getAttribute("is"),!o)){if(!{}.hasOwnProperty.call(r,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(t)}`);r.is=nt(n,"is",r.is,a),n.setAttribute("is",r.is),({is:o}=r)}const s=i?o:e;if(window.customElements.get(s))break;const u=t=>{const n=c&&c.extends?De.createElement(c.extends).constructor:i?De.createElement(e).constructor:window.HTMLElement;return t?class extends n{constructor(){super(),t.call(this)}}:class extends n{}};let l,c,f;Array.isArray(h)?h.length<=2?([l,c]=h,"string"==typeof c?c={extends:c}:c&&!{}.hasOwnProperty.call(c,"extends")&&(f=c),"object"==typeof l&&(f=l,l=u())):([l,f,c]=h,"string"==typeof c&&(c={extends:c})):"function"==typeof h?l=h:(f=h,l=u()),l.toString().startsWith("class")||(l=u(l)),!c&&i&&(c={extends:e}),f&&Object.entries(f).forEach((([e,t])=>{l.prototype[e]=t})),window.customElements.define(s,l,"object"==typeof c?c:void 0);break}case"$symbol":{const[e,t]=h;if("function"==typeof t){const r=t.bind(n);"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}else{const r=t;r.elem=n,"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}break}case"$data":c(h);break;case"$attribute":{const e=3===h.length?De.createAttributeNS(h[0],h[1]):De.createAttribute(h[0]);e.value=h[h.length-1],i[i.length]=e;break}case"$text":{const e=De.createTextNode(h);i[i.length]=e;break}case"$document":{const t=De.implementation.createHTMLDocument();if(h.childNodes){const e=h.childNodes.length;for(;t.childNodes[e];){t.childNodes[e].remove()}h.childNodes.forEach(Qe(t))}else{if(h.$DOCTYPE){const n={$DOCTYPE:h.$DOCTYPE},r=e(n);t.firstChild.replaceWith(r)}const n=t.childNodes[1],r=n.childNodes[0],i=n.childNodes[1];if(h.title||h.head){const e=De.createElement("meta");e.setAttribute("charset","utf-8"),r.append(e),h.title&&(t.title=h.title),h.head&&h.head.forEach(et(r))}h.body&&h.body.forEach(tt(i))}i[i.length]=t;break}case"$DOCTYPE":{const e=De.implementation.createDocumentType(h.name,h.publicId||"",h.systemId||"");i[i.length]=e;break}case"$on":for(let[e,r]of Object.entries(h||{})){if("function"==typeof r&&(r=[r,!1]),"function"!=typeof r[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(t)}`);s=n,u=e,l=r[0],f=r[1],s.addEventListener(u,l,Boolean(f))}break;case"className":case"class":h=nt(n,p,h,a),Xe(h)||(n.className=h);break;case"dataset":{const e=(t,r)=>{let i="";const o=""!==r;Object.keys(t).forEach((a=>{const s=t[a];if(i=o?r+a.replace(Ue,Ke).replace(/^([a-z])/u,Ke):r+a.replace(Ue,Ke),null===s||"object"!=typeof s)return Xe(s)||(n.dataset[i]=s),void(i=r);e(s,i)}))};e(h,"");break}case"innerHTML":Xe(h)||(n.innerHTML=h);break;case"htmlFor":case"for":if("label"===o){h=nt(n,p,h,a),Xe(h)||(n.htmlFor=h);break}h=nt(n,p,h,a),n.setAttribute(p,h);break;case"xmlns":break;default:{if(p.startsWith("on")){h=nt(n,p,h,a),n[p]=h;break}if("style"===p){if(h=nt(n,p,h,a),Xe(h))break;if("object"==typeof h){for(const[e,t]of Object.entries(h))Xe(t)||("float"===e?(n.style.cssFloat=t,n.style.styleFloat=t):n.style[e.replace(Ue,Ke)]=t);break}n.setAttribute(p,h);break}const e=rt(a,p);if(e){e.set({opts:a,element:n,attribute:{name:p,value:h}});break}h=nt(n,p,h,a),n.setAttribute(p,h);break}}var s,u,l,f}const i=[];let o,a,s=!1;if("object"===Ye(t[0])&&Object.keys(t[0]).some((e=>Re.includes(e)))){if(a=t[0],void 0===a.$state&&(s=!0,a.$state="root"),a.$map&&!a.$map.root&&!1!==a.$map.root&&(a.$map={root:a.$map}),"$plugins"in a){if(!Array.isArray(a.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(t)}`);a.$plugins.forEach((e=>{if(!e||"object"!=typeof e)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(t)}`);if(!e.name||!e.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(t)}`);if("function"!=typeof e.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(t)}`)}))}t=t.slice(1)}else a={$state:void 0};const u=t.length,l=a.$map&&a.$map.root,c=e=>{let t,r;if(!0===e)[t,r]=l;else if(Array.isArray(e)){if("string"==typeof e[0])return void e.forEach((e=>{c(a.$map[e])}));t=e[0]||l[0],r=e[1]||l[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(e))?(t=e,r=l[1]):(t=l[0],r=e);t.set(n,r)};for(let s=0;s<u;s++){let l=t[s];const c=Ye(l);switch(c){case"null":if(s===u-1)return Ve(i[0]),i.length<=1?i[0]:i.reduce(Je,De.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${s} on args: ${JSON.stringify(t)}`);case"string":switch(l){case"!":i[i.length]=De.createComment(t[++s]);break;case"?":{l=t[++s];let e=t[++s];const n=e;if(n&&"object"==typeof n){e=[];for(const[t,r]of Object.entries(n))e.push(t+'="'+r.replace(/"/gu,"&quot;")+'"');e=e.join(" ")}try{i[i.length]=De.createProcessingInstruction(l,e)}catch(t){i[i.length]=De.createComment("?"+l+" "+e+"?")}break}case"&":i[i.length]=He("entity","",t[++s]);break;case"#":i[i.length]=He("decimal",l,String(t[++s]));break;case"#x":i[i.length]=He("hexadecimal",l,t[++s]);break;case"![":try{i[i.length]=De.createCDATASection(t[++s])}catch(e){i[i.length]=De.createTextNode(t[s])}break;case"":i[i.length]=n=De.createDocumentFragment(),a.$state="fragment";break;default:{o=l;const e=t[s+1];if("object"===Ye(e)&&e.is){const{is:t}=e;n=De.createElementNS?De.createElementNS(Fe,o,{is:t}):De.createElement(o,{is:t})}else n=De.createElementNS?De.createElementNS(Fe,o):De.createElement(o);a.$state="element",i[i.length]=n;break}}break;case"object":{const e=l;if(void 0!==e.xmlns){const t="object"==typeof e.xmlns?Ze(e.xmlns):' xmlns="'+e.xmlns+'"';n=i[i.length-1]=(new je.DOMParser).parseFromString((new je.XMLSerializer).serializeToString(n).replace(' xmlns="'+Fe+'"',t),"application/xml").documentElement,a.$state="element"}r(e);break}case"document":case"fragment":case"element":if(0===s&&(n=l,a.$state="element"),s===u-1||s===u-2&&null===t[s+1]){const e=i.length;for(let t=0;t<e;t++)We(l,i[t]);Ve(i[0])}else i[i.length]=l;break;case"array":{const r=l,i=r.length;for(let o=0;o<i;o++){const i=r[o],s=typeof i;if(Xe(i))throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${o} of child: ${JSON.stringify(r)})`);switch(s){case"string":case"number":case"boolean":We(n,De.createTextNode(i));break;default:if(Array.isArray(i))a.$state="children",We(n,e(a,...i));else if(i["#"])a.$state="fragmentChildren",We(n,e(a,i["#"]));else{const e=nt(n,null,i,a);We(n,e)}}}break}default:throw new TypeError(`Unexpected type: ${c}; arg: ${l}; index ${s} on args: ${JSON.stringify(t)}`)}}const f=i[0]||n;return s&&a.$map&&a.$map.root&&c(!0),f};it.toJML=function(e,{stringOutput:t=!1,reportInvalidState:n=!0,stripWhitespace:r=!1}={}){"string"==typeof e&&(e=(new je.DOMParser).parseFromString(e,"text/html"));const i=[];let o=i,a=0;function s(e){class t extends Error{constructor(e,t){super(e),this.name=t}}if(n){const n=new t(e,"INVALID_STATE_ERR");throw n.code=11,n}}function u(e){o[a]=e,a++}function l(){u([]),o=o[a-1],a=0}function c(e,t){o=o[a-1][e],a=0,t&&(o=o[t])}return function e(t,n){const i="nodeType"in t?t.nodeType:null;let f,p;function h(){f=o,p=a}function d(){o=f,a=p,a++}switch(n={...n},[2,3,4,7,8].includes(i)&&!/^([\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u.test(t.nodeValue)&&s("Node has bad XML character value"),i){case 1:{h();const r=t.nodeName.toLowerCase();l(),u(r);const i={};let o=!1;n[t.prefix||""]!==t.namespaceURI&&(n[t.prefix||""]=t.namespaceURI,t.prefix?i["xmlns:"+t.prefix]=t.namespaceURI:t.namespaceURI?i.xmlns=t.namespaceURI:i.xmlns=null,o=!0),t.attributes.length?u([...t.attributes].reduce((function(e,t){return e[t.name]=t.value,e}),i)):o&&u(i);const{childNodes:a}=t;a.length&&(l(),[...a].forEach((function(t){e(t,n)}))),d();break}case void 0:case 2:u({$attribute:[t.namespaceURI,t.name,t.value]});break;case 3:if(r&&/^\s+$/u.test(t.nodeValue))return void u("");u(t.nodeValue);break;case 4:t.nodeValue.includes("]]>")&&s("CDATA cannot end with closing ]]>"),u(["![",t.nodeValue]);break;case 5:u(["&",t.nodeName]);break;case 7:/^xml$/iu.test(t.target)&&s('Processing instructions cannot be "xml".'),t.target.includes("?>")&&s("Processing instruction targets cannot include ?>"),t.target.includes(":")&&s('The processing instruction target cannot include ":"'),t.data.includes("?>")&&s("Processing instruction data cannot include ?>"),u(["?",t.target,t.data]);break;case 8:(t.nodeValue.includes("--")||t.nodeValue.length&&t.nodeValue.lastIndexOf("-")===t.nodeValue.length-1)&&s("Comments cannot include --"),u(["!",t.nodeValue]);break;case 9:{h();u({$document:{childNodes:[]}}),c("$document","childNodes");const{childNodes:r}=t;r.length||s("Documents must have a child node"),[...r].forEach((function(t){e(t,n)})),d();break}case 10:{h();const e={$DOCTYPE:{name:t.name}};/^(\u0020|\u000D|\u000A|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(t.publicId)||s("A publicId must have valid characters."),function(e,t){t.systemId.includes('"')&&t.systemId.includes("'")&&s("systemId cannot have both single and double quotes.");const{publicId:n,systemId:r}=t;r&&(e.systemId=r),n&&(e.publicId=n)}(e.$DOCTYPE,t),u(e),d();break}case 11:{h(),u({"#":[]}),c("#");const{childNodes:r}=t;[...r].forEach((function(t){e(t,n)})),d();break}default:throw new TypeError("Not an XML type")}}(e,{}),t?JSON.stringify(i[0]):i[0]},it.toJMLString=function(e,t){return it.toJML(e,Object.assign(t||{},{stringOutput:!0}))},it.toDOM=function(...e){return it(...e)},it.toHTML=function(...e){return it(...e).outerHTML},it.toDOMString=function(...e){return it.toHTML(...e)},it.toXML=function(...e){const t=it(...e);return(new je.XMLSerializer).serializeToString(t)},it.toXMLDOMString=function(...e){return it.toXML(...e)};class ot extends Map{get(e){return e="string"==typeof e?qe(e):e,super.get.call(this,e)}set(e,t){return e="string"==typeof e?qe(e):e,super.set.call(this,e,t)}invoke(e,t,...n){return e="string"==typeof e?qe(e):e,this.get(e)[t](e,...n)}}class at extends WeakMap{get(e){return e="string"==typeof e?qe(e):e,super.get.call(this,e)}set(e,t){return e="string"==typeof e?qe(e):e,super.set.call(this,e,t)}invoke(e,t,...n){return e="string"==typeof e?qe(e):e,this.get(e)[t](e,...n)}}it.Map=ot,it.WeakMap=at,it.weak=function(e,...t){const n=new at;return[n,it({$map:[n,e]},...t)]},it.strong=function(e,...t){const n=new ot;return[n,it({$map:[n,e]},...t)]},it.symbol=it.sym=it.for=function(e,t){return(e="string"==typeof e?qe(e):e)["symbol"==typeof t?t:Symbol.for(t)]},it.command=function(e,t,n,...r){let i;return e="string"==typeof e?qe(e):e,["symbol","string"].includes(typeof t)?(i=it.sym(e,t),"function"==typeof i?i(n,...r):i[n](...r)):(i=t.get(e),"function"==typeof i?i.call(e,n,...r):i[n](e,...r))},it.setWindow=e=>{je=e,De=je.document,De&&De.body&&({body:st}=De)},it.getWindow=()=>je;let st=De&&De.body;const ut=" ",lt=(e,t)=>{var n;return(e="string"==typeof e?(n=e,document.querySelector(n)):e).querySelector(t)},ct=["submit","submitClass"],ft=["submit","cancel","cancelClass","submitClass"],pt=["message","submit"],ht={en:{submit:"Submit",cancel:"Cancel",ok:"Ok"}};const dt=new class{constructor({locale:e,localeObject:t}={}){this.setLocale({locale:e,localeObject:t})}setLocale({locale:e={},localeObject:n={}}){this.localeStrings=t(t(t({},ht.en),ht[e]),n)}makeDialog({atts:e={},children:t=[],close:n,remove:r=!0}){n&&(e.$on||(e.$on={}),e.$on.close||(e.$on.close=n));const i=it("dialog",e,t,qe("#main"));return i.showModal(),r&&i.addEventListener("close",(()=>{i.remove()})),i}makeSubmitDialog(e){let{submit:t,submitClass:n="submit"}=e,i=r(e,ct);const o=this.makeCancelDialog(i);return lt(o,`button.${i.cancelClass||"cancel"}`).before(it("button",{class:n,$on:{click(e){t&&t.call(this,{e:e,dialog:o})}}},[this.localeStrings.submit]),ut.repeat(2)),o}makeCancelDialog(e){let{submit:t,cancel:n,cancelClass:i="cancel",submitClass:o="submit"}=e,a=r(e,ft);const s=this.makeDialog(a);return it("div",{class:o},[["br"],["br"],["button",{class:i,$on:{click(e){e.preventDefault(),n&&!1===n.call(this,{e:e,dialog:s})||s.close()}}},[this.localeStrings.cancel]]],s),s}alert(e,t){e="string"==typeof e?{message:e}:e;const{ok:n=("object"==typeof t?!1!==t.ok:!1!==t),message:r,submitClass:i="submit"}=e;return new Promise(((e,t)=>{const o=it("dialog",[r,...n?[["br"],["br"],["div",{class:i},[["button",{$on:{click(){o.close(),e()}}},[this.localeStrings.ok]]]]]:[]],qe("#main"));o.showModal()}))}prompt(e){e="string"==typeof e?{message:e}:e;const{message:n,submit:i}=e,o=r(e,pt);return new Promise(((e,r)=>{this.makeSubmitDialog(t(t({},o),{},{submit:function({e:t,dialog:n}){i&&i.call(this,{e:t,dialog:n}),n.close(),e(lt(n,"input").value)},cancel(){r(new Error("cancelled"))},children:[["label",[n,ut.repeat(3),["input"]]]]}))}))}confirm(e){e="string"==typeof e?{message:e}:e;const{message:t,submitClass:n="submit"}=e;return new Promise(((e,r)=>{const i=it("dialog",[t,["br"],["br"],["div",{class:n},[["button",{$on:{click(){i.close(),e()}}},[this.localeStrings.ok]],ut.repeat(2),["button",{$on:{click(){i.close(),r(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],qe("#main"));i.showModal()}))}};class gt{constructor({langData:e}){this.langData=e}localeFromLangData(e){return this.langData["localization-strings"][e]}getLanguageFromCode(e){return this.localeFromLangData(e).languages[e]}getFieldNameFromPluginNameAndLocales({pluginName:e,locales:n,lf:r,targetLanguage:i,applicableFieldI18N:o,meta:a,metaApplicableField:s}){return r(["plugins",e,"fieldname"],t(t(t({},a),s),{},{applicableField:o,targetLanguage:i?this.getLanguageFromCode(i):""}))}getLanguageInfo({$p:e}){const t=this.langData.languages,n=e=>!!t.some((({code:t})=>t===e))&&e,r=e.get("lang",!0),i=navigator.languages.filter(n),o=i.length?i:[n(navigator.language)||"en-US"];return{lang:[...(r||o[0]).split("."),...o],langs:t,languageParam:r,fallbackLanguages:o}}}var mt=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t,n){var r;try{r=n(7)}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){var r,i="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};r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":i(window))&&(r=window)}e.exports=r},function(e,t,n){var r,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],f=!1,p=-1;function h(){f&&l&&(f=!1,l.length?c=l.concat(c):p=-1,c.length&&d())}function d(){if(!f){var e=u(h);f=!0;for(var t=c.length;t;){for(l=c,c=[];++p<t;)l&&l[p].run();p=-1,t=c.length}l=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new g(e,t)),1!==c.length||f||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SCHEMES=void 0,t.pctEncChar=l,t.pctDecChars=c,t.parse=d,t.removeDotSegments=b,t.serialize=_,t.resolveComponents=w,t.resolve=function(e,t,n){return _(w(d(e,n),d(t,n),n,!0),n)},t.normalize=function(e,t){return"string"==typeof e?e=_(d(e,t),t):"object"===(0,a.typeOf)(e)&&(e=d(_(e,t),t)),e},t.equal=function(e,t,n){return"string"==typeof e?e=_(d(e,n),n):"object"===(0,a.typeOf)(e)&&(e=_(e,n)),"string"==typeof t?t=_(d(t,n),n):"object"===(0,a.typeOf)(t)&&(t=_(t,n)),e===t},t.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?i.default.ESCAPE:r.default.ESCAPE,l)},t.unescapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?i.default.PCT_ENCODED:r.default.PCT_ENCODED,c)};var r=s(n(17)),i=s(n(50)),o=s(n(18)),a=n(6);function s(e){return e&&e.__esModule?e:{default:e}}var u=t.SCHEMES={};function l(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function c(e){for(var t="",n=0,r=e.length;n<r;){var i=parseInt(e.substr(n+1,2),16);if(i<128)t+=String.fromCharCode(i),n+=3;else if(i>=194&&i<224){if(r-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function f(e,t){function n(e){var n=c(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,l).replace(t.PCT_ENCODED,a.toUpperCase)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,l).replace(t.PCT_ENCODED,a.toUpperCase)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,l).replace(t.PCT_ENCODED,a.toUpperCase)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,l).replace(t.PCT_ENCODED,a.toUpperCase)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,l).replace(t.PCT_ENCODED,a.toUpperCase)),e}var p=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,h=void 0==="".match(/(){0}/)[1];function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},a=!1!==t.iri?i.default:r.default;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var s=e.match(p);if(s){h?(n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5])):(n.scheme=s[1]||void 0,n.userinfo=-1!==e.indexOf("@")?s[3]:void 0,n.host=-1!==e.indexOf("//")?s[4]:void 0,n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=-1!==e.indexOf("?")?s[7]:void 0,n.fragment=-1!==e.indexOf("#")?s[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?s[4]:void 0)),n.host&&(n.host=n.host.replace(a.IPV6ADDRESS,"$1")),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var l=u[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||l&&l.unicodeSupport)f(n,a);else{if(n.host&&(t.domainHost||l&&l.domainHost))try{n.host=o.default.toASCII(n.host.replace(a.PCT_ENCODED,c).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}f(n,r.default)}l&&l.parse&&l.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}var g=/^\.\.?\//,m=/^\/\.(\/|$)/,y=/^\/\.\.(\/|$)/,v=/^\/?(?:.|\n)*?(?=\/|$)/;function b(e){for(var t=[];e.length;)if(e.match(g))e=e.replace(g,"");else if(e.match(m))e=e.replace(m,"/");else if(e.match(y))e=e.replace(y,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(v);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?i.default:r.default,a=[],s=u[(t.scheme||e.scheme||"").toLowerCase()];if(s&&s.serialize&&s.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||s&&s.domainHost)try{e.host=t.iri?o.default.toUnicode(e.host):o.default.toASCII(e.host.replace(n.PCT_ENCODED,c).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}f(e,n),"suffix"!==t.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var l=function(e,t){var n=!1!==t.iri?i.default:r.default,o=[];return void 0!==e.userinfo&&(o.push(e.userinfo),o.push("@")),void 0!==e.host&&o.push(String(e.host).replace(n.IPV6ADDRESS,"[$1]")),"number"==typeof e.port&&(o.push(":"),o.push(e.port.toString(10))),o.length?o.join(""):void 0}(e,t);if(void 0!==l&&("suffix"!==t.reference&&a.push("//"),a.push(l),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var p=e.path;t.absolutePath||s&&s.absolutePath||(p=b(p)),void 0===l&&(p=p.replace(/^\/\//,"/%2F")),a.push(p)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=d(_(e,n),n),t=d(_(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=b(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=b(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=b(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=b(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}},function(e,t,n){var r="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},i=n(0);e.exports=a;var o="\0";function a(e){this._isDirected=!i.has(e,"directed")||e.directed,this._isMultigraph=!!i.has(e,"multigraph")&&e.multigraph,this._isCompound=!!i.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function s(e,t){e[t]?e[t]++:e[t]=1}function u(e,t){--e[t]||delete e[t]}function l(e,t,n,r){var o=""+t,a=""+n;if(!e&&o>a){var s=o;o=a,a=s}return o+""+a+""+(i.isUndefined(r)?"\0":r)}function c(e,t){return l(e,t.v,t.w,t.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(e){return this._label=e,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultNodeLabelFn=e,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._in[t])}))},a.prototype.sinks=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._out[t])}))},a.prototype.setNodes=function(e,t){var n=arguments,r=this;return i.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},a.prototype.setNode=function(e,t){return i.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},a.prototype.node=function(e){return this._nodes[e]},a.prototype.hasNode=function(e){return i.has(this._nodes,e)},a.prototype.removeNode=function(e){var t=this;if(i.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],i.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),i.each(i.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],i.each(i.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},a.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(t))t=o;else{for(var n=t+="";!i.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},a.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},a.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}},a.prototype.children=function(e){if(i.isUndefined(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return i.keys(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}},a.prototype.predecessors=function(e){var t=this._preds[e];if(t)return i.keys(t)},a.prototype.successors=function(e){var t=this._sucs[e];if(t)return i.keys(t)},a.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return i.union(t,this.successors(e))},a.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},a.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),i.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&i.each(t.nodes(),(function(e){t.setParent(e,function e(i){var o=n.parent(i);return void 0===o||t.hasNode(o)?(r[i]=o,o):o in r?r[o]:e(o)}(e))})),t},a.prototype.setDefaultEdgeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultEdgeLabelFn=e,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(e,t){var n=this,r=arguments;return i.reduce(e,(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i})),this},a.prototype.setEdge=function(){var e,t,n,o,a=!1,u=arguments[0];"object"===(void 0===u?"undefined":r(u))&&null!==u&&"v"in u?(e=u.v,t=u.w,n=u.name,2===arguments.length&&(o=arguments[1],a=!0)):(e=u,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),e=""+e,t=""+t,i.isUndefined(n)||(n=""+n);var c=l(this._isDirected,e,t,n);if(i.has(this._edgeLabels,c))return a&&(this._edgeLabels[c]=o),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=a?o:this._defaultEdgeLabelFn(e,t,n);var f=function(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=f.v,t=f.w,Object.freeze(f),this._edgeObjs[c]=f,s(this._preds[t],e),s(this._sucs[e],t),this._in[t][c]=f,this._out[e][c]=f,this._edgeCount++,this},a.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],u(this._preds[t],e),u(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},a.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=i.values(n);return t?i.filter(r,(function(e){return e.v===t})):r}},a.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=i.values(n);return t?i.filter(r,(function(e){return e.w===t})):r}},a.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.merge=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i<r;++i)t[i]=t[i].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]},t.subexp=function(e){return"(?:"+e+")"},t.typeOf=function(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()},t.toUpperCase=function(e){return e.toUpperCase()},t.toArray=function(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}},function(e,t,n){(function(e,r){var i,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};(function(){var a,s="Expected a function",u="__lodash_hash_undefined__",l="__lodash_placeholder__",c=16,f=32,p=64,h=128,d=256,g=1/0,m=9007199254740991,y=NaN,v=4294967295,b=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",f],["partialRight",p],["rearg",d]],_="[object Arguments]",w="[object Array]",E="[object Boolean]",x="[object Date]",S="[object Error]",O="[object Function]",P="[object GeneratorFunction]",T="[object Map]",A="[object Number]",k="[object Object]",C="[object RegExp]",N="[object Set]",L="[object String]",I="[object Symbol]",j="[object WeakMap]",D="[object ArrayBuffer]",R="[object DataView]",F="[object Float32Array]",U="[object Float64Array]",$="[object Int8Array]",M="[object Int16Array]",z="[object Int32Array]",q="[object Uint8Array]",G="[object Uint8ClampedArray]",B="[object Uint16Array]",V="[object Uint32Array]",W=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,J=RegExp(X.source),Z=RegExp(Y.source),Q=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),se=/^\s+|\s+$/g,ue=/^\s+/,le=/\s+$/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fe=/\{\n\/\* \[wrapped with (.+)\] \*/,pe=/,? & /,he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/\\(\\)?/g,ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,be=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="["+Pe+"]",Ae="["+Oe+"]",ke="\\d+",Ce="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ne="[^\\ud800-\\udfff"+Pe+ke+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Le="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Fe="(?:"+Ce+"|"+Ne+")",Ue="(?:"+Re+"|"+Ne+")",$e="(?:"+Ae+"|"+Le+")?",Me="[\\ufe0e\\ufe0f]?"+$e+"(?:\\u200d(?:"+[Ie,je,De].join("|")+")[\\ufe0e\\ufe0f]?"+$e+")*",ze="(?:"+["[\\u2700-\\u27bf]",je,De].join("|")+")"+Me,qe="(?:"+[Ie+Ae+"?",Ae,je,De,"[\\ud800-\\udfff]"].join("|")+")",Ge=RegExp("['’]","g"),Be=RegExp(Ae,"g"),Ve=RegExp(Le+"(?="+Le+")|"+qe+Me,"g"),We=RegExp([Re+"?"+Ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Te,Re,"$"].join("|")+")",Ue+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Te,Re+Fe,"$"].join("|")+")",Re+"?"+Fe+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Re+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,ze].join("|"),"g"),He=RegExp("[\\u200d\\ud800-\\udfff"+Oe+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ye=-1,Je={};Je[F]=Je[U]=Je[$]=Je[M]=Je[z]=Je[q]=Je[G]=Je[B]=Je[V]=!0,Je[_]=Je[w]=Je[D]=Je[E]=Je[R]=Je[x]=Je[S]=Je[O]=Je[T]=Je[A]=Je[k]=Je[C]=Je[N]=Je[L]=Je[j]=!1;var Ze={};Ze[_]=Ze[w]=Ze[D]=Ze[R]=Ze[E]=Ze[x]=Ze[F]=Ze[U]=Ze[$]=Ze[M]=Ze[z]=Ze[T]=Ze[A]=Ze[k]=Ze[C]=Ze[N]=Ze[L]=Ze[I]=Ze[q]=Ze[G]=Ze[B]=Ze[V]=!0,Ze[S]=Ze[O]=Ze[j]=!1;var Qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},et=parseFloat,tt=parseInt,nt="object"==(void 0===e?"undefined":o(e))&&e&&e.Object===Object&&e,rt="object"==("undefined"==typeof self?"undefined":o(self))&&self&&self.Object===Object&&self,it=nt||rt||Function("return this")(),ot="object"==o(t)&&t&&!t.nodeType&&t,at=ot&&"object"==o(r)&&r&&!r.nodeType&&r,st=at&&at.exports===ot,ut=st&&nt.process,lt=function(){try{return at&&at.require&&at.require("util").types||ut&&ut.binding&&ut.binding("util")}catch(e){}}(),ct=lt&&lt.isArrayBuffer,ft=lt&&lt.isDate,pt=lt&&lt.isMap,ht=lt&&lt.isRegExp,dt=lt&&lt.isSet,gt=lt&&lt.isTypedArray;function mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function wt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Et(e,t){return!(null==e||!e.length)&&Lt(e,t,0)>-1}function xt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function St(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ot(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Pt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Tt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var kt=Rt("length");function Ct(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Nt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Lt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,jt,n)}function It(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function jt(e){return e!=e}function Dt(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:y}function Rt(e){return function(t){return null==t?a:t[e]}}function Ft(e){return function(t){return null==e?a:e[t]}}function Ut(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function $t(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);o!==a&&(n=n===a?o:n+o)}return n}function Mt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return function(t){return e(t)}}function qt(e,t){return St(t,(function(t){return e[t]}))}function Gt(e,t){return e.has(t)}function Bt(e,t){for(var n=-1,r=e.length;++n<r&&Lt(t,e[n],0)>-1;);return n}function Vt(e,t){for(var n=e.length;n--&&Lt(t,e[n],0)>-1;);return n}var Wt=Ft({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ht=Ft({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Kt(e){return"\\"+Qe[e]}function Xt(e){return He.test(e)}function Yt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jt(e,t){return function(n){return e(t(n))}}function Zt(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==l||(e[n]=l,o[i++]=n)}return o}function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function en(e){return Xt(e)?function(e){for(var t=Ve.lastIndex=0;Ve.test(e);)++t;return t}(e):kt(e)}function tn(e){return Xt(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.split("")}(e)}var nn=Ft({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),rn=function e(t){var n,r=(t=null==t?it:rn.defaults(it.Object(),t,rn.pick(it,Xe))).Array,i=t.Date,Oe=t.Error,Pe=t.Function,Te=t.Math,Ae=t.Object,ke=t.RegExp,Ce=t.String,Ne=t.TypeError,Le=r.prototype,Ie=Pe.prototype,je=Ae.prototype,De=t["__core-js_shared__"],Re=Ie.toString,Fe=je.hasOwnProperty,Ue=0,$e=(n=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Me=je.toString,ze=Re.call(Ae),qe=it._,Ve=ke("^"+Re.call(Fe).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=st?t.Buffer:a,Qe=t.Symbol,nt=t.Uint8Array,rt=He?He.allocUnsafe:a,ot=Jt(Ae.getPrototypeOf,Ae),at=Ae.create,ut=je.propertyIsEnumerable,lt=Le.splice,kt=Qe?Qe.isConcatSpreadable:a,Ft=Qe?Qe.iterator:a,on=Qe?Qe.toStringTag:a,an=function(){try{var e=lo(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),sn=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,un=i&&i.now!==it.Date.now&&i.now,ln=t.setTimeout!==it.setTimeout&&t.setTimeout,cn=Te.ceil,fn=Te.floor,pn=Ae.getOwnPropertySymbols,hn=He?He.isBuffer:a,dn=t.isFinite,gn=Le.join,mn=Jt(Ae.keys,Ae),yn=Te.max,vn=Te.min,bn=i.now,_n=t.parseInt,wn=Te.random,En=Le.reverse,xn=lo(t,"DataView"),Sn=lo(t,"Map"),On=lo(t,"Promise"),Pn=lo(t,"Set"),Tn=lo(t,"WeakMap"),An=lo(Ae,"create"),kn=Tn&&new Tn,Cn={},Nn=Ro(xn),Ln=Ro(Sn),In=Ro(On),jn=Ro(Pn),Dn=Ro(Tn),Rn=Qe?Qe.prototype:a,Fn=Rn?Rn.valueOf:a,Un=Rn?Rn.toString:a;function $n(e){if(Qa(e)&&!qa(e)&&!(e instanceof Gn)){if(e instanceof qn)return e;if(Fe.call(e,"__wrapped__"))return Fo(e)}return new qn(e)}var Mn=function(){function e(){}return function(t){if(!Za(t))return{};if(at)return at(t);e.prototype=t;var n=new e;return e.prototype=a,n}}();function zn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Xn(e,t){var n=qa(e),r=!n&&za(e),i=!n&&!r&&Wa(e),o=!n&&!r&&!i&&ss(e),a=n||r||i||o,s=a?Mt(e.length,Ce):[],u=s.length;for(var l in e)!t&&!Fe.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||yo(l,u))||s.push(l);return s}function Yn(e){var t=e.length;return t?e[Wr(0,t-1)]:a}function Jn(e,t){return Io(Ti(e),ar(t,0,e.length))}function Zn(e){return Io(Ti(e))}function Qn(e,t,n){(n===a||Ua(e[t],n))&&(n!==a||t in e)||ir(e,t,n)}function er(e,t,n){var r=e[t];Fe.call(e,t)&&Ua(r,n)&&(n!==a||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Ua(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Ai(t,ks(t),e)}function ir(e,t,n){"__proto__"==t&&an?an(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,i=t.length,o=r(i),s=null==e;++n<i;)o[n]=s?a:Ss(e,t[n]);return o}function ar(e,t,n){return e==e&&(n!==a&&(e=e<=n?e:n),t!==a&&(e=e>=t?e:t)),e}function sr(e,t,n,r,i,o){var s,u=1&t,l=2&t,c=4&t;if(n&&(s=i?n(e,r,i,o):n(e)),s!==a)return s;if(!Za(e))return e;var f=qa(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Fe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ti(e,s)}else{var p=po(e),h=p==O||p==P;if(Wa(e))return wi(e,u);if(p==k||p==_||h&&!i){if(s=l||h?{}:go(e),!u)return l?function(e,t){return Ai(e,fo(e),t)}(e,function(e,t){return e&&Ai(t,Cs(t),e)}(s,e)):function(e,t){return Ai(e,co(e),t)}(e,rr(s,e))}else{if(!Ze[p])return i?e:{};s=function(e,t,n){var r,i,o,a=e.constructor;switch(t){case D:return Ei(e);case E:case x:return new a(+e);case R:return function(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case F:case U:case $:case M:case z:case q:case G:case B:case V:return xi(e,n);case T:return new a;case A:case L:return new a(e);case C:return(o=new(i=e).constructor(i.source,me.exec(i))).lastIndex=i.lastIndex,o;case N:return new a;case I:return r=e,Fn?Ae(Fn.call(r)):{}}}(e,p,u)}}o||(o=new Kn);var d=o.get(e);if(d)return d;if(o.set(e,s),is(e))return e.forEach((function(r){s.add(sr(r,t,n,r,e,o))})),s;if(es(e))return e.forEach((function(r,i){s.set(i,sr(r,t,n,i,e,o))})),s;var g=f?a:(c?l?no:to:l?Cs:ks)(e);return vt(g||e,(function(r,i){g&&(r=e[i=r]),er(s,i,sr(r,t,n,i,e,o))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var i=n[r],o=t[i],s=e[i];if(s===a&&!(i in e)||!o(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ne(s);return ko((function(){e.apply(a,n)}),t)}function cr(e,t,n,r){var i=-1,o=Et,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=St(t,zt(n))),r?(o=xt,a=!1):t.length>=200&&(o=Gt,a=!1,t=new Hn(t));e:for(;++i<s;){var c=e[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var p=l;p--;)if(t[p]===f)continue e;u.push(c)}else o(t,f,r)||u.push(c)}return u}$n.templateSettings={escape:Q,evaluate:ee,interpolate:te,variable:"",imports:{_:$n}},$n.prototype=zn.prototype,$n.prototype.constructor=$n,qn.prototype=Mn(zn.prototype),qn.prototype.constructor=qn,Gn.prototype=Mn(zn.prototype),Gn.prototype.constructor=Gn,Bn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Bn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Bn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===u?a:n}return Fe.call(t,e)?t[e]:a},Bn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==a:Fe.call(t,e)},Bn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===a?u:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():lt.call(t,n,1),--this.size,0))},Vn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?a:t[n][1]},Vn.prototype.has=function(e){return tr(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Bn,map:new(Sn||Vn),string:new Bn}},Wn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return so(this,e).get(e)},Wn.prototype.has=function(e){return so(this,e).has(e)},Wn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,u),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ni(br),pr=Ni(_r,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function dr(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],s=t(o);if(null!=s&&(u===a?s==s&&!as(s):n(s,u)))var u=s,l=o}return l}function gr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function mr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=mo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?mr(s,t-1,n,r,i):Ot(i,s):r||(i[i.length]=s)}return i}var yr=Li(),vr=Li(!0);function br(e,t){return e&&yr(e,t,ks)}function _r(e,t){return e&&vr(e,t,ks)}function wr(e,t){return wt(t,(function(t){return Xa(e[t])}))}function Er(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&n<r;)e=e[Do(t[n++])];return n&&n==r?e:a}function xr(e,t,n){var r=t(e);return qa(e)?r:Ot(r,n(e))}function Sr(e){return null==e?e===a?"[object Undefined]":"[object Null]":on&&on in Ae(e)?function(e){var t=Fe.call(e,on),n=e[on];try{e[on]=a;var r=!0}catch(e){}var i=Me.call(e);return r&&(t?e[on]=n:delete e[on]),i}(e):function(e){return Me.call(e)}(e)}function Or(e,t){return e>t}function Pr(e,t){return null!=e&&Fe.call(e,t)}function Tr(e,t){return null!=e&&t in Ae(e)}function Ar(e,t,n){for(var i=n?xt:Et,o=e[0].length,s=e.length,u=s,l=r(s),c=1/0,f=[];u--;){var p=e[u];u&&t&&(p=St(p,zt(t))),c=vn(p.length,c),l[u]=!n&&(t||o>=120&&p.length>=120)?new Hn(u&&p):a}p=e[0];var h=-1,d=l[0];e:for(;++h<o&&f.length<c;){var g=p[h],m=t?t(g):g;if(g=n||0!==g?g:0,!(d?Gt(d,m):i(f,m,n))){for(u=s;--u;){var y=l[u];if(!(y?Gt(y,m):i(e[u],m,n)))continue e}d&&d.push(m),f.push(g)}}return f}function kr(e,t,n){var r=null==(e=Po(e,t=yi(t,e)))?e:e[Do(Ko(t))];return null==r?a:mt(r,e,n)}function Cr(e){return Qa(e)&&Sr(e)==_}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!Qa(e)&&!Qa(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var s=qa(e),u=qa(t),l=s?w:po(e),c=u?w:po(t),f=(l=l==_?k:l)==k,p=(c=c==_?k:c)==k,h=l==c;if(h&&Wa(e)){if(!Wa(t))return!1;s=!0,f=!1}if(h&&!f)return o||(o=new Kn),s||ss(e)?Qi(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!o(new nt(e),new nt(t)));case E:case x:case A:return Ua(+e,+t);case S:return e.name==t.name&&e.message==t.message;case C:case L:return e==t+"";case T:var s=Yt;case N:var u=1&r;if(s||(s=Qt),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var c=Qi(s(e),s(t),r,i,o,a);return a.delete(e),c;case I:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,l,n,r,i,o);if(!(1&n)){var d=f&&Fe.call(e,"__wrapped__"),g=p&&Fe.call(t,"__wrapped__");if(d||g){var m=d?e.value():e,y=g?t.value():t;return o||(o=new Kn),i(m,y,n,r,o)}}return!!h&&(o||(o=new Kn),function(e,t,n,r,i,o){var s=1&n,u=to(e),l=u.length;if(l!=to(t).length&&!s)return!1;for(var c=l;c--;){var f=u[c];if(!(s?f in t:Fe.call(t,f)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var h=!0;o.set(e,t),o.set(t,e);for(var d=s;++c<l;){var g=e[f=u[c]],m=t[f];if(r)var y=s?r(m,g,f,t,e,o):r(g,m,f,e,t,o);if(!(y===a?g===m||i(g,m,n,r,o):y)){h=!1;break}d||(d="constructor"==f)}if(h&&!d){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,o))}(e,t,n,r,Nr,i))}function Lr(e,t,n,r){var i=n.length,o=i,s=!r;if(null==e)return!o;for(e=Ae(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<o;){var l=(u=n[i])[0],c=e[l],f=u[1];if(s&&u[2]){if(c===a&&!(l in e))return!1}else{var p=new Kn;if(r)var h=r(c,f,l,e,t,p);if(!(h===a?Nr(f,c,3,r,p):h))return!1}}return!0}function Ir(e){return!(!Za(e)||(t=e,$e&&$e in t))&&(Xa(e)?Ve:be).test(Ro(e));var t}function jr(e){return"function"==typeof e?e:null==e?tu:"object"==(void 0===e?"undefined":o(e))?qa(e)?$r(e[0],e[1]):Ur(e):cu(e)}function Dr(e){if(!Eo(e))return mn(e);var t=[];for(var n in Ae(e))Fe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e,t){return e<t}function Fr(e,t){var n=-1,i=Ba(e)?r(e.length):[];return fr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Ur(e){var t=uo(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(n){return n===e||Lr(n,e,t)}}function $r(e,t){return bo(e)&&xo(t)?So(Do(e),t):function(n){var r=Ss(n,e);return r===a&&r===t?Os(n,e):Nr(t,r,3)}}function Mr(e,t,n,r,i){e!==t&&yr(t,(function(o,s){if(Za(o))i||(i=new Kn),function(e,t,n,r,i,o,s){var u=To(e,n),l=To(t,n),c=s.get(l);if(c)Qn(e,n,c);else{var f=o?o(u,l,n+"",e,t,s):a,p=f===a;if(p){var h=qa(l),d=!h&&Wa(l),g=!h&&!d&&ss(l);f=l,h||d||g?qa(u)?f=u:Va(u)?f=Ti(u):d?(p=!1,f=wi(l,!0)):g?(p=!1,f=xi(l,!0)):f=[]:ns(l)||za(l)?(f=u,za(u)?f=gs(u):Za(u)&&!Xa(u)||(f=go(l))):p=!1}p&&(s.set(l,f),i(f,l,r,o,s),s.delete(l)),Qn(e,n,f)}}(e,t,s,n,Mr,r,i);else{var u=r?r(To(e,s),o,s+"",e,t,i):a;u===a&&(u=o),Qn(e,s,u)}}),Cs)}function zr(e,t){var n=e.length;if(n)return yo(t+=t<0?n:0,n)?e[t]:a}function qr(e,t,n){var r=-1;return t=St(t.length?t:[tu],zt(ao())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Fr(e,(function(e,n,i){return{criteria:St(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=Si(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Er(e,a);n(s,a)&&Jr(o,yi(a,e),s)}return o}function Br(e,t,n,r){var i=r?It:Lt,o=-1,a=t.length,s=e;for(e===t&&(t=Ti(t)),n&&(s=St(e,zt(n)));++o<a;)for(var u=0,l=t[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==e&&lt.call(s,u,1),lt.call(e,u,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;yo(i)?lt.call(e,i,1):li(e,i)}}return e}function Wr(e,t){return e+fn(wn()*(t-e+1))}function Hr(e,t){var n="";if(!e||t<1||t>m)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Co(Oo(e,t,tu),e+"")}function Xr(e){return Yn(Us(e))}function Yr(e,t){var n=Us(e);return Io(n,ar(t,0,n.length))}function Jr(e,t,n,r){if(!Za(e))return e;for(var i=-1,o=(t=yi(t,e)).length,s=o-1,u=e;null!=u&&++i<o;){var l=Do(t[i]),c=n;if(i!=s){var f=u[l];(c=r?r(f,l,u):a)===a&&(c=Za(f)?f:yo(t[i+1])?[]:{})}er(u,l,c),u=u[l]}return e}var Zr=kn?function(e,t){return kn.set(e,t),e}:tu,Qr=an?function(e,t){return an(e,"toString",{configurable:!0,enumerable:!1,value:Zs(t),writable:!0})}:tu;function ei(e){return Io(Us(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ni(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!as(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ii(e,t,tu,n)}function ii(e,t,n,r){t=n(t);for(var i=0,o=null==e?0:e.length,s=t!=t,u=null===t,l=as(t),c=t===a;i<o;){var f=fn((i+o)/2),p=n(e[f]),h=p!==a,d=null===p,g=p==p,m=as(p);if(s)var y=r||g;else y=c?g&&(r||h):u?g&&h&&(r||!d):l?g&&h&&!d&&(r||!m):!d&&!m&&(r?p<=t:p<t);y?i=f+1:o=f}return vn(o,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ua(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ai(e){return"number"==typeof e?e:as(e)?y:+e}function si(e){if("string"==typeof e)return e;if(qa(e))return St(e,si)+"";if(as(e))return Un?Un.call(e):"";var t=e+"";return"0"==t&&1/e==-g?"-0":t}function ui(e,t,n){var r=-1,i=Et,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=xt;else if(o>=200){var l=t?null:Hi(e);if(l)return Qt(l);a=!1,i=Gt,u=new Hn}else u=t?[]:s;e:for(;++r<o;){var c=e[r],f=t?t(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(c)}else i(u,f,n)||(u!==s&&u.push(f),s.push(c))}return s}function li(e,t){return null==(e=Po(e,t=yi(t,e)))||delete e[Do(Ko(t))]}function ci(e,t,n,r){return Jr(e,t,n(Er(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Gn&&(n=n.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),n)}function hi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=cr(a[o]||s,e[u],t,n));return ui(mr(a,1),t,n)}function di(e,t,n){for(var r=-1,i=e.length,o=t.length,s={};++r<i;){var u=r<o?t[r]:a;n(s,e[r],u)}return s}function gi(e){return Va(e)?e:[]}function mi(e){return"function"==typeof e?e:tu}function yi(e,t){return qa(e)?e:bo(e,t)?[e]:jo(ms(e))}var vi=Kr;function bi(e,t,n){var r=e.length;return n=n===a?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=sn||function(e){return it.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=rt?rt(n):new e.constructor(n);return e.copy(r),r}function Ei(e){var t=new e.constructor(e.byteLength);return new nt(t).set(new nt(e)),t}function xi(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var n=e!==a,r=null===e,i=e==e,o=as(e),s=t!==a,u=null===t,l=t==t,c=as(t);if(!u&&!c&&!o&&e>t||o&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||u&&n&&i||!s&&i||!l)return-1}return 0}function Oi(e,t,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,l=t.length,c=yn(a-s,0),f=r(l+c),p=!i;++u<l;)f[u]=t[u];for(;++o<s;)(p||o<a)&&(f[n[o]]=e[o]);for(;c--;)f[u++]=e[o++];return f}function Pi(e,t,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,l=-1,c=t.length,f=yn(a-u,0),p=r(f+c),h=!i;++o<f;)p[o]=e[o];for(var d=o;++l<c;)p[d+l]=t[l];for(;++s<u;)(h||o<a)&&(p[d+n[s]]=e[o++]);return p}function Ti(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ai(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var u=t[o],l=r?r(n[u],e[u],u,n,e):a;l===a&&(l=e[u]),i?ir(n,u,l):er(n,u,l)}return n}function ki(e,t){return function(n,r){var i=qa(n)?yt:nr,o=t?t():{};return i(n,e,ao(r,2),o)}}function Ci(e){return Kr((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:a,s=i>2?n[2]:a;for(o=e.length>3&&"function"==typeof o?(i--,o):a,s&&vo(n[0],n[1],s)&&(o=i<3?a:o,i=1),t=Ae(t);++r<i;){var u=n[r];u&&e(t,u,r,o)}return t}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!Ba(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Li(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Ii(e){return function(t){var n=Xt(t=ms(t))?tn(t):a,r=n?n[0]:t.charAt(0),i=n?bi(n,1).join(""):t.slice(1);return r[e]()+i}}function ji(e){return function(t){return Pt(Xs(zs(t).replace(Ge,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Mn(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function Ri(e){return function(t,n,r){var i=Ae(t);if(!Ba(t)){var o=ao(n,3);t=ks(t),n=function(e){return o(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[o?t[s]:s]:a}}function Fi(e){return eo((function(t){var n=t.length,r=n,i=qn.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new Ne(s);if(i&&!u&&"wrapper"==io(o))var u=new qn([],!0)}for(r=u?r:n;++r<n;){var l=io(o=t[r]),c="wrapper"==l?ro(o):a;u=c&&_o(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[io(c[0])].apply(u,c[3]):1==o.length&&_o(o)?u[l]():u.thru(o)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&qa(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Ui(e,t,n,i,o,s,u,l,c,f){var p=t&h,d=1&t,g=2&t,m=24&t,y=512&t,v=g?a:Di(e);return function h(){for(var b=arguments.length,_=r(b),w=b;w--;)_[w]=arguments[w];if(m)var E=oo(h),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(_,E);if(i&&(_=Oi(_,i,o,m)),s&&(_=Pi(_,s,u,m)),b-=x,m&&b<f){var S=Zt(_,E);return Vi(e,t,Ui,h.placeholder,n,_,S,l,c,f-b)}var O=d?n:this,P=g?O[e]:e;return b=_.length,l?_=function(e,t){for(var n=e.length,r=vn(t.length,n),i=Ti(e);r--;){var o=t[r];e[r]=yo(o,n)?i[o]:a}return e}(_,l):y&&b>1&&_.reverse(),p&&c<b&&(_.length=c),this&&this!==it&&this instanceof h&&(P=v||Di(P)),P.apply(O,_)}}function $i(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Mi(e,t){return function(n,r){var i;if(n===a&&r===a)return t;if(n!==a&&(i=n),r!==a){if(i===a)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=ai(n),r=ai(r)),i=e(n,r)}return i}}function zi(e){return eo((function(t){return t=St(t,zt(ao())),Kr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function qi(e,t){var n=(t=t===a?" ":si(t)).length;if(n<2)return n?Hr(t,e):t;var r=Hr(t,cn(e/en(t)));return Xt(t)?bi(tn(r),0,e).join(""):r.slice(0,e)}function Gi(e){return function(t,n,i){return i&&"number"!=typeof i&&vo(t,n,i)&&(n=i=a),t=fs(t),n===a?(n=t,t=0):n=fs(n),function(e,t,n,i){for(var o=-1,a=yn(cn((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,i=i===a?t<n?1:-1:fs(i),e)}}function Bi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ds(t),n=ds(n)),e(t,n)}}function Vi(e,t,n,r,i,o,s,u,l,c){var h=8&t;t|=h?f:p,4&(t&=~(h?p:f))||(t&=-4);var d=[e,t,i,h?o:a,h?s:a,h?a:o,h?a:s,u,l,c],g=n.apply(a,d);return _o(e)&&Ao(g,d),g.placeholder=r,No(g,e,t)}function Wi(e){var t=Te[e];return function(e,n){if(e=ds(e),n=null==n?0:vn(ps(n),292)){var r=(ms(e)+"e").split("e");return+((r=(ms(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Hi=Pn&&1/Qt(new Pn([,-0]))[1]==g?function(e){return new Pn(e)}:au;function Ki(e){return function(t){var n=po(t);return n==T?Yt(t):n==N?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return St(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,n,i,o,u,g,m){var y=2&t;if(!y&&"function"!=typeof e)throw new Ne(s);var v=i?i.length:0;if(v||(t&=-97,i=o=a),g=g===a?g:yn(ps(g),0),m=m===a?m:ps(m),v-=o?o.length:0,t&p){var b=i,_=o;i=o=a}var w=y?a:ro(e),E=[e,t,n,i,o,b,_,u,g,m];if(w&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==h&&8==n||r==h&&n==d&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var u=e[3];e[3]=u?Oi(u,s,t[4]):s,e[4]=u?Zt(e[3],l):t[4]}(s=t[5])&&(u=e[5],e[5]=u?Pi(u,s,t[6]):s,e[6]=u?Zt(e[5],l):t[6]),(s=t[7])&&(e[7]=s),r&h&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(E,w),e=E[0],t=E[1],n=E[2],i=E[3],o=E[4],!(m=E[9]=E[9]===a?y?0:e.length:yn(E[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==c?function(e,t,n){var i=Di(e);return function o(){for(var s=arguments.length,u=r(s),l=s,c=oo(o);l--;)u[l]=arguments[l];var f=s<3&&u[0]!==c&&u[s-1]!==c?[]:Zt(u,c);return(s-=f.length)<n?Vi(e,t,Ui,o.placeholder,a,u,f,a,a,n-s):mt(this&&this!==it&&this instanceof o?i:e,this,u)}}(e,t,m):t!=f&&33!=t||o.length?Ui.apply(a,E):function(e,t,n,i){var o=1&t,a=Di(e);return function t(){for(var s=-1,u=arguments.length,l=-1,c=i.length,f=r(c+u),p=this&&this!==it&&this instanceof t?a:e;++l<c;)f[l]=i[l];for(;u--;)f[l++]=arguments[++s];return mt(p,o?n:this,f)}}(e,t,n,i);else var x=function(e,t,n){var r=1&t,i=Di(e);return function t(){return(this&&this!==it&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return No((w?Zr:Ao)(x,E),e,t)}function Yi(e,t,n,r){return e===a||Ua(e,je[n])&&!Fe.call(r,n)?t:e}function Ji(e,t,n,r,i,o){return Za(e)&&Za(t)&&(o.set(t,e),Mr(e,t,a,Ji,o),o.delete(t)),e}function Zi(e){return ns(e)?a:e}function Qi(e,t,n,r,i,o){var s=1&n,u=e.length,l=t.length;if(u!=l&&!(s&&l>u))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var f=-1,p=!0,h=2&n?new Hn:a;for(o.set(e,t),o.set(t,e);++f<u;){var d=e[f],g=t[f];if(r)var m=s?r(g,d,f,t,e,o):r(d,g,f,e,t,o);if(m!==a){if(m)continue;p=!1;break}if(h){if(!At(t,(function(e,t){if(!Gt(h,t)&&(d===e||i(d,e,n,r,o)))return h.push(t)}))){p=!1;break}}else if(d!==g&&!i(d,g,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function eo(e){return Co(Oo(e,a,Go),e+"")}function to(e){return xr(e,ks,co)}function no(e){return xr(e,Cs,fo)}var ro=kn?function(e){return kn.get(e)}:au;function io(e){for(var t=e.name+"",n=Cn[t],r=Fe.call(Cn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Fe.call($n,"placeholder")?$n:e).placeholder}function ao(){var e=$n.iteratee||nu;return e=e===nu?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var n,r,i=e.__data__;return("string"==(r=void 0===(n=t)?"undefined":o(n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=ks(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,xo(i)]}return t}function lo(e,t){var n=function(e,t){return null==e?a:e[t]}(e,t);return Ir(n)?n:a}var co=pn?function(e){return null==e?[]:(e=Ae(e),wt(pn(e),(function(t){return ut.call(e,t)})))}:hu,fo=pn?function(e){for(var t=[];e;)Ot(t,co(e)),e=ot(e);return t}:hu,po=Sr;function ho(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var a=Do(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&yo(a,i)&&(qa(e)||za(e))}function go(e){return"function"!=typeof e.constructor||Eo(e)?{}:Mn(ot(e))}function mo(e){return qa(e)||za(e)||!!(kt&&e&&e[kt])}function yo(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?m:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,n){if(!Za(n))return!1;var r=void 0===t?"undefined":o(t);return!!("number"==r?Ba(n)&&yo(t,n.length):"string"==r&&t in n)&&Ua(n[t],e)}function bo(e,t){if(qa(e))return!1;var n=void 0===e?"undefined":o(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!as(e))||re.test(e)||!ne.test(e)||null!=t&&e in Ae(t)}function _o(e){var t=io(e),n=$n[t];if("function"!=typeof n||!(t in Gn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(xn&&po(new xn(new ArrayBuffer(1)))!=R||Sn&&po(new Sn)!=T||On&&"[object Promise]"!=po(On.resolve())||Pn&&po(new Pn)!=N||Tn&&po(new Tn)!=j)&&(po=function(e){var t=Sr(e),n=t==k?e.constructor:a,r=n?Ro(n):"";if(r)switch(r){case Nn:return R;case Ln:return T;case In:return"[object Promise]";case jn:return N;case Dn:return j}return t});var wo=De?Xa:du;function Eo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function xo(e){return e==e&&!Za(e)}function So(e,t){return function(n){return null!=n&&n[e]===t&&(t!==a||e in Ae(n))}}function Oo(e,t,n){return t=yn(t===a?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=yn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(s),mt(e,this,u)}}function Po(e,t){return t.length<2?e:Er(e,ti(t,0,-1))}function To(e,t){if("__proto__"!=t)return e[t]}var Ao=Lo(Zr),ko=ln||function(e,t){return it.setTimeout(e,t)},Co=Lo(Qr);function No(e,t,n){var r=t+"";return Co(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return vt(b,(function(n){var r="_."+n[0];t&n[1]&&!Et(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(fe);return t?t[1].split(pe):[]}(r),n)))}function Lo(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(a,arguments)}}function Io(e,t){var n=-1,r=e.length,i=r-1;for(t=t===a?r:t;++n<t;){var o=Wr(n,i),s=e[o];e[o]=e[n],e[n]=s}return e.length=t,e}var jo=function(e){var t=La((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ie,(function(e,n,r,i){t.push(r?i.replace(de,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}();function Do(e){if("string"==typeof e||as(e))return e;var t=e+"";return"0"==t&&1/e==-g?"-0":t}function Ro(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof Gn)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Uo=Kr((function(e,t){return Va(e)?cr(e,mr(t,1,Va,!0)):[]})),$o=Kr((function(e,t){var n=Ko(t);return Va(n)&&(n=a),Va(e)?cr(e,mr(t,1,Va,!0),ao(n,2)):[]})),Mo=Kr((function(e,t){var n=Ko(t);return Va(n)&&(n=a),Va(e)?cr(e,mr(t,1,Va,!0),a,n):[]}));function zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=yn(r+i,0)),Nt(e,ao(t,3),i)}function qo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==a&&(i=ps(n),i=n<0?yn(r+i,0):vn(i,r-1)),Nt(e,ao(t,3),i,!0)}function Go(e){return null!=e&&e.length?mr(e,1):[]}function Bo(e){return e&&e.length?e[0]:a}var Vo=Kr((function(e){var t=St(e,gi);return t.length&&t[0]===e[0]?Ar(t):[]})),Wo=Kr((function(e){var t=Ko(e),n=St(e,gi);return t===Ko(n)?t=a:n.pop(),n.length&&n[0]===e[0]?Ar(n,ao(t,2)):[]})),Ho=Kr((function(e){var t=Ko(e),n=St(e,gi);return(t="function"==typeof t?t:a)&&n.pop(),n.length&&n[0]===e[0]?Ar(n,a,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:a}var Xo=Kr(Yo);function Yo(e,t){return e&&e.length&&t&&t.length?Br(e,t):e}var Jo=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Vr(e,St(t,(function(e){return yo(e,n)?+e:e})).sort(Si)),r}));function Zo(e){return null==e?e:En.call(e)}var Qo=Kr((function(e){return ui(mr(e,1,Va,!0))})),ea=Kr((function(e){var t=Ko(e);return Va(t)&&(t=a),ui(mr(e,1,Va,!0),ao(t,2))})),ta=Kr((function(e){var t=Ko(e);return t="function"==typeof t?t:a,ui(mr(e,1,Va,!0),a,t)}));function na(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Va(e))return t=yn(e.length,t),!0})),Mt(t,(function(t){return St(e,Rt(t))}))}function ra(e,t){if(!e||!e.length)return[];var n=na(e);return null==t?n:St(n,(function(e){return mt(t,a,e)}))}var ia=Kr((function(e,t){return Va(e)?cr(e,t):[]})),oa=Kr((function(e){return hi(wt(e,Va))})),aa=Kr((function(e){var t=Ko(e);return Va(t)&&(t=a),hi(wt(e,Va),ao(t,2))})),sa=Kr((function(e){var t=Ko(e);return t="function"==typeof t?t:a,hi(wt(e,Va),a,t)})),ua=Kr(na),la=Kr((function(e){var t=e.length,n=t>1?e[t-1]:a;return n="function"==typeof n?(e.pop(),n):a,ra(e,n)}));function ca(e){var t=$n(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var pa=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Gn&&yo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:a}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e}))):this.thru(i)})),ha=ki((function(e,t,n){Fe.call(e,n)?++e[n]:ir(e,n,1)})),da=Ri(zo),ga=Ri(qo);function ma(e,t){return(qa(e)?vt:fr)(e,ao(t,3))}function ya(e,t){return(qa(e)?bt:pr)(e,ao(t,3))}var va=ki((function(e,t,n){Fe.call(e,n)?e[n].push(t):ir(e,n,[t])})),ba=Kr((function(e,t,n){var i=-1,o="function"==typeof t,a=Ba(e)?r(e.length):[];return fr(e,(function(e){a[++i]=o?mt(t,e,n):kr(e,t,n)})),a})),_a=ki((function(e,t,n){ir(e,n,t)}));function wa(e,t){return(qa(e)?St:Fr)(e,ao(t,3))}var Ea=ki((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),xa=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vo(e,t[0],t[1])?t=[]:n>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,mr(t,1),[])})),Sa=un||function(){return it.Date.now()};function Oa(e,t,n){return t=n?a:t,t=e&&null==t?e.length:t,Xi(e,h,a,a,a,a,t)}function Pa(e,t){var n;if("function"!=typeof t)throw new Ne(s);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=a),n}}var Ta=Kr((function(e,t,n){var r=1;if(n.length){var i=Zt(n,oo(Ta));r|=f}return Xi(e,r,t,n,i)})),Aa=Kr((function(e,t,n){var r=3;if(n.length){var i=Zt(n,oo(Aa));r|=f}return Xi(t,r,e,n,i)}));function ka(e,t,n){var r,i,o,u,l,c,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new Ne(s);function g(t){var n=r,o=i;return r=i=a,f=t,u=e.apply(o,n)}function m(e){var n=e-c;return c===a||n>=t||n<0||h&&e-f>=o}function y(){var e=Sa();if(m(e))return v(e);l=ko(y,function(e){var n=t-(e-c);return h?vn(n,o-(e-f)):n}(e))}function v(e){return l=a,d&&r?g(e):(r=i=a,u)}function b(){var e=Sa(),n=m(e);if(r=arguments,i=this,c=e,n){if(l===a)return function(e){return f=e,l=ko(y,t),p?g(e):u}(c);if(h)return l=ko(y,t),g(c)}return l===a&&(l=ko(y,t)),u}return t=ds(t)||0,Za(n)&&(p=!!n.leading,o=(h="maxWait"in n)?yn(ds(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){l!==a&&_i(l),f=0,r=c=i=l=a},b.flush=function(){return l===a?u:v(Sa())},b}var Ca=Kr((function(e,t){return lr(e,1,t)})),Na=Kr((function(e,t,n){return lr(e,ds(t)||0,n)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(s);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(La.Cache||Wn),n}function Ia(e){if("function"!=typeof e)throw new Ne(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=Wn;var ja=vi((function(e,t){var n=(t=1==t.length&&qa(t[0])?St(t[0],zt(ao())):St(mr(t,1),zt(ao()))).length;return Kr((function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return mt(e,this,r)}))})),Da=Kr((function(e,t){var n=Zt(t,oo(Da));return Xi(e,f,a,t,n)})),Ra=Kr((function(e,t){var n=Zt(t,oo(Ra));return Xi(e,p,a,t,n)})),Fa=eo((function(e,t){return Xi(e,d,a,a,a,t)}));function Ua(e,t){return e===t||e!=e&&t!=t}var $a=Bi(Or),Ma=Bi((function(e,t){return e>=t})),za=Cr(function(){return arguments}())?Cr:function(e){return Qa(e)&&Fe.call(e,"callee")&&!ut.call(e,"callee")},qa=r.isArray,Ga=ct?zt(ct):function(e){return Qa(e)&&Sr(e)==D};function Ba(e){return null!=e&&Ja(e.length)&&!Xa(e)}function Va(e){return Qa(e)&&Ba(e)}var Wa=hn||du,Ha=ft?zt(ft):function(e){return Qa(e)&&Sr(e)==x};function Ka(e){if(!Qa(e))return!1;var t=Sr(e);return t==S||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Xa(e){if(!Za(e))return!1;var t=Sr(e);return t==O||t==P||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ya(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=m}function Za(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)}function Qa(e){return null!=e&&"object"==(void 0===e?"undefined":o(e))}var es=pt?zt(pt):function(e){return Qa(e)&&po(e)==T};function ts(e){return"number"==typeof e||Qa(e)&&Sr(e)==A}function ns(e){if(!Qa(e)||Sr(e)!=k)return!1;var t=ot(e);if(null===t)return!0;var n=Fe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==ze}var rs=ht?zt(ht):function(e){return Qa(e)&&Sr(e)==C},is=dt?zt(dt):function(e){return Qa(e)&&po(e)==N};function os(e){return"string"==typeof e||!qa(e)&&Qa(e)&&Sr(e)==L}function as(e){return"symbol"==(void 0===e?"undefined":o(e))||Qa(e)&&Sr(e)==I}var ss=gt?zt(gt):function(e){return Qa(e)&&Ja(e.length)&&!!Je[Sr(e)]},us=Bi(Rr),ls=Bi((function(e,t){return e<=t}));function cs(e){if(!e)return[];if(Ba(e))return os(e)?tn(e):Ti(e);if(Ft&&e[Ft])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ft]());var t=po(e);return(t==T?Yt:t==N?Qt:Us)(e)}function fs(e){return e?(e=ds(e))===g||e===-g?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ps(e){var t=fs(e),n=t%1;return t==t?n?t-n:t:0}function hs(e){return e?ar(ps(e),0,v):0}function ds(e){if("number"==typeof e)return e;if(as(e))return y;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(se,"");var n=ve.test(e);return n||_e.test(e)?tt(e.slice(2),n?2:8):ye.test(e)?y:+e}function gs(e){return Ai(e,Cs(e))}function ms(e){return null==e?"":si(e)}var ys=Ci((function(e,t){if(Eo(t)||Ba(t))Ai(t,ks(t),e);else for(var n in t)Fe.call(t,n)&&er(e,n,t[n])})),vs=Ci((function(e,t){Ai(t,Cs(t),e)})),bs=Ci((function(e,t,n,r){Ai(t,Cs(t),e,r)})),_s=Ci((function(e,t,n,r){Ai(t,ks(t),e,r)})),ws=eo(or),Es=Kr((function(e,t){e=Ae(e);var n=-1,r=t.length,i=r>2?t[2]:a;for(i&&vo(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],s=Cs(o),u=-1,l=s.length;++u<l;){var c=s[u],f=e[c];(f===a||Ua(f,je[c])&&!Fe.call(e,c))&&(e[c]=o[c])}return e})),xs=Kr((function(e){return e.push(a,Ji),mt(Ls,a,e)}));function Ss(e,t,n){var r=null==e?a:Er(e,t);return r===a?n:r}function Os(e,t){return null!=e&&ho(e,t,Tr)}var Ps=$i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),e[t]=n}),Zs(tu)),Ts=$i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),Fe.call(e,t)?e[t].push(n):e[t]=[n]}),ao),As=Kr(kr);function ks(e){return Ba(e)?Xn(e):Dr(e)}function Cs(e){return Ba(e)?Xn(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=Eo(e),n=[];for(var r in e)("constructor"!=r||!t&&Fe.call(e,r))&&n.push(r);return n}(e)}var Ns=Ci((function(e,t,n){Mr(e,t,n)})),Ls=Ci((function(e,t,n,r){Mr(e,t,n,r)})),Is=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=St(t,(function(t){return t=yi(t,e),r||(r=t.length>1),t})),Ai(e,no(e),n),r&&(n=sr(n,7,Zi));for(var i=t.length;i--;)li(n,t[i]);return n})),js=eo((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return Os(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=St(no(e),(function(e){return[e]}));return t=ao(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Rs=Ki(ks),Fs=Ki(Cs);function Us(e){return null==e?[]:qt(e,ks(e))}var $s=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?Ms(t):t)}));function Ms(e){return Ks(ms(e).toLowerCase())}function zs(e){return(e=ms(e))&&e.replace(Ee,Wt).replace(Be,"")}var qs=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Bs=Ii("toLowerCase"),Vs=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ws=ji((function(e,t,n){return e+(n?" ":"")+Ks(t)})),Hs=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ks=Ii("toUpperCase");function Xs(e,t,n){return e=ms(e),(t=n?a:t)===a?function(e){return Ke.test(e)}(e)?function(e){return e.match(We)||[]}(e):function(e){return e.match(he)||[]}(e):e.match(t)||[]}var Ys=Kr((function(e,t){try{return mt(e,a,t)}catch(e){return Ka(e)?e:new Oe(e)}})),Js=eo((function(e,t){return vt(t,(function(t){t=Do(t),ir(e,t,Ta(e[t],e))})),e}));function Zs(e){return function(){return e}}var Qs=Fi(),eu=Fi(!0);function tu(e){return e}function nu(e){return jr("function"==typeof e?e:sr(e,1))}var ru=Kr((function(e,t){return function(n){return kr(n,e,t)}})),iu=Kr((function(e,t){return function(n){return kr(e,n,t)}}));function ou(e,t,n){var r=ks(t),i=wr(t,r);null!=n||Za(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,ks(t)));var o=!(Za(n)&&"chain"in n&&!n.chain),a=Xa(e);return vt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})})),e}function au(){}var su=zi(St),uu=zi(_t),lu=zi(At);function cu(e){return bo(e)?Rt(Do(e)):function(e){return function(t){return Er(t,e)}}(e)}var fu=Gi(),pu=Gi(!0);function hu(){return[]}function du(){return!1}var gu,mu=Mi((function(e,t){return e+t}),0),yu=Wi("ceil"),vu=Mi((function(e,t){return e/t}),1),bu=Wi("floor"),_u=Mi((function(e,t){return e*t}),1),wu=Wi("round"),Eu=Mi((function(e,t){return e-t}),0);return $n.after=function(e,t){if("function"!=typeof t)throw new Ne(s);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},$n.ary=Oa,$n.assign=ys,$n.assignIn=vs,$n.assignInWith=bs,$n.assignWith=_s,$n.at=ws,$n.before=Pa,$n.bind=Ta,$n.bindAll=Js,$n.bindKey=Aa,$n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},$n.chain=ca,$n.chunk=function(e,t,n){t=(n?vo(e,t,n):t===a)?1:yn(ps(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,u=r(cn(i/t));o<i;)u[s++]=ti(e,o,o+=t);return u},$n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},$n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ot(qa(n)?Ti(n):[n],mr(t,1))},$n.cond=function(e){var t=null==e?0:e.length,n=ao();return e=t?St(e,(function(e){if("function"!=typeof e[1])throw new Ne(s);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(mt(i[0],this,n))return mt(i[1],this,n)}}))},$n.conforms=function(e){return function(e){var t=ks(e);return function(n){return ur(n,e,t)}}(sr(e,1))},$n.constant=Zs,$n.countBy=ha,$n.create=function(e,t){var n=Mn(e);return null==t?n:rr(n,t)},$n.curry=function e(t,n,r){var i=Xi(t,8,a,a,a,a,a,n=r?a:n);return i.placeholder=e.placeholder,i},$n.curryRight=function e(t,n,r){var i=Xi(t,c,a,a,a,a,a,n=r?a:n);return i.placeholder=e.placeholder,i},$n.debounce=ka,$n.defaults=Es,$n.defaultsDeep=xs,$n.defer=Ca,$n.delay=Na,$n.difference=Uo,$n.differenceBy=$o,$n.differenceWith=Mo,$n.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===a?1:ps(t))<0?0:t,r):[]},$n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===a?1:ps(t)))<0?0:t):[]},$n.dropRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0,!0):[]},$n.dropWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0):[]},$n.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&vo(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ps(n))<0&&(n=-n>i?0:i+n),(r=r===a||r>i?i:ps(r))<0&&(r+=i),r=n>r?0:hs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},$n.filter=function(e,t){return(qa(e)?wt:gr)(e,ao(t,3))},$n.flatMap=function(e,t){return mr(wa(e,t),1)},$n.flatMapDeep=function(e,t){return mr(wa(e,t),g)},$n.flatMapDepth=function(e,t,n){return n=n===a?1:ps(n),mr(wa(e,t),n)},$n.flatten=Go,$n.flattenDeep=function(e){return null!=e&&e.length?mr(e,g):[]},$n.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===a?1:ps(t)):[]},$n.flip=function(e){return Xi(e,512)},$n.flow=Qs,$n.flowRight=eu,$n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},$n.functions=function(e){return null==e?[]:wr(e,ks(e))},$n.functionsIn=function(e){return null==e?[]:wr(e,Cs(e))},$n.groupBy=va,$n.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},$n.intersection=Vo,$n.intersectionBy=Wo,$n.intersectionWith=Ho,$n.invert=Ps,$n.invertBy=Ts,$n.invokeMap=ba,$n.iteratee=nu,$n.keyBy=_a,$n.keys=ks,$n.keysIn=Cs,$n.map=wa,$n.mapKeys=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},$n.mapValues=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},$n.matches=function(e){return Ur(sr(e,1))},$n.matchesProperty=function(e,t){return $r(e,sr(t,1))},$n.memoize=La,$n.merge=Ns,$n.mergeWith=Ls,$n.method=ru,$n.methodOf=iu,$n.mixin=ou,$n.negate=Ia,$n.nthArg=function(e){return e=ps(e),Kr((function(t){return zr(t,e)}))},$n.omit=Is,$n.omitBy=function(e,t){return Ds(e,Ia(ao(t)))},$n.once=function(e){return Pa(2,e)},$n.orderBy=function(e,t,n,r){return null==e?[]:(qa(t)||(t=null==t?[]:[t]),qa(n=r?a:n)||(n=null==n?[]:[n]),qr(e,t,n))},$n.over=su,$n.overArgs=ja,$n.overEvery=uu,$n.overSome=lu,$n.partial=Da,$n.partialRight=Ra,$n.partition=Ea,$n.pick=js,$n.pickBy=Ds,$n.property=cu,$n.propertyOf=function(e){return function(t){return null==e?a:Er(e,t)}},$n.pull=Xo,$n.pullAll=Yo,$n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Br(e,t,ao(n,2)):e},$n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Br(e,t,a,n):e},$n.pullAt=Jo,$n.range=fu,$n.rangeRight=pu,$n.rearg=Fa,$n.reject=function(e,t){return(qa(e)?wt:gr)(e,Ia(ao(t,3)))},$n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=ao(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Vr(e,i),n},$n.rest=function(e,t){if("function"!=typeof e)throw new Ne(s);return Kr(e,t=t===a?t:ps(t))},$n.reverse=Zo,$n.sampleSize=function(e,t,n){return t=(n?vo(e,t,n):t===a)?1:ps(t),(qa(e)?Jn:Yr)(e,t)},$n.set=function(e,t,n){return null==e?e:Jr(e,t,n)},$n.setWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:Jr(e,t,n,r)},$n.shuffle=function(e){return(qa(e)?Zn:ei)(e)},$n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&vo(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===a?r:ps(n)),ti(e,t,n)):[]},$n.sortBy=xa,$n.sortedUniq=function(e){return e&&e.length?oi(e):[]},$n.sortedUniqBy=function(e,t){return e&&e.length?oi(e,ao(t,2)):[]},$n.split=function(e,t,n){return n&&"number"!=typeof n&&vo(e,t,n)&&(t=n=a),(n=n===a?v:n>>>0)?(e=ms(e))&&("string"==typeof t||null!=t&&!rs(t))&&!(t=si(t))&&Xt(e)?bi(tn(e),0,n):e.split(t,n):[]},$n.spread=function(e,t){if("function"!=typeof e)throw new Ne(s);return t=null==t?0:yn(ps(t),0),Kr((function(n){var r=n[t],i=bi(n,0,t);return r&&Ot(i,r),mt(e,this,i)}))},$n.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},$n.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===a?1:ps(t))<0?0:t):[]},$n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===a?1:ps(t)))<0?0:t,r):[]},$n.takeRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!1,!0):[]},$n.takeWhile=function(e,t){return e&&e.length?fi(e,ao(t,3)):[]},$n.tap=function(e,t){return t(e),e},$n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ne(s);return Za(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ka(e,t,{leading:r,maxWait:t,trailing:i})},$n.thru=fa,$n.toArray=cs,$n.toPairs=Rs,$n.toPairsIn=Fs,$n.toPath=function(e){return qa(e)?St(e,Do):as(e)?[e]:Ti(jo(ms(e)))},$n.toPlainObject=gs,$n.transform=function(e,t,n){var r=qa(e),i=r||Wa(e)||ss(e);if(t=ao(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Za(e)&&Xa(o)?Mn(ot(e)):{}}return(i?vt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},$n.unary=function(e){return Oa(e,1)},$n.union=Qo,$n.unionBy=ea,$n.unionWith=ta,$n.uniq=function(e){return e&&e.length?ui(e):[]},$n.uniqBy=function(e,t){return e&&e.length?ui(e,ao(t,2)):[]},$n.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?ui(e,a,t):[]},$n.unset=function(e,t){return null==e||li(e,t)},$n.unzip=na,$n.unzipWith=ra,$n.update=function(e,t,n){return null==e?e:ci(e,t,mi(n))},$n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:ci(e,t,mi(n),r)},$n.values=Us,$n.valuesIn=function(e){return null==e?[]:qt(e,Cs(e))},$n.without=ia,$n.words=Xs,$n.wrap=function(e,t){return Da(mi(t),e)},$n.xor=oa,$n.xorBy=aa,$n.xorWith=sa,$n.zip=ua,$n.zipObject=function(e,t){return di(e||[],t||[],er)},$n.zipObjectDeep=function(e,t){return di(e||[],t||[],Jr)},$n.zipWith=la,$n.entries=Rs,$n.entriesIn=Fs,$n.extend=vs,$n.extendWith=bs,ou($n,$n),$n.add=mu,$n.attempt=Ys,$n.camelCase=$s,$n.capitalize=Ms,$n.ceil=yu,$n.clamp=function(e,t,n){return n===a&&(n=t,t=a),n!==a&&(n=(n=ds(n))==n?n:0),t!==a&&(t=(t=ds(t))==t?t:0),ar(ds(e),t,n)},$n.clone=function(e){return sr(e,4)},$n.cloneDeep=function(e){return sr(e,5)},$n.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:a)},$n.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:a)},$n.conformsTo=function(e,t){return null==t||ur(e,t,ks(t))},$n.deburr=zs,$n.defaultTo=function(e,t){return null==e||e!=e?t:e},$n.divide=vu,$n.endsWith=function(e,t,n){e=ms(e),t=si(t);var r=e.length,i=n=n===a?r:ar(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},$n.eq=Ua,$n.escape=function(e){return(e=ms(e))&&Z.test(e)?e.replace(Y,Ht):e},$n.escapeRegExp=function(e){return(e=ms(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},$n.every=function(e,t,n){var r=qa(e)?_t:hr;return n&&vo(e,t,n)&&(t=a),r(e,ao(t,3))},$n.find=da,$n.findIndex=zo,$n.findKey=function(e,t){return Ct(e,ao(t,3),br)},$n.findLast=ga,$n.findLastIndex=qo,$n.findLastKey=function(e,t){return Ct(e,ao(t,3),_r)},$n.floor=bu,$n.forEach=ma,$n.forEachRight=ya,$n.forIn=function(e,t){return null==e?e:yr(e,ao(t,3),Cs)},$n.forInRight=function(e,t){return null==e?e:vr(e,ao(t,3),Cs)},$n.forOwn=function(e,t){return e&&br(e,ao(t,3))},$n.forOwnRight=function(e,t){return e&&_r(e,ao(t,3))},$n.get=Ss,$n.gt=$a,$n.gte=Ma,$n.has=function(e,t){return null!=e&&ho(e,t,Pr)},$n.hasIn=Os,$n.head=Bo,$n.identity=tu,$n.includes=function(e,t,n,r){e=Ba(e)?e:Us(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),os(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Lt(e,t,n)>-1},$n.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=yn(r+i,0)),Lt(e,t,i)},$n.inRange=function(e,t,n){return t=fs(t),n===a?(n=t,t=0):n=fs(n),function(e,t,n){return e>=vn(t,n)&&e<yn(t,n)}(e=ds(e),t,n)},$n.invoke=As,$n.isArguments=za,$n.isArray=qa,$n.isArrayBuffer=Ga,$n.isArrayLike=Ba,$n.isArrayLikeObject=Va,$n.isBoolean=function(e){return!0===e||!1===e||Qa(e)&&Sr(e)==E},$n.isBuffer=Wa,$n.isDate=Ha,$n.isElement=function(e){return Qa(e)&&1===e.nodeType&&!ns(e)},$n.isEmpty=function(e){if(null==e)return!0;if(Ba(e)&&(qa(e)||"string"==typeof e||"function"==typeof e.splice||Wa(e)||ss(e)||za(e)))return!e.length;var t=po(e);if(t==T||t==N)return!e.size;if(Eo(e))return!Dr(e).length;for(var n in e)if(Fe.call(e,n))return!1;return!0},$n.isEqual=function(e,t){return Nr(e,t)},$n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:a)?n(e,t):a;return r===a?Nr(e,t,a,n):!!r},$n.isError=Ka,$n.isFinite=function(e){return"number"==typeof e&&dn(e)},$n.isFunction=Xa,$n.isInteger=Ya,$n.isLength=Ja,$n.isMap=es,$n.isMatch=function(e,t){return e===t||Lr(e,t,uo(t))},$n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:a,Lr(e,t,uo(t),n)},$n.isNaN=function(e){return ts(e)&&e!=+e},$n.isNative=function(e){if(wo(e))throw new Oe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(e)},$n.isNil=function(e){return null==e},$n.isNull=function(e){return null===e},$n.isNumber=ts,$n.isObject=Za,$n.isObjectLike=Qa,$n.isPlainObject=ns,$n.isRegExp=rs,$n.isSafeInteger=function(e){return Ya(e)&&e>=-m&&e<=m},$n.isSet=is,$n.isString=os,$n.isSymbol=as,$n.isTypedArray=ss,$n.isUndefined=function(e){return e===a},$n.isWeakMap=function(e){return Qa(e)&&po(e)==j},$n.isWeakSet=function(e){return Qa(e)&&"[object WeakSet]"==Sr(e)},$n.join=function(e,t){return null==e?"":gn.call(e,t)},$n.kebabCase=qs,$n.last=Ko,$n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==a&&(i=(i=ps(n))<0?yn(r+i,0):vn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Nt(e,jt,i,!0)},$n.lowerCase=Gs,$n.lowerFirst=Bs,$n.lt=us,$n.lte=ls,$n.max=function(e){return e&&e.length?dr(e,tu,Or):a},$n.maxBy=function(e,t){return e&&e.length?dr(e,ao(t,2),Or):a},$n.mean=function(e){return Dt(e,tu)},$n.meanBy=function(e,t){return Dt(e,ao(t,2))},$n.min=function(e){return e&&e.length?dr(e,tu,Rr):a},$n.minBy=function(e,t){return e&&e.length?dr(e,ao(t,2),Rr):a},$n.stubArray=hu,$n.stubFalse=du,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=_u,$n.nth=function(e,t){return e&&e.length?zr(e,ps(t)):a},$n.noConflict=function(){return it._===this&&(it._=qe),this},$n.noop=au,$n.now=Sa,$n.pad=function(e,t,n){e=ms(e);var r=(t=ps(t))?en(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(fn(i),n)+e+qi(cn(i),n)},$n.padEnd=function(e,t,n){e=ms(e);var r=(t=ps(t))?en(e):0;return t&&r<t?e+qi(t-r,n):e},$n.padStart=function(e,t,n){e=ms(e);var r=(t=ps(t))?en(e):0;return t&&r<t?qi(t-r,n)+e:e},$n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(ms(e).replace(ue,""),t||0)},$n.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vo(e,t,n)&&(t=n=a),n===a&&("boolean"==typeof t?(n=t,t=a):"boolean"==typeof e&&(n=e,e=a)),e===a&&t===a?(e=0,t=1):(e=fs(e),t===a?(t=e,e=0):t=fs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=wn();return vn(e+i*(t-e+et("1e-"+((i+"").length-1))),t)}return Wr(e,t)},$n.reduce=function(e,t,n){var r=qa(e)?Pt:Ut,i=arguments.length<3;return r(e,ao(t,4),n,i,fr)},$n.reduceRight=function(e,t,n){var r=qa(e)?Tt:Ut,i=arguments.length<3;return r(e,ao(t,4),n,i,pr)},$n.repeat=function(e,t,n){return t=(n?vo(e,t,n):t===a)?1:ps(t),Hr(ms(e),t)},$n.replace=function(){var e=arguments,t=ms(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$n.result=function(e,t,n){var r=-1,i=(t=yi(t,e)).length;for(i||(i=1,e=a);++r<i;){var o=null==e?a:e[Do(t[r])];o===a&&(r=i,o=n),e=Xa(o)?o.call(e):o}return e},$n.round=wu,$n.runInContext=e,$n.sample=function(e){return(qa(e)?Yn:Xr)(e)},$n.size=function(e){if(null==e)return 0;if(Ba(e))return os(e)?en(e):e.length;var t=po(e);return t==T||t==N?e.size:Dr(e).length},$n.snakeCase=Vs,$n.some=function(e,t,n){var r=qa(e)?At:ni;return n&&vo(e,t,n)&&(t=a),r(e,ao(t,3))},$n.sortedIndex=function(e,t){return ri(e,t)},$n.sortedIndexBy=function(e,t,n){return ii(e,t,ao(n,2))},$n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&Ua(e[r],t))return r}return-1},$n.sortedLastIndex=function(e,t){return ri(e,t,!0)},$n.sortedLastIndexBy=function(e,t,n){return ii(e,t,ao(n,2),!0)},$n.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(Ua(e[n],t))return n}return-1},$n.startCase=Ws,$n.startsWith=function(e,t,n){return e=ms(e),n=null==n?0:ar(ps(n),0,e.length),t=si(t),e.slice(n,n+t.length)==t},$n.subtract=Eu,$n.sum=function(e){return e&&e.length?$t(e,tu):0},$n.sumBy=function(e,t){return e&&e.length?$t(e,ao(t,2)):0},$n.template=function(e,t,n){var r=$n.templateSettings;n&&vo(e,t,n)&&(t=a),e=ms(e),t=bs({},t,r,Yi);var i,o,s=bs({},t.imports,r.imports,Yi),u=ks(s),l=qt(s,u),c=0,f=t.interpolate||xe,p="__p += '",h=ke((t.escape||xe).source+"|"+f.source+"|"+(f===te?ge:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),d="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Ye+"]")+"\n";e.replace(h,(function(t,n,r,a,s,u){return r||(r=a),p+=e.slice(c,u).replace(Se,Kt),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(o=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),p+="';\n";var g=t.variable;g||(p="with (obj) {\n"+p+"\n}\n"),p=(o?p.replace(W,""):p).replace(H,"$1").replace(K,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=Ys((function(){return Pe(u,d+"return "+p).apply(a,l)}));if(m.source=p,Ka(m))throw m;return m},$n.times=function(e,t){if((e=ps(e))<1||e>m)return[];var n=v,r=vn(e,v);t=ao(t),e-=v;for(var i=Mt(r,t);++n<e;)t(n);return i},$n.toFinite=fs,$n.toInteger=ps,$n.toLength=hs,$n.toLower=function(e){return ms(e).toLowerCase()},$n.toNumber=ds,$n.toSafeInteger=function(e){return e?ar(ps(e),-m,m):0===e?e:0},$n.toString=ms,$n.toUpper=function(e){return ms(e).toUpperCase()},$n.trim=function(e,t,n){if((e=ms(e))&&(n||t===a))return e.replace(se,"");if(!e||!(t=si(t)))return e;var r=tn(e),i=tn(t);return bi(r,Bt(r,i),Vt(r,i)+1).join("")},$n.trimEnd=function(e,t,n){if((e=ms(e))&&(n||t===a))return e.replace(le,"");if(!e||!(t=si(t)))return e;var r=tn(e);return bi(r,0,Vt(r,tn(t))+1).join("")},$n.trimStart=function(e,t,n){if((e=ms(e))&&(n||t===a))return e.replace(ue,"");if(!e||!(t=si(t)))return e;var r=tn(e);return bi(r,Bt(r,tn(t))).join("")},$n.truncate=function(e,t){var n=30,r="...";if(Za(t)){var i="separator"in t?t.separator:i;n="length"in t?ps(t.length):n,r="omission"in t?si(t.omission):r}var o=(e=ms(e)).length;if(Xt(e)){var s=tn(e);o=s.length}if(n>=o)return e;var u=n-en(r);if(u<1)return r;var l=s?bi(s,0,u).join(""):e.slice(0,u);if(i===a)return l+r;if(s&&(u+=l.length-u),rs(i)){if(e.slice(u).search(i)){var c,f=l;for(i.global||(i=ke(i.source,ms(me.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var p=c.index;l=l.slice(0,p===a?u:p)}}else if(e.indexOf(si(i),u)!=u){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+r},$n.unescape=function(e){return(e=ms(e))&&J.test(e)?e.replace(X,nn):e},$n.uniqueId=function(e){var t=++Ue;return ms(e)+t},$n.upperCase=Hs,$n.upperFirst=Ks,$n.each=ma,$n.eachRight=ya,$n.first=Bo,ou($n,(gu={},br($n,(function(e,t){Fe.call($n.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),$n.VERSION="4.17.11",vt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$n[e].placeholder=$n})),vt(["drop","take"],(function(e,t){Gn.prototype[e]=function(n){n=n===a?1:yn(ps(n),0);var r=this.__filtered__&&!t?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,v),type:e+(r.__dir__<0?"Right":"")}),r},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),vt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ao(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),vt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),vt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(tu)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return kr(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(Ia(ao(e)))},Gn.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Gn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==a&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(v)},br(Gn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=$n[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&($n.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Gn,l=s[0],c=u||qa(t),f=function(e){var t=i.apply($n,Ot([e],s));return r&&p?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var p=this.__chain__,h=!!this.__actions__.length,d=o&&!p,g=u&&!h;if(!o&&c){t=g?t:new Gn(this);var m=e.apply(t,s);return m.__actions__.push({func:fa,args:[f],thisArg:a}),new qn(m,p)}return d&&g?e.apply(this,s):(m=this.thru(f),d?r?m.value()[0]:m.value():m)})})),vt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Le[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);$n.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(qa(i)?i:[],e)}return this[n]((function(n){return t.apply(qa(n)?n:[],e)}))}})),br(Gn.prototype,(function(e,t){var n=$n[t];if(n){var r=n.name+"";(Cn[r]||(Cn[r]=[])).push({name:t,func:n})}})),Cn[Ui(a,2).name]=[{name:"wrapper",func:a}],Gn.prototype.clone=function(){var e=new Gn(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=vn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,f=c.length,p=0,h=vn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var g=-1,m=e[l+=t];++g<f;){var y=c[g],v=y.iteratee,b=y.type,_=v(m);if(2==b)m=_;else if(!_){if(1==b)continue e;break e}}d[p++]=m}return d},$n.prototype.at=pa,$n.prototype.chain=function(){return ca(this)},$n.prototype.commit=function(){return new qn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===a&&(this.__values__=cs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},$n.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Fo(n);r.__index__=0,r.__values__=a,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},$n.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[Zo],thisArg:a}),new qn(t,this.__chain__)}return this.thru(Zo)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,Ft&&($n.prototype[Ft]=function(){return this}),$n}();"object"==o(n(3))&&n(3)?(it._=rn,(i=function(){return rn}.call(t,n,t,r))===a||(r.exports=i)):at?((at.exports=rn)._=rn,ot._=rn):it._=rn}).call(void 0)}).call(this,n(1),n(8)(e))},function(e,t,n){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(0),i=n(10);e.exports=function(e,t,n,r){return function(e,t,n,r){var o,a,s={},u=new i,l=function(e){var t=e.v!==o?e.v:e.w,r=s[t],i=n(e),l=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=o,u.decrease(t,l))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(l);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},function(e,t,n){var r=n(0);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))},i.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},i.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,i=n[e],o=n[t];n[e]=o,n[t]=i,r[o.key]=e,r[i.key]=t}},function(e,t,n){var r=n(0);e.exports=function(e){var t=0,n=[],i={},o=[];return e.nodes().forEach((function(a){r.has(i,a)||function a(s){var u=i[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(i,e)?i[e].onStack&&(u.lowlink=Math.min(u.lowlink,i[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,i[e].lowlink))})),u.lowlink===u.index){var l,c=[];do{l=n.pop(),i[l].onStack=!1,c.push(l)}while(s!==l);o.push(c)}}(a)})),o}},function(e,t,n){var r=n(0);function i(e){var t={},n={},i=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],i.push(s))})),r.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o},function(e,t,n){var r=n(0);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,i,o,a,s){r.has(o,n)||(o[n]=!0,i||s.push(n),r.each(a(n),(function(n){e(t,n,i,o,a,s)})),i&&s.push(n))}(e,t,"post"===n,a,i,o)})),o}},function(e,t,n){(function(t){var r=n(37),i=["delete","get","head","patch","post","put"];e.exports.load=function(e,n,o){var a,s,u=n.method?n.method.toLowerCase():"get";function l(e,n){e?o(e):("[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&"function"==typeof n.buffer&&n.buffer(!0),n.end((function(e,t){e?o(e):o(void 0,t)})))}if(void 0!==n.method?"string"!=typeof n.method?a=new TypeError("options.method must be a string"):-1===i.indexOf(n.method)&&(a=new TypeError("options.method must be one of the following: "+i.slice(0,i.length-1).join(", ")+" or "+i[i.length-1])):void 0!==n.prepareRequest&&"function"!=typeof n.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)o(a);else if(s=r["delete"===u?"del":u](e),n.prepareRequest)try{n.prepareRequest(s,l)}catch(e){o(e)}else l(void 0,s)}}).call(this,n(2))},function(e,t,n){var r="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.exports=function(e){return null!==e&&"object"===(void 0===e?"undefined":r(e))}},function(e,t,n){(function(r,i){var o,a,s,u,l="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};
1
+ function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function o(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let i,a;function s(){}const u=(c=function(){return function(e){var t=e();if(t&&t.then)return t.then(s)}((function(){if(!i)return e=import("path"),t=function(e){({dirname:i}=e)},n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e);var e,t,n}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(c.apply(this,e))}catch(e){return Promise.reject(e)}});var c;function l(e){return t=i(new URL(e).pathname),a||(a="win32"===process.platform),t.slice(a?1:0);var t}function f(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let p;function d(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const h=function({baseURL:e,cwd:t}={}){const n="undefined"!=typeof fetch?fetch:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(n){let r=!1;return d((function(){if(/^https?:/u.test(n))return d((function(){if(!p)return f(import("node-fetch"),(function(e){p=e}))}),(function(){const e=p.default(n);return r=!0,e}))}),(function(o){return r?o:d((function(){if(!t)return function(e,t,n){if(n)return t?t(e()):e();try{var r=Promise.resolve(e());return t?r.then(t):r}catch(e){return Promise.reject(e)}}(u,(function(){t=e?l(e):"undefined"==typeof fetch&&process.cwd()}))}),(function(){return f(import("local-xmlhttprequest"),(function(e){const r=e.default({basePath:t});return new Promise(((e,t)=>{const o=new r;o.open("GET",n,!0),o.onreadystatechange=function(){if(4===o.readyState)if(200!==o.status)t(new SyntaxError("Failed to fetch URL: "+n+"state: "+o.readyState+"; status: "+o.status));else{const t=o.responseText;e({json:()=>JSON.parse(t)})}},o.send()}))}))}))}))})),r=function({fetch:e=("undefined"!=typeof window?window.fetch:self.fetch)}={}){return function t(n,r,i){try{let a=!1;return o(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(Array.isArray(n))return o(Promise.all(n.map((e=>t(e)))),(function(e){return r&&r(...e),a=!0,e}))}),(function(t){return a?t:o(e(n),(function(e){return o(e.json(),(function(e){return"function"==typeof r?r(e):e}))}))}))}),(function(e){if(e.message+=` (File: ${n})`,i)return i(e,n);throw e})))}catch(e){return Promise.reject(e)}}}({fetch:n});return r._fetch=n,r.hasURLBasePath=Boolean(e),r.basePath=t,r}();function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e){return y="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},y(e)}function m(){m=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),E(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return S(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,a)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},m.apply(this,arguments)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function O(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||I(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){if(e){if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=globalThis.jsonExtra,C=function(e){return e.replace(/\\+/g,(function(e){return e.slice(0,e.length/2)}))},D=function(e){return T.parse("{"+(e||"").replace(/^\{/,"").replace(/\}$/,"")+"}")},F=function(e,t,n){var r,o=n.onMatch,i=n.extra,a=n.betweenMatches,s=n.afterMatch,u=n.escapeAtOne,c=0;for(i&&(a=i,s=i,u=i);null!==(r=e.exec(t));){var l=A(r,2),f=l[0],p=l[1],d=e.lastIndex,h=d-f.length;h>c&&a(t.slice(c,h)),u&&p.length%2?(c=d,u(f)):(o.apply(void 0,P(r)),c=d)}c!==t.length&&s(t.slice(c))},L="undefined"!=typeof fetch?fetch:null,$=function(){return L},R="undefined"!=typeof document?document:null,U=function(){return R};var M=function(e,t,n){return t.sort(new Intl.Collator(e,n).compare)},z=function(e,t,n){return new Intl.ListFormat(e,n).format(t)},B=function(e,t,n,r,o){if("function"!=typeof n)return function(e,t,n,r){return M(e,t,r),z(e,t,n)}(e,t,n,r);M(e,t,o);var i,a=(i=Date.now(),"undefined"!=typeof performance&&"function"==typeof performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.trunc((i+16*Math.random())%16);return i=Math.floor(i/16),("x"===e?t:3&t|8).toString(16)}))),s=P(t).map((function(e,t){return"<<".concat(a).concat(t,">>")})),u=[],c=function(){u.push.apply(u,arguments)};F(new RegExp("<<".concat(a,"(\\d)>>"),"gu"),z(e,s,r),{betweenMatches:c,afterMatch:c,onMatch:function(e,r){c(n(t[r],r))}});var l=U().createDocumentFragment();return l.append.apply(l,u),l},q=function(e){var t=e.object;if(Array.isArray(t)){if("function"==typeof t[1]){var n=A(t,4);return{value:n[0],callback:n[1],options:n[2],extraOpts:n[3]}}var r=A(t,3);return{value:r[0],options:r[1],extraOpts:r[2]}}return{value:t}},W=function(e){var t,n=e.value,r=e.arg;e.key;var o,i=e.locale;if("string"==typeof n||n&&"object"===y(n)&&"nodeType"in n)return n;var a=function(e){var t=e.type,n=e.options,i=void 0===n?o:n,a=e.checkArgOptions,s=void 0!==a&&a;if("string"==typeof r){var u=A(r.split("|"),3),c=u[0],l=u[1],f=u[2];"DATE"===c&&(c="DATETIME"),c===t&&(l?s&&!f||(i=g(g({},i),D(s&&f?f:l))):i={})}return i},s=!1;if(n&&"object"===y(n)&&!Array.isArray(n)){var u=Object.keys(n)[0];if(["number","date","datetime","dateRange","datetimeRange","relative","region","language","script","currency","list","plural"].includes(u)){var c,l,f=q({object:n[u]});switch(n=f.value,o=f.options,c=f.extraOpts,l=f.callback,u){case"date":case"datetime":s=!0;break;case"dateRange":case"datetimeRange":return(t=new Intl.DateTimeFormat(i,a({type:"DATERANGE",options:c}))).formatRange.apply(t,P([n,o].map((function(e){return"number"==typeof e?new Date(e):e}))));case"region":case"language":case"script":case"currency":return new Intl.DisplayNames(i,g(g({},a({type:u.toUpperCase()})),{},{type:u})).of(n);case"relative":var p=[o,c];return c=p[0],o=p[1],new Intl.RelativeTimeFormat(i,a({type:"RELATIVE"})).format(n,c);case"list":return l?B(i,n,l,a({type:"LIST"}),a({type:"LIST",options:c,checkArgOptions:!0})):B(i,n,a({type:"LIST"}),a({type:"LIST",options:c,checkArgOptions:!0}))}}}if(n&&("number"==typeof n&&(s||/^DATE(?:TIME)(?:\||$)/.test(r))&&(n=new Date(n)),"object"===y(n)&&"function"==typeof n.getTime))return new Intl.DateTimeFormat(i,a({type:"DATETIME"})).format(n);if(Array.isArray(n)){var d,h=n[2];return(d=new Intl.DateTimeFormat(i,a({type:"DATERANGE",options:h}))).formatRange.apply(d,P(n.slice(0,2).map((function(e){return"number"==typeof e?new Date(e):e}))))}if("number"==typeof n)return new Intl.NumberFormat(i,a({type:"NUMBER"})).format(n);throw new TypeError("Unknown formatter")},V=_((function e(){b(this,e)})),H=function(e){var t=e.key,n=e.body,r=e.type,o=e.messageStyle,i=se({messageStyle:void 0===o?"richNested":o})({body:n},t);if(!i)throw new Error("Key value not found for ".concat(r," key: (").concat(t,")"));return i.value},J=function(e){S(n,V);var t=k(n);function n(e){var r;return b(this,n),(r=t.call(this)).locals=e,r}return _(n,[{key:"getSubstitution",value:function(e){return H({key:e.slice(1),body:this.locals,type:"local"})}},{key:"isMatch",value:function(e){var t=e.slice(1).split("."),n=this.locals;return this.constructor.isMatchingKey(e)&&t.every((function(e){var t=e in n;return n=n[e],t}))}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("-")}}]),n}(),K=function(e){S(n,V);var t=k(n);function n(e){var r;return b(this,n),(r=t.call(this)).substitutions=e,r}return _(n,[{key:"isMatch",value:function(e){return this.constructor.isMatchingKey(e)&&e in this.substitutions}}],[{key:"isMatchingKey",value:function(e){return/^[0-9A-Z_a-z]/.test(e)}}]),n}(),G=function(e){S(n,V);var t=k(n);function n(e,r){var o,i=r.substitutions;return b(this,n),(o=t.call(this)).switches=e,o.substitutions=i,o}return _(n,[{key:"getSubstitution",value:function(e,t){var n,r,o=t.locale,i=t.usedKeys,a=t.arg,s=t.missingSuppliedFormatters,u=this.constructor.getKey(e).slice(1),c=A(this.getMatch(u),3),l=c[0],f=c[1],p=c[2];if(i.push(p),l&&l.includes("|")){var d=A(l.split("|"),3);n=d[1],r=d[2]}if(!f)return s({key:e,formatter:this}),"\\{"+e+"}";var h=function(e,t){var n=D(r);return new Intl.NumberFormat(o,g(g({},t),n)).format(e)},v=function(e,t){var n=D(r);return new Intl.PluralRules(o,g(g({},t),n)).select(e)},m=this.substitutions[p],b=m;if("number"==typeof m)switch(n){case"NUMBER":b=h(m);break;case"PLURAL":b=v(m);break;default:b=new Intl.PluralRules(o).select(m)}else if(m&&"object"===y(m)){var w=Object.keys(m)[0];if(["number","plural"].includes(w)){var _=q({object:m[w]}),x=_.value,S=_.options;if(n||(n=w.toUpperCase()),!(w.toUpperCase()===n))throw new TypeError('Expecting type "'.concat(n.toLowerCase(),'"; instead found "').concat(w,'".'));switch(n){case"NUMBER":b=h(x,S);break;case"PLURAL":b=v(x,S)}}}var j="richNested",E=function(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")};try{return H({messageStyle:j,key:b?E(b):a,body:f,type:"switch"})}catch(e){try{return H({messageStyle:j,key:"*"+E(b),body:f,type:"switch"})}catch(e){var O=Object.keys(f).find((function(e){return e.startsWith("*")}));if(!O)throw new Error("No defaults found for switch ".concat(u));return H({messageStyle:j,key:E(O),body:f,type:"switch"})}}}},{key:"isMatch",value:function(e){return e&&this.constructor.isMatchingKey(e)&&Boolean(this.getMatch(e.slice(1)).length)}},{key:"getMatch",value:function(e){var t=this,n=e.split(".");return n.reduce((function(r,o,i){if(i<n.length-1){if(!(o in r))throw new Error('Switch key "'.concat(o,'" not found (from "~').concat(e,'")'));return r[o]}var a=Object.entries(r).find((function(e){var n=A(e,1)[0];return o===t.constructor.getKey(n)}));return a?[].concat(P(a),[o]):[]}),this.switches)}}],[{key:"isMatchingKey",value:function(e){return e.startsWith("~")}},{key:"getKey",value:function(e){var t=e.match(/^(?:(?!\|)[\s\S])*/);return t&&t[0]}}]),n}();function Z(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function X(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function Y(e,t,n){if(!e.s){if(n instanceof Q){if(!n.s)return void(n.o=Y.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Y.bind(null,e,t),Y.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var Q=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{Y(r,1,i(this.v))}catch(e){Y(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?Y(r,1,t?t(o):o):n?Y(r,1,n(o)):Y(r,2,o)}catch(e){Y(r,2,e)}},r},e}();function ee(e){return e instanceof Q&&1&e.s}function te(e,t,n){for(var r;;){var o=e();if(ee(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!ee(i)){r=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!ee(a)){r=2;break}}}var s=new Q,u=Y.bind(null,s,2);return(0===r?o.then(l):1===r?i.then(c):a.then(f)).then(void 0,u),s;function c(r){i=r;do{if(t&&(a=t())&&a.then&&!ee(a))return void a.then(f).then(void 0,u);if(!(o=e())||ee(o)&&!o.v)return void Y(s,1,i);if(o.then)return void o.then(l).then(void 0,u);ee(i=n())&&(i=i.v)}while(!i||!i.then);i.then(c).then(void 0,u)}function l(e){e?(i=n())&&i.then?i.then(c).then(void 0,u):c(i):Y(s,1,i)}function f(){(o=e())?o.then?o.then(l).then(void 0,u):l(o):Y(s,1,i)}}function ne(e,t){return e&&e.then?e.then(t):t(e)}function re(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var oe=function(e,t){if("string"!=typeof e)throw new TypeError("`defaultLocaleResolver` expects a string `localesBasePath`.");if("string"!=typeof t)throw new TypeError("`defaultLocaleResolver` expects a string `locale`.");if(/[\.\/\\]/.test(t))throw new TypeError("Locales cannot use file-reserved characters, `.`, `/` or `\\`");return"".concat(e.replace(/\/$/,""),"/_locales/").concat(t,"/messages.json")},ie=function(e){var t=e.string,n=e.dom,r=e.usedKeys,o=e.substitutions,i=e.allSubstitutions,a=e.locale,s=e.locals,u=e.switches,c=e.maximumLocalNestingDepth,l=void 0===c?3:c,f=e.missingSuppliedFormatters,p=e.checkExtraSuppliedFormatters;if("number"!=typeof l)throw new TypeError("`maximumLocalNestingDepth` must be a number.");var d=function(){Object.entries(o).forEach((function(e){var t=A(e,2),n=t[0];"function"==typeof t[1]&&r.push(n)}))};d();var h=new J(s),v=new K(o),m=new G(u,{substitutions:o}),b=/(\\*)\{((?:(?:(?!\})[\s\S])|\\\})*?)(?:(\|)((?:(?!\})[\s\S])*))?\}/g;i&&(i=Array.isArray(i)?i:[i]);var w=function(e){var t,n=e.key,o=e.arg,s=e.substs;return h.constructor.isMatchingKey(n)?t=h.getSubstitution(n):m.constructor.isMatchingKey(n)?t=m.getSubstitution(n,{locale:a,usedKeys:r,arg:o,missingSuppliedFormatters:f}):"function"==typeof(t=s[n])&&(t=t({arg:o,key:n})),i?t=i.reduce((function(e,t){return t({value:e,arg:o,key:n,locale:a})}),t):o&&/^(?:NUMBER|DATE(?:TIME|RANGE|TIMERANGE)?|REGION|LANGUAGE|SCRIPT|CURRENCY|RELATIVE|LIST)(?:\||$)/.test(o)&&(t=W({value:t,arg:o,key:n,locale:a})),t},_=1,x=function(e){var t=e.substitution,n=e.ky,r=e.arg,i=e.processSubsts;if("string"==typeof t&&t.includes("{")){if(_++>l)throw new TypeError("Too much recursion in local variables.");if(h.constructor.isMatchingKey(n)){var a,s=o;r&&(a=D(r),s=g(g({},o),a)),t=i({str:t,substs:s,formatter:h}),a&&p({substitutions:a})}else m.constructor.isMatchingKey(n)&&(t=i({str:t}))}return t};if(!n){var S=!1,j=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?v:s;return n.replace(b,(function(t,n,o,i,s){if(n.length%2)return t;if(f({key:o,formatter:u}))return t;var c=w({key:o,arg:s,substs:a});return c=x({substitution:c,ky:o,arg:s,processSubsts:e}),S=S||c&&"object"===y(c)&&"nodeType"in c,r.push(o),n+c}))}({str:t});if(!S)return p({substitutions:o}),r.length=0,d(),C(j);r.length=0,d()}_=1;var E=function e(t){var n=t.str,i=t.substs,a=void 0===i?o:i,s=t.formatter,u=void 0===s?v:s,c=[],l=new RegExp(b,"gu"),p=function(){c.push.apply(c,arguments)};return F(l,n,{extra:p,onMatch:function(t,n,o,i,s){if(f({key:o,formatter:u}))p(t);else{n.length&&p(n);var c=w({key:o,arg:s,substs:a});c=x({substitution:c,ky:o,arg:s,processSubsts:e}),Array.isArray(c)?p.apply(void 0,P(c)):c&&"object"===y(c)&&"nodeType"in c?p(c.cloneNode(!0)):p(c)}r.push(o)}}),c}({str:t});return p({substitutions:o}),r.length=0,E.map((function(e){return"string"==typeof e?C(e):e}))};function ae(e,t){if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))&&"string"==typeof t&&t.endsWith("Nested"))return e.map((function(e){return e.replace(m(/(\\+)/g,{backslashes:1}),"\\$<backslashes>").replace(/\./g,"\\.")})).join(".");if("string"!=typeof e)throw new TypeError("`key` is expected to be a string (or array of strings for nested style)");return e}var se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.messageStyle,n=void 0===t?"richNested":t;return"function"==typeof n?n:"richNested"===n?function(e,t){var n=e&&"object"===y(e)&&e.body,r=[],o=function(e){r.length||(r[0]=""),r[r.length-1]+=e};F(/(\\*)\./g,t,{extra:o,onMatch:function(e,t){o(t),r.push("")}});var i=r.map((function(e){return C(e)})),a=!1,s=n;return i.some((function(e,t,n){return!s||"object"!==y(s)||(t===n.length-1&&e in s&&s[e]&&"object"===y(s[e])&&"message"in s[e]&&"string"==typeof s[e].message&&(a={value:s[e].message,info:s[e]}),s=s[e],!1)})),a}:"rich"===n?function(e,t){var n=e&&"object"===y(e)&&e.body;return!!(n&&"object"===y(n)&&t in n&&n[t]&&"object"===y(n[t])&&"message"in n[t]&&"string"==typeof n[t].message)&&{value:n[t].message,info:n[t]}}:"plain"===n?function(e,t){var n=e&&"object"===y(e)&&e.body;return!!(n&&"object"===y(n)&&t in n&&n[t]&&"string"==typeof n[t])&&{value:n[t]}}:"plainNested"===n?function(e,t){var n=e&&"object"===y(e)&&e.body;if(n&&"object"===y(n)){var r=t.split(/(?<!\\)\./).reduce((function(e,t){return e&&e[t]?e[t]:null}),n);if(r&&"string"==typeof r)return{value:r}}return!1}:function(){throw new TypeError("Unknown `messageStyle` ".concat(n))}()},ue=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.message,r=t.defaults,o=t.messageStyle,i=t.messageForKey,a=void 0===i?se({messageStyle:o}):i,s=t.key;if("string"==typeof n)e=n;else if(!1===r||null==r)e=!1;else{if(!r||"object"!==y(r))throw new TypeError("Default locale strings must resolve to `false`, nullish, or an object!");(e=a({body:r},s))&&(e=e.value)}if(!1===e)throw new Error("Key value not found for key: (".concat(s,")"));return e},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.string,n=e.locale,r=e.locals,o=e.switches;e.maximumLocalNestingDepth;var i=e.allSubstitutions,a=void 0===i?[W]:i,s=e.insertNodes,u=void 0===s?ie:s,c=e.substitutions,l=void 0!==c&&c,f=e.dom,p=void 0!==f&&f,d=e.forceNodeReturn,h=void 0!==d&&d,v=e.throwOnMissingSuppliedFormatters,g=void 0===v||v,y=e.throwOnExtraSuppliedFormatters,m=void 0===y||y;if("string"!=typeof t)throw new TypeError("An options object with a `string` property set to a string must be provided for `getDOMForLocaleString`.");var b=function(e){var t=U();return h?t.createTextNode(e):e},w=[],_=function(e){var t=e.substitutions;m&&Object.keys(t).forEach((function(e){if(!w.includes(e))throw new Error("Extra formatting key: ".concat(e))}))},x=function(e){var t=e.key,n=e.formatter,r=n.isMatch(t);if(n.constructor.isMatchingKey(t)&&!r){if(g)throw new Error("Missing formatting key: ".concat(t));return!0}return!1};if(!l&&!a&&!g)return b(t);l||(l={});var S=u({string:t,dom:p,usedKeys:w,substitutions:l,allSubstitutions:a,locale:n,locals:r,switches:o,missingSuppliedFormatters:x,checkExtraSuppliedFormatters:_});if("string"==typeof S)return b(S);var j=U(),E=j.createDocumentFragment();return E.append.apply(E,P(S)),E};function le(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function fe(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var pe=function(e){if(!e.includes("-"))throw new Error("Locale not available");return e.replace(/\x2D(?:(?!\x2D)[\s\S])*$/,"")},de=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeResolver,o=e.localesBasePath,i=e.localeMatcher;return he({locales:t,defaultLocales:n,localeResolver:r,localesBasePath:o,localeMatcher:i})},he=fe((function(e){var t=fe((function(e){if("string"!=typeof e)throw new TypeError("Non-string locale type");var n=s(c,e);if("string"!=typeof n)throw new TypeError("`localeResolver` expected to resolve to (URL) string.");return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=$();return le(d?t(n,{method:"HEAD"}):t(n),(function(t){if(404===t.status)throw new Error("Trying again");return d?e:le(t.json(),(function(t){return{locale:e,strings:t}}))}))}),(function(n){if("SyntaxError"===n.name)throw n;return le(f(e),t)}))})),n=e.locales,r=void 0===n?"undefined"!=typeof intlDomLocale?[intlDomLocale]:"undefined"==typeof navigator?[]:navigator.languages:n,o=e.defaultLocales,i=void 0===o?["en-US"]:o,a=e.localeResolver,s=void 0===a?oe:a,u=e.localesBasePath,c=void 0===u?".":u,l=e.localeMatcher,f=void 0===l?"lookup":l,p=e.headOnly,d=void 0!==p&&p;if("lookup"===f)f=pe;else if("function"!=typeof f)throw new TypeError('`localeMatcher` must be "lookup" or a function!');return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Reached end of values array.";if(!Array.isArray(e))throw new TypeError("The `values` argument to `promiseChainForValues` must be an array.");if("function"!=typeof t)throw new TypeError("The `errBack` argument to `promiseChainForValues` must be a function.");return re((function(){var r,o,i=!1,a=Promise.reject(new Error("Intentionally reject so as to begin checking chain"));return ne(te((function(){return!i}),void 0,(function(){var s=e.shift();return X((function(){return Z(a,(function(e){r=e,i=!0}))}),(function(){if(o)throw new Error(n);e.length||(o=!0),a=t(s)}))})),(function(e){return r}))}))()}([].concat(P(r),P(i)),t,"No matching locale found!")}));function ve(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var ge=function(e){var t=e.strings,n=e.resolvedLocale,r=e.messageStyle,o=void 0===r?"richNested":r,i=e.allSubstitutions,a=e.insertNodes,s=e.keyCheckerConverter,u=void 0===s?ae:s,c=e.defaults,l=e.substitutions,f=e.maximumLocalNestingDepth,p=e.dom,d=void 0!==p&&p,h=e.forceNodeReturn,v=void 0!==h&&h,m=e.throwOnMissingSuppliedFormatters,b=void 0===m||m,w=e.throwOnExtraSuppliedFormatters,_=void 0===w||w;if(!t||"object"!==y(t))throw new TypeError("Locale strings must be an object!");var x=se({messageStyle:o}),S=function(e,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},p=s.allSubstitutions,h=void 0===p?i:p,y=s.defaults,m=void 0===y?c:y,w=s.dom,S=void 0===w?d:w,j=s.forceNodeReturn,E=void 0===j?v:j,O=s.throwOnMissingSuppliedFormatters,k=void 0===O?b:O,A=s.throwOnExtraSuppliedFormatters,P=void 0===A?_:A;e=u(e,o);var I=x(t,e),N=ue({message:!(!I||"string"!=typeof I.value)&&I.value,defaults:m,messageForKey:x,key:e});return ce({string:N,locals:t.head&&t.head.locals,switches:t.head&&t.head.switches,locale:n,maximumLocalNestingDepth:f,allSubstitutions:h,insertNodes:a,substitutions:g(g({},l),r),dom:S,forceNodeReturn:E,throwOnMissingSuppliedFormatters:k,throwOnExtraSuppliedFormatters:P})};return S.resolvedLocale=n,S.strings=t,S.sort=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.apply(void 0,[n].concat(t))},S.sortList=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return B.apply(void 0,[n].concat(t))},S.list=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return z.apply(void 0,[n].concat(t))},S},ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.locales,n=e.defaultLocales,r=e.localeStringFinder,o=void 0===r?de:r,i=e.localesBasePath,a=e.localeResolver,s=e.localeMatcher,u=e.messageStyle,c=e.allSubstitutions,l=e.insertNodes,f=e.keyCheckerConverter,p=e.defaults,d=e.substitutions,h=e.maximumLocalNestingDepth,v=e.dom,g=e.forceNodeReturn,y=e.throwOnMissingSuppliedFormatters,m=e.throwOnExtraSuppliedFormatters;try{return ve(o({locales:t,defaultLocales:n,localeResolver:a,localesBasePath:i,localeMatcher:s}),(function(e){var t=e.strings,n=e.locale;return ge({strings:t,resolvedLocale:n,messageStyle:u,allSubstitutions:c,insertNodes:l,keyCheckerConverter:f,defaults:p,substitutions:d,maximumLocalNestingDepth:h,dom:v,forceNodeReturn:g,throwOnMissingSuppliedFormatters:y,throwOnExtraSuppliedFormatters:m})}))}catch(e){return Promise.reject(e)}};function me(e,{before:t,after:n,favicon:r,canvas:o,image:i=!0,acceptErrors:a}={}){return e=Array.isArray(e)?e:[e],Promise.all(e.map((e=>function(e){let s={};Array.isArray(e)&&([e,s={}]=e);let{favicon:u=r}=s;const{before:c=t,after:l=n,canvas:f=o,image:p=i}=s;function d(){c?c.before(h):l?l.after(h):document.head.appendChild(h)}const h=document.createElement("link");return new Promise(((t,n)=>{let r=n;if(a&&(r="function"==typeof a?r=>{a({error:r,stylesheetURL:e,options:s,resolve:t,reject:n})}:t),e.endsWith(".css")?u=!1:e.endsWith(".ico")&&(u=!0),u){if(h.rel="shortcut icon",h.type="image/x-icon",!1===p)return h.href=e,d(),void t(h);const r=document.createElement("canvas");r.width=16,r.height=16;const o=r.getContext("2d"),i=document.createElement("img");return i.addEventListener("error",(e=>{n(e)})),i.addEventListener("load",(()=>{o.drawImage(i,0,0),h.href=f?r.toDataURL("image/x-icon"):e,d(),t(h)})),void(i.src=e)}h.rel="stylesheet",h.type="text/css",h.href=e,d(),h.addEventListener("error",(e=>{r(e)})),h.addEventListener("load",(()=>{t(h)}))}))}(e))))}function be(e){return be="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},be(e)}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||xe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(e){return function(e){if(Array.isArray(e))return Se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){if(e){if("string"==typeof e)return Se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(e,t):void 0}}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var je=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i,Oe=/(\[[^[\]]*])/g;function ke(e,t){"object"!==be(t)?t={hash:Boolean(t)}:void 0===t.hash&&(t.hash=!0);var n=t.hash?{}:"",r=t.serializer||(t.hash?Pe:Ie),o=e&&e.elements?_e(e.elements):[],i=Object.create(null);return o.forEach((function(e){if((t.disabled||!e.disabled)&&e.name&&Ee.test(e.nodeName)&&!je.test(e.type)){var o=e.name,a=e.type,s=e.name,u=e.checked,c=e.value;if("checkbox"!==a&&"radio"!==a||u||(c=void 0),t.empty){if("checkbox"!==a||u||(c=""),"radio"===a&&(i[s]||u?u&&(i[s]=!0):i[s]=!1,void 0===c))return}else if(!c)return;if("select-multiple"===a){var l=!1;return _e(e.options).forEach((function(e){var i=t.empty&&!e.value,a=e.value||i;e.selected&&a&&(l=!0,n=t.hash&&"[]"!==o.slice(-2)?r(n,o+"[]",e.value):r(n,o,e.value))})),void(!l&&t.empty&&(n=r(n,o,"")))}n=r(n,o,c)}})),t.empty&&Object.entries(i).forEach((function(e){var t=we(e,2),o=t[0];t[1]||(n=r(n,o,""))})),n}function Ae(e,t,n){if(0===t.length)return n;var r=t.shift(),o=r.match(/^\[(.+?)]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(Ae(null,t,n)):(e._values=e._values||[],e._values.push(Ae(null,t,n))),e;if(o){var i=o[1],a=Number(i);isNaN(a)?(e=e||{})[i]=Ae(e[i],t,n):(e=e||[])[a]=Ae(e[a],t,n)}else e[r]=Ae(e[r],t,n);return e}function Pe(e,t,n){if(t.match(Oe)){Ae(e,function(e){var t=[],n=new RegExp(Oe),r=/^([^[\]]*)/.exec(e);for(r[1]&&t.push(r[1]);null!==(r=n.exec(e));)t.push(r[1]);return t}(t),n)}else{var r=e[t];r?(Array.isArray(r)||(e[t]=[r]),e[t].push(n)):e[t]=n}return e}function Ie(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}function Ne(e,t){Object.entries(t).forEach((function(t){var n=we(t,2),r=n[0],o=n[1],i=e[r],a=!1;if(!i&&!(i=e.querySelector('[name="'.concat(r,'"]')))){if(!((i=e[r+"[]"])&&"object"===be(i)&&"length"in i||(i=e.querySelectorAll('[name="'.concat(r,'[]"]'))).length))throw new Error("Name not found ".concat(r));a=!0}var s=i.type;if("checkbox"===s&&(i.checked=""!==o),("radio"===s||i[0]&&"radio"===i[0].type)&&_e(e.querySelectorAll('[name="'.concat(r+(a?"[]":""),'"]'))).forEach((function(e){e.checked=o===e.value})),i[0]&&"select-multiple"===i[0].type)_e(i[0].options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));else if(Array.isArray(o)){if("select-multiple"===s)return void _e(i.options).forEach((function(e){o.includes(e.value)&&(e.selected=!0)}));o.forEach((function(e,t){var n=i[t];if("checkbox"!==n.type)"select-multiple"!==n.type?n.value=e:_e(n.options).forEach((function(t){e.includes(t.value)&&(t.selected=!0)}));else{var r=n.value===e||"on"===e;n.checked=r}}))}else i.value=o}))}let Te="undefined"!=typeof window&&window,Ce="undefined"!=typeof document&&document||Te&&Te.document;const De=["$plugins","$map"],Fe="http://www.w3.org/1999/xhtml",Le=/-([a-z])/gu,$e={maxlength:"maxLength",minlength:"minLength",readonly:"readOnly"},Re=["checked","defaultChecked","defaultSelected","disabled","indeterminate","open","readOnly","selected"].concat(["accessKey","async","autocapitalize","autofocus","contentEditable","defaultValue","defer","draggable","formnovalidate","hidden","innerText","inputMode","ismap","multiple","novalidate","pattern","required","spellcheck","translate","value","willvalidate"]),Ue=["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"],Me=e=>Ce.querySelector(e),ze=e=>[...Ce.querySelectorAll(e)];function Be(e){return e.nodeName&&e.nodeName.toLowerCase()}function qe(e){if(Ce.createStyleSheet&&"style"===Be(e)){Ce.createStyleSheet().cssText=e.cssText}}function We(e,t){const n=Be(e);if(Ce.createStyleSheet){if("script"===n)return void(e.text=t.nodeValue);if("style"===n)return void(e.cssText=t.nodeValue)}if("template"!==n)try{e.append(t)}catch(r){const o=Be(t);if("select"===n&&"option"===o){try{e.add(t)}catch(n){e.add(t,null)}return}throw r}else e.content.append(t)}function Ve(e,t,n){if(!/^\w+$/u.test(n))throw new TypeError(`Bad ${e} reference; with prefix "${t}" and arg "${n}"`);const r=Ce.createElement("div");return r.innerHTML="&"+t+n+";",Ce.createTextNode(r.innerHTML)}function He(e,t){return t.toUpperCase()}function Je(e){return null==e}function Ke(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(Array.isArray(e))return"array";if("nodeType"in e)switch(e.nodeType){case 1:return"element";case 9:return"document";case 11:return"fragment";default:return"non-container node"}}return t}function Ge(e,t){return e.append(t),e}function Ze(e){return function(t){let n=e[""]?' xmlns="'+e[""]+'"':t;for(const[t,r]of Object.entries(e))""!==t&&(n+=" xmlns:"+t+'="'+r+'"');return n}}function Xe(e){return function(t,n){const r=e.childNodes[n],o=Array.isArray(t)?nt(...t):nt(t);r.replaceWith(o)}}function Ye(e){return function(t){Array.isArray(t)?e.append(nt(...t)):e.append(nt(t))}}function Qe(e){return function(t){"string"==typeof t?e.append(t):Array.isArray(t)?e.append(nt(...t)):e.append(nt(t))}}function et(e,t,n,r){if(r.$state="attributeValue",n&&"object"==typeof n){const o=tt(r,Object.keys(n)[0]);if(o)return o.set({opts:r,element:e,attribute:{name:t,value:n}})}return n}function tt(e,t){return e.$plugins&&e.$plugins.find((e=>e.name===t))}const nt=function e(...t){let n=Ce.createDocumentFragment();function r(r){for(let[p,d]of Object.entries(r))if(p=p in $e?$e[p]:p,Ue.includes(p))d=et(n,p,d,a),Je(d)||(n[p]=d);else if(Re.includes(p))d=et(n,p,d,a),n[p]=d;else switch(p){case"#":a.$state="fragmentChilden",o[o.length]=e(a,d);break;case"$shadow":{const{open:t,closed:r}=d;let{content:o,template:i}=d;const a=n.attachShadow({mode:r||!1===t?"closed":"open"});i?(Array.isArray(i)?i="object"===Ke(i[0])?e("template",...i,Ce.body):e("template",i,Ce.body):"string"==typeof i&&(i=Me(i)),e(i.content.cloneNode(!0),a)):(o||(o=t||r),o&&"boolean"!=typeof o&&(Array.isArray(o)?e({"#":o},a):e(o,a)));break}case"$state":case"is":case"xmlns":break;case"$custom":Object.assign(n,d);break;case"$define":{const e=n.localName.toLowerCase(),o=!e.includes("-");let i;if(o&&(i=n.getAttribute("is"),!i)){if(!{}.hasOwnProperty.call(r,"is"))throw new TypeError(`Expected \`is\` with \`$define\` on built-in; args: ${JSON.stringify(t)}`);r.is=et(n,"is",r.is,a),n.setAttribute("is",r.is),({is:i}=r)}const s=o?i:e;if(window.customElements.get(s))break;const u=t=>{const n=l&&l.extends?Ce.createElement(l.extends).constructor:o?Ce.createElement(e).constructor:window.HTMLElement;return t?class extends n{constructor(){super(),t.call(this)}}:class extends n{}};let c,l,f;Array.isArray(d)?d.length<=2?([c,l]=d,"string"==typeof l?l={extends:l}:l&&!{}.hasOwnProperty.call(l,"extends")&&(f=l),"object"==typeof c&&(f=c,c=u())):([c,f,l]=d,"string"==typeof l&&(l={extends:l})):"function"==typeof d?c=d:(f=d,c=u()),c.toString().startsWith("class")||(c=u(c)),!l&&o&&(l={extends:e}),f&&Object.entries(f).forEach((([e,t])=>{c.prototype[e]=t})),window.customElements.define(s,c,"object"==typeof l?l:void 0);break}case"$symbol":{const[e,t]=d;if("function"==typeof t){const r=t.bind(n);"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}else{const r=t;r.elem=n,"string"==typeof e?n[Symbol.for(e)]=r:n[e]=r}break}case"$data":l(d);break;case"$attribute":{const e=3===d.length?Ce.createAttributeNS(d[0],d[1]):Ce.createAttribute(d[0]);e.value=d[d.length-1],o[o.length]=e;break}case"$text":{const e=Ce.createTextNode(d);o[o.length]=e;break}case"$document":{const t=Ce.implementation.createHTMLDocument();if(d.childNodes){const e=d.childNodes.length;for(;t.childNodes[e];){t.childNodes[e].remove()}d.childNodes.forEach(Xe(t))}else{if(d.$DOCTYPE){const n={$DOCTYPE:d.$DOCTYPE},r=e(n);t.firstChild.replaceWith(r)}const n=t.childNodes[1],r=n.childNodes[0],o=n.childNodes[1];if(d.title||d.head){const e=Ce.createElement("meta");e.setAttribute("charset","utf-8"),r.append(e),d.title&&(t.title=d.title),d.head&&d.head.forEach(Ye(r))}d.body&&d.body.forEach(Qe(o))}o[o.length]=t;break}case"$DOCTYPE":{const e=Ce.implementation.createDocumentType(d.name,d.publicId||"",d.systemId||"");o[o.length]=e;break}case"$on":for(let[e,r]of Object.entries(d||{})){if("function"==typeof r&&(r=[r,!1]),"function"!=typeof r[0])throw new TypeError(`Expect a function for \`$on\`; args: ${JSON.stringify(t)}`);s=n,u=e,c=r[0],f=r[1],s.addEventListener(u,c,Boolean(f))}break;case"className":case"class":d=et(n,p,d,a),Je(d)||(n.className=d);break;case"dataset":{const e=(t,r)=>{let o="";const i=""!==r;Object.keys(t).forEach((a=>{const s=t[a];if(o=i?r+a.replace(Le,He).replace(/^([a-z])/u,He):r+a.replace(Le,He),null===s||"object"!=typeof s)return Je(s)||(n.dataset[o]=s),void(o=r);e(s,o)}))};e(d,"");break}case"innerHTML":Je(d)||(n.innerHTML=d);break;case"htmlFor":case"for":if("label"===i){d=et(n,p,d,a),Je(d)||(n.htmlFor=d);break}d=et(n,p,d,a),n.setAttribute(p,d);break;default:{if(p.startsWith("on")){d=et(n,p,d,a),n[p]=d;break}if("style"===p){if(d=et(n,p,d,a),Je(d))break;if("object"==typeof d){for(const[e,t]of Object.entries(d))Je(t)||("float"===e?(n.style.cssFloat=t,n.style.styleFloat=t):n.style[e.replace(Le,He)]=t);break}n.setAttribute(p,d);break}const e=tt(a,p);if(e){e.set({opts:a,element:n,attribute:{name:p,value:d}});break}d=et(n,p,d,a),n.setAttribute(p,d);break}}var s,u,c,f}const o=[];let i,a,s=!1;if("object"===Ke(t[0])&&Object.keys(t[0]).some((e=>De.includes(e)))){if(a=t[0],void 0===a.$state&&(s=!0,a.$state="root"),a.$map&&!a.$map.root&&!1!==a.$map.root&&(a.$map={root:a.$map}),"$plugins"in a){if(!Array.isArray(a.$plugins))throw new TypeError(`\`$plugins\` must be an array; args: ${JSON.stringify(t)}`);a.$plugins.forEach((e=>{if(!e||"object"!=typeof e)throw new TypeError(`Plugin must be an object; args: ${JSON.stringify(t)}`);if(!e.name||!e.name.startsWith("$_"))throw new TypeError(`Plugin object name must be present and begin with \`$_\`; args: ${JSON.stringify(t)}`);if("function"!=typeof e.set)throw new TypeError(`Plugin object must have a \`set\` method; args: ${JSON.stringify(t)}`)}))}t=t.slice(1)}else a={$state:void 0};const u=t.length,c=a.$map&&a.$map.root,l=e=>{let t,r;if(!0===e)[t,r]=c;else if(Array.isArray(e)){if("string"==typeof e[0])return void e.forEach((e=>{l(a.$map[e])}));t=e[0]||c[0],r=e[1]||c[1]}else/^\[object (?:Weak)?Map\]$/u.test([].toString.call(e))?(t=e,r=c[1]):(t=c[0],r=e);t.set(n,r)};for(let s=0;s<u;s++){let c=t[s];const l=Ke(c);switch(l){case"null":if(s===u-1)return qe(o[0]),o.length<=1?o[0]:o.reduce(Ge,Ce.createDocumentFragment());throw new TypeError(`\`null\` values not allowed except as final Jamilih argument; index ${s} on args: ${JSON.stringify(t)}`);case"string":switch(c){case"!":o[o.length]=Ce.createComment(t[++s]);break;case"?":{c=t[++s];let e=t[++s];const n=e;if(n&&"object"==typeof n){e=[];for(const[t,r]of Object.entries(n))e.push(t+'="'+r.replace(/"/gu,"&quot;")+'"');e=e.join(" ")}try{o[o.length]=Ce.createProcessingInstruction(c,e)}catch(t){o[o.length]=Ce.createComment("?"+c+" "+e+"?")}break}case"&":o[o.length]=Ve("entity","",t[++s]);break;case"#":o[o.length]=Ve("decimal",c,String(t[++s]));break;case"#x":o[o.length]=Ve("hexadecimal",c,t[++s]);break;case"![":try{o[o.length]=Ce.createCDATASection(t[++s])}catch(e){o[o.length]=Ce.createTextNode(t[s])}break;case"":o[o.length]=n=Ce.createDocumentFragment(),a.$state="fragment";break;default:{i=c;const e=t[s+1];if("object"===Ke(e)&&e.is){const{is:t}=e;n=Ce.createElementNS?Ce.createElementNS(Fe,i,{is:t}):Ce.createElement(i,{is:t})}else n=Ce.createElementNS?Ce.createElementNS(Fe,i):Ce.createElement(i);a.$state="element",o[o.length]=n;break}}break;case"object":{const e=c;if(void 0!==e.xmlns){const t="object"==typeof e.xmlns?Ze(e.xmlns):' xmlns="'+e.xmlns+'"';n=o[o.length-1]=(new Te.DOMParser).parseFromString((new Te.XMLSerializer).serializeToString(n).replace(' xmlns="'+Fe+'"',t),"application/xml").documentElement,a.$state="element"}r(e);break}case"document":case"fragment":case"element":if(0===s&&(n=c,a.$state="element"),s===u-1||s===u-2&&null===t[s+1]){const e=o.length;for(let t=0;t<e;t++)We(c,o[t]);qe(o[0])}else o[o.length]=c;break;case"array":{const r=c,o=r.length;for(let i=0;i<o;i++){const o=r[i],s=typeof o;if(Je(o))throw new TypeError(`Bad children (parent array: ${JSON.stringify(t)}; index ${i} of child: ${JSON.stringify(r)})`);switch(s){case"string":case"number":case"boolean":We(n,Ce.createTextNode(o));break;default:if(Array.isArray(o))a.$state="children",We(n,e(a,...o));else if(o["#"])a.$state="fragmentChildren",We(n,e(a,o["#"]));else{const e=et(n,null,o,a);We(n,e)}}}break}default:throw new TypeError(`Unexpected type: ${l}; arg: ${c}; index ${s} on args: ${JSON.stringify(t)}`)}}const f=o[0]||n;return s&&a.$map&&a.$map.root&&l(!0),f};nt.toJML=function(e,{stringOutput:t=!1,reportInvalidState:n=!0,stripWhitespace:r=!1}={}){"string"==typeof e&&(e=(new Te.DOMParser).parseFromString(e,"text/html"));const o=[];let i=o,a=0;function s(e){class t extends Error{constructor(e,t){super(e),this.name=t}}if(n){const n=new t(e,"INVALID_STATE_ERR");throw n.code=11,n}}function u(e){i[a]=e,a++}function c(){u([]),i=i[a-1],a=0}function l(e,t){i=i[a-1][e],a=0,t&&(i=i[t])}return function e(t,n){const o="nodeType"in t?t.nodeType:null;let f,p;function d(){f=i,p=a}function h(){i=f,a=p,a++}switch(n={...n},[2,3,4,7,8].includes(o)&&!/^([\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/u.test(t.nodeValue)&&s("Node has bad XML character value"),o){case 1:{d();const r=t.nodeName.toLowerCase();c(),u(r);const o={};let i=!1;n[t.prefix||""]!==t.namespaceURI&&(n[t.prefix||""]=t.namespaceURI,t.prefix?o["xmlns:"+t.prefix]=t.namespaceURI:t.namespaceURI?o.xmlns=t.namespaceURI:o.xmlns=null,i=!0),t.attributes.length?u([...t.attributes].reduce((function(e,t){return e[t.name]=t.value,e}),o)):i&&u(o);const{childNodes:a}=t;a.length&&(c(),[...a].forEach((function(t){e(t,n)}))),h();break}case void 0:case 2:u({$attribute:[t.namespaceURI,t.name,t.value]});break;case 3:if(r&&/^\s+$/u.test(t.nodeValue))return void u("");u(t.nodeValue);break;case 4:t.nodeValue.includes("]]>")&&s("CDATA cannot end with closing ]]>"),u(["![",t.nodeValue]);break;case 5:u(["&",t.nodeName]);break;case 7:/^xml$/iu.test(t.target)&&s('Processing instructions cannot be "xml".'),t.target.includes("?>")&&s("Processing instruction targets cannot include ?>"),t.target.includes(":")&&s('The processing instruction target cannot include ":"'),t.data.includes("?>")&&s("Processing instruction data cannot include ?>"),u(["?",t.target,t.data]);break;case 8:(t.nodeValue.includes("--")||t.nodeValue.length&&t.nodeValue.lastIndexOf("-")===t.nodeValue.length-1)&&s("Comments cannot include --"),u(["!",t.nodeValue]);break;case 9:{d();u({$document:{childNodes:[]}}),l("$document","childNodes");const{childNodes:r}=t;r.length||s("Documents must have a child node"),[...r].forEach((function(t){e(t,n)})),h();break}case 10:{d();const e={$DOCTYPE:{name:t.name}};/^(\u0020|\u000D|\u000A|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%])*$/u.test(t.publicId)||s("A publicId must have valid characters."),function(e,t){t.systemId.includes('"')&&t.systemId.includes("'")&&s("systemId cannot have both single and double quotes.");const{publicId:n,systemId:r}=t;r&&(e.systemId=r),n&&(e.publicId=n)}(e.$DOCTYPE,t),u(e),h();break}case 11:{d(),u({"#":[]}),l("#");const{childNodes:r}=t;[...r].forEach((function(t){e(t,n)})),h();break}default:throw new TypeError("Not an XML type")}}(e,{}),t?JSON.stringify(o[0]):o[0]},nt.toJMLString=function(e,t){return nt.toJML(e,Object.assign(t||{},{stringOutput:!0}))},nt.toDOM=function(...e){return nt(...e)},nt.toHTML=function(...e){return nt(...e).outerHTML},nt.toDOMString=function(...e){return nt.toHTML(...e)},nt.toXML=function(...e){const t=nt(...e);return(new Te.XMLSerializer).serializeToString(t)},nt.toXMLDOMString=function(...e){return nt.toXML(...e)};class rt extends Map{get(e){return e="string"==typeof e?Me(e):e,super.get.call(this,e)}set(e,t){return e="string"==typeof e?Me(e):e,super.set.call(this,e,t)}invoke(e,t,...n){return e="string"==typeof e?Me(e):e,this.get(e)[t](e,...n)}}class ot extends WeakMap{get(e){return e="string"==typeof e?Me(e):e,super.get.call(this,e)}set(e,t){return e="string"==typeof e?Me(e):e,super.set.call(this,e,t)}invoke(e,t,...n){return e="string"==typeof e?Me(e):e,this.get(e)[t](e,...n)}}nt.Map=rt,nt.WeakMap=ot,nt.weak=function(e,...t){const n=new ot;return[n,nt({$map:[n,e]},...t)]},nt.strong=function(e,...t){const n=new rt;return[n,nt({$map:[n,e]},...t)]},nt.symbol=nt.sym=nt.for=function(e,t){return(e="string"==typeof e?Me(e):e)["symbol"==typeof t?t:Symbol.for(t)]},nt.command=function(e,t,n,...r){let o;return e="string"==typeof e?Me(e):e,["symbol","string"].includes(typeof t)?(o=nt.sym(e,t),"function"==typeof o?o(n,...r):o[n](...r)):(o=t.get(e),"function"==typeof o?o.call(e,n,...r):o[n](e,...r))},nt.setWindow=e=>{Te=e,Ce=Te.document,Ce&&Ce.body&&({body:it}=Ce)},nt.getWindow=()=>Te;let it=Ce&&Ce.body;const at=" ",st=(e,t)=>{var n;return(e="string"==typeof e?(n=e,document.querySelector(n)):e).querySelector(t)},ut=["submit","submitClass"],ct=["submit","cancel","cancelClass","submitClass"],lt=["message","submit"],ft={en:{submit:"Submit",cancel:"Cancel",ok:"Ok"}};const pt=new class{constructor({locale:e,localeObject:t}={}){this.setLocale({locale:e,localeObject:t})}setLocale({locale:e={},localeObject:n={}}){this.localeStrings=t(t(t({},ft.en),ft[e]),n)}makeDialog({atts:e={$on:null},children:t=[],close:n,remove:r=!0}){n&&(e.$on||(e.$on={}),e.$on.close||(e.$on.close=n));const o=nt("dialog",e,t,Me("#main"));return o.showModal(),r&&o.addEventListener("close",(()=>{o.remove()})),o}makeSubmitDialog(e){let{submit:t,submitClass:n="submit"}=e,o=r(e,ut);const i=this.makeCancelDialog(o);return st(i,`button.${o.cancelClass||"cancel"}`).before(nt("button",{class:n,$on:{click(e){t&&t.call(this,{e:e,dialog:i})}}},[this.localeStrings.submit]),at.repeat(2)),i}makeCancelDialog(e){let{submit:t,cancel:n,cancelClass:o="cancel",submitClass:i="submit"}=e,a=r(e,ct);const s=this.makeDialog(a);return nt("div",{class:i},[["br"],["br"],["button",{class:o,$on:{click(e){e.preventDefault(),n&&!1===n.call(this,{e:e,dialog:s})||s.close()}}},[this.localeStrings.cancel]]],s),s}alert(e,t){e="string"==typeof e?{message:e}:e;const{ok:n=("object"==typeof t?!1!==t.ok:!1!==t),message:r,submitClass:o="submit"}=e;return new Promise(((e,t)=>{const i=nt("dialog",[r,...n?[["br"],["br"],["div",{class:o},[["button",{$on:{click(){i.close(),e()}}},[this.localeStrings.ok]]]]]:[]],Me("#main"));i.showModal()}))}prompt(e){e="string"==typeof e?{message:e}:e;const{message:n,submit:o}=e,i=r(e,lt);return new Promise(((e,r)=>{this.makeSubmitDialog(t(t({},i),{},{submit:function({e:t,dialog:n}){o&&o.call(this,{e:t,dialog:n}),n.close(),e(st(n,"input").value)},cancel(){r(new Error("cancelled"))},children:[["label",[n,at.repeat(3),["input"]]]]}))}))}confirm(e){e="string"==typeof e?{message:e}:e;const{message:t,submitClass:n="submit"}=e;return new Promise(((e,r)=>{const o=nt("dialog",[t,["br"],["br"],["div",{class:n},[["button",{$on:{click(){o.close(),e()}}},[this.localeStrings.ok]],at.repeat(2),["button",{$on:{click(){o.close(),r(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],Me("#main"));o.showModal()}))}};var dt=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch(e){}r||(r=window._),e.exports=r},function(e,t,n){function r(e){return(r="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)}var o=n(47),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();e.exports=a},function(e,t){function n(e){return(n="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)}e.exports=function(e){return null!=e&&"object"==n(e)}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(e){return(n="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)}e.exports=function(e){var t=n(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),a=n(61),s=n(134),u=n(8),c=n(48),l=c(r),f=c(o),p=c(i),d=c(a),h=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=v},function(e,t){function n(e){return(n="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)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t,n){(function(e){function r(e){return(r="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)}var o=n(2),i=n(121),a="object"==r(t)&&t&&!t.nodeType&&t,s=a&&"object"==r(e)&&e&&!e.nodeType&&e,u=s&&s.exports===a?o.Buffer:void 0,c=(u?u.isBuffer:void 0)||i;e.exports=c}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(90),o=n(91),i=n(92),a=n(93),s=n(94);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(30);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(8),o=n(5);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(4)(Object,"create");e.exports=r},function(e,t,n){var r=n(114);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(49),o=n(50);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?o(n,c,l):r(n,c,l)}return n}},function(e,t,n){var r=n(120),o=n(3),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(122),o=n(35),i=n(36),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(65),o=n(150)(r);e.exports=o},function(e,t){e.exports=function(e){return e}},function(e,t,n){function r(e){return(r="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)}var o=n(154),i=n(164),a=n(25),s=n(0),u=n(173);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==r(e)?s(e)?i(e[0],e[1]):o(e):u(e)}},function(e,t,n){var r=n(44);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){function r(e){return(r="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)}var o=n(1);function i(e){this._isDirected=!o.has(e,"directed")||e.directed,this._isMultigraph=!!o.has(e,"multigraph")&&e.multigraph,this._isCompound=!!o.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=o.constant(void 0),this._defaultEdgeLabelFn=o.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function u(e,t,n,r){var i=""+t,a=""+n;if(!e&&i>a){var s=i;i=a,a=s}return i+""+a+""+(o.isUndefined(r)?"\0":r)}function c(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}function l(e,t){return u(e,t.v,t.w,t.name)}e.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return o.filter(this.nodes(),(function(t){return o.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,r=this;return o.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},i.prototype.setNode=function(e,t){return o.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return o.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(o.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],o.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),o.each(o.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],o.each(o.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(t))t="\0";else{for(var n=t+="";!o.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},i.prototype.children=function(e){if(o.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return o.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return o.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return o.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return o.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;o.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),o.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&o.each(t.nodes(),(function(e){t.setParent(e,function e(o){var i=n.parent(o);return void 0===i||t.hasNode(i)?(r[o]=i,i):i in r?r[i]:e(i)}(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return o.isFunction(e)||(e=o.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,r=arguments;return o.reduce(e,(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o})),this},i.prototype.setEdge=function(){var e,t,n,i,s=!1,l=arguments[0];"object"===r(l)&&null!==l&&"v"in l?(e=l.v,t=l.w,n=l.name,2===arguments.length&&(i=arguments[1],s=!0)):(e=l,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,t=""+t,o.isUndefined(n)||(n=""+n);var f=u(this._isDirected,e,t,n);if(o.has(this._edgeLabels,f))return s&&(this._edgeLabels[f]=i),this;if(!o.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[f]=s?i:this._defaultEdgeLabelFn(e,t,n);var p=c(this._isDirected,e,t,n);return e=p.v,t=p.w,Object.freeze(p),this._edgeObjs[f]=p,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][f]=p,this._out[e][f]=p,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return o.has(this._edgeLabels,r)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.v===t})):r}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=o.values(n);return t?o.filter(r,(function(e){return e.w===t})):r}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),a=n(97),s=n(98),u=n(99);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),a=n(116),s=n(117);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){function r(e){return(r="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)}var o=n(47),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i&&o.process,u=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(54)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(62);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){function r(e){return(r="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)}var o=n(0),i=n(44),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(o(e))return!1;var n=r(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t)}},function(e,t,n){function r(e){return(r="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)}var o=n(8),i=n(3);e.exports=function(e){return"symbol"==r(e)||i(e)&&"[object Symbol]"==o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(t){function n(e){return(n="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)}var r="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(11))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(50),o=n(30),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(51);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(4),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(119),o=n(21),i=n(0),a=n(12),s=n(53),u=n(22),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],v=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||h.push(g);return h}},function(e,t){function n(e){return(n="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)}var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=n(e);return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(52),o=n(125),i=n(7);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(39),o=n(40),i=n(38),a=n(57),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,n){var r=n(60),o=n(38),i=n(6);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(39),o=n(0);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t,n){var r=n(4)(n(2),"Set");e.exports=r},function(e,t,n){var r=n(2).Uint8Array;e.exports=r},function(e,t,n){var r=n(5),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(148),o=n(6);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(156),o=n(3);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},function(e,t,n){var r=n(68),o=n(159),i=n(69);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e);if(p&&u.get(t))return p==t;var d=-1,h=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var g=e[d],y=t[d];if(a)var m=c?a(y,g,d,t,e,u):a(g,y,d,e,t,u);if(void 0!==m){if(m)continue;h=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(g===e||s(g,e,n,a,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!s(g,y,n,a,u)){h=!1;break}}return u.delete(e),u.delete(t),h}},function(e,t,n){var r=n(32),o=n(157),i=n(158);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(5);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(73),o=n(27);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(0),o=n(43),i=n(166),a=n(169);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(73),o=n(21),i=n(0),a=n(53),s=n(34),u=n(27);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(i(e)||o(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(1),o=n(77);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},u.add(e,n)}));u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}},function(e,t,n){var r=n(1);e.exports=function(e){var t=0,n=[],o={},i=[];return e.nodes().forEach((function(a){r.has(o,a)||function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,l=[];do{c=n.pop(),o[c].onStack=!1,l.push(c)}while(s!==c);i.push(l)}}(a)})),i}},function(e,t,n){var r=n(1);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},function(e,t,n){var r=n(1);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,o,i,a,s){r.has(i,n)||(i[n]=!0,o||s.push(n),r.each(a(n),(function(n){e(t,n,o,i,a,s)})),o&&s.push(n))}(e,t,"post"===n,a,o,i)})),i}},function(e,t,n){(function(t){var r=n(226),o=["delete","get","head","patch","post","put"];e.exports.load=function(e,n,i){var a,s,u=n.method?n.method.toLowerCase():"get";function c(e,n){e?i(e):("[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&"function"==typeof n.buffer&&n.buffer(!0),n.end((function(e,t){e?i(e):i(void 0,t)})))}if(void 0!==n.method?"string"!=typeof n.method?a=new TypeError("options.method must be a string"):-1===o.indexOf(n.method)&&(a=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1])):void 0!==n.prepareRequest&&"function"!=typeof n.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)i(a);else if(s=r["delete"===u?"del":u](e),n.prepareRequest)try{n.prepareRequest(s,c)}catch(e){i(e)}else c(void 0,s)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="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)}e.exports=function(e){return null!==e&&"object"===r(e)}},function(e,t,n){(function(r,o){var i,a,s,u;function c(e){return(c="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)}
16
2
  /*! Native Promise Only
17
3
  v0.8.1 (c) Kyle Simpson
18
4
  MIT License: http://getify.mit-license.org
19
- */u=function(){var e,t,n,r=Object.prototype.toString,o=void 0!==i?function(e){return i(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function a(e,r){n.add(e,r),t||(t=o(n.drain))}function s(e){var t,n=void 0===e?"undefined":l(e);return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function u(){for(var e=0;e<this.chain.length;e++)c(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function c(e,t,n){var r,i;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=s(r))?i.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function f(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(u,t))}function p(e,t,n,r){for(var i=0;i<t.length;i++)!function(i){e.resolve(t[i]).then((function(e){n(i,e)}),r)}(i)}function h(e){this.def=e,this.triggered=!1}function d(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new d(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t})),t.chain.push(r),0!==t.state&&a(u,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){(function e(t){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=s(t))?a((function(){var i=new h(r);try{n.call(t,(function(){e.apply(i,arguments)}),(function(){f.apply(i,arguments)}))}catch(e){f.call(i,e)}})):(r.msg=t,r.state=1,r.chain.length>0&&a(u,r))}catch(e){f.call(new h(r),e)}}}).call(t,e)}),(function(e){f.call(t,e)}))}catch(e){f.call(t,e)}}n=function(){var e,n,r;function i(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,o){r=new i(t,o),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var m=e({},"constructor",g,!1);return g.prototype=m,e(m,"__NPO__",0,!1),e(g,"resolve",(function(e){return e&&"object"==(void 0===e?"undefined":l(e))&&1===e.__NPO__?e:new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)}))})),e(g,"reject",(function(e){return new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)}))})),e(g,"all",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,o=Array(i),a=0;p(t,e,(function(e,t){o[e]=t,++a===i&&n(o)}),r)}))})),e(g,"race",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");p(t,e,(function(e,t){n(t)}),r)}))})),g},(s=void 0!==r?r:void 0)[a="Promise"]=s[a]||u(),e.exports?e.exports=s[a]:void 0===(o=function(){return s[a]}.call(t,n,t,e))||(e.exports=o)}).call(this,n(1),n(43).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.buildExps=i;var r=n(6);function i(e){var t=(0,r.merge)("[0-9]","[A-Fa-f]"),n=(0,r.subexp)((0,r.subexp)("%[EFef]"+t+"%"+t+t+"%"+t+t)+"|"+(0,r.subexp)("%[89A-Fa-f]"+t+"%"+t+t)+"|"+(0,r.subexp)("%"+t+t)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",o=(0,r.merge)("[\\:\\/\\?\\#\\[\\]\\@]",i),a=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",s=e?"[\\uE000-\\uF8FF]":"[]",u=(0,r.merge)("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",a),l=(0,r.subexp)("[A-Za-z]"+(0,r.merge)("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),c=(0,r.subexp)((0,r.subexp)(n+"|"+(0,r.merge)(u,i,"[\\:]"))+"*"),f=(0,r.subexp)((0,r.subexp)("25[0-5]")+"|"+(0,r.subexp)("2[0-4][0-9]")+"|"+(0,r.subexp)("1[0-9][0-9]")+"|"+(0,r.subexp)("[1-9][0-9]")+"|[0-9]"),p=(0,r.subexp)(f+"\\."+f+"\\."+f+"\\."+f),h=(0,r.subexp)(t+"{1,4}"),d=(0,r.subexp)((0,r.subexp)(h+"\\:"+h)+"|"+p),g=(0,r.subexp)((0,r.subexp)(h+"\\:")+"{6}"+d),m=(0,r.subexp)("\\:\\:"+(0,r.subexp)(h+"\\:")+"{5}"+d),y=(0,r.subexp)((0,r.subexp)(h)+"?\\:\\:"+(0,r.subexp)(h+"\\:")+"{4}"+d),v=(0,r.subexp)((0,r.subexp)((0,r.subexp)(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+(0,r.subexp)(h+"\\:")+"{3}"+d),b=(0,r.subexp)((0,r.subexp)((0,r.subexp)(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+(0,r.subexp)(h+"\\:")+"{2}"+d),_=(0,r.subexp)((0,r.subexp)((0,r.subexp)(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),w=(0,r.subexp)((0,r.subexp)((0,r.subexp)(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),E=(0,r.subexp)((0,r.subexp)((0,r.subexp)(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),x=(0,r.subexp)((0,r.subexp)((0,r.subexp)(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),S=(0,r.subexp)([g,m,y,v,b,_,w,E,x].join("|")),O=(0,r.subexp)("[vV]"+t+"+\\."+(0,r.merge)(u,i,"[\\:]")+"+"),P=(0,r.subexp)("\\["+(0,r.subexp)(S+"|"+O)+"\\]"),T=(0,r.subexp)((0,r.subexp)(n+"|"+(0,r.merge)(u,i))+"*"),A=(0,r.subexp)(P+"|"+p+"(?!"+T+")|"+T),k=(0,r.subexp)("[0-9]*"),C=(0,r.subexp)((0,r.subexp)(c+"@")+"?"+A+(0,r.subexp)("\\:"+k)+"?"),N=(0,r.subexp)(n+"|"+(0,r.merge)(u,i,"[\\:\\@]")),L=(0,r.subexp)(N+"*"),I=(0,r.subexp)(N+"+"),j=(0,r.subexp)((0,r.subexp)(n+"|"+(0,r.merge)(u,i,"[\\@]"))+"+"),D=(0,r.subexp)((0,r.subexp)("\\/"+L)+"*"),R=(0,r.subexp)("\\/"+(0,r.subexp)(I+D)+"?"),F=(0,r.subexp)(j+D),U=(0,r.subexp)(I+D),$="(?!"+N+")",M=((0,r.subexp)(D+"|"+R+"|"+F+"|"+U+"|"+$),(0,r.subexp)((0,r.subexp)(N+"|"+(0,r.merge)("[\\/\\?]",s))+"*")),z=(0,r.subexp)((0,r.subexp)(N+"|[\\/\\?]")+"*"),q=(0,r.subexp)((0,r.subexp)("\\/\\/"+C+D)+"|"+R+"|"+U+"|"+$),G=(0,r.subexp)(l+"\\:"+q+(0,r.subexp)("\\?"+M)+"?"+(0,r.subexp)("\\#"+z)+"?"),B=(0,r.subexp)((0,r.subexp)("\\/\\/"+C+D)+"|"+R+"|"+F+"|"+$),V=(0,r.subexp)(B+(0,r.subexp)("\\?"+M)+"?"+(0,r.subexp)("\\#"+z)+"?");return(0,r.subexp)(G+"|"+V),(0,r.subexp)(l+"\\:"+q+(0,r.subexp)("\\?"+M)+"?"),(0,r.subexp)((0,r.subexp)("\\/\\/("+(0,r.subexp)("("+c+")@")+"?("+A+")"+(0,r.subexp)("\\:("+k+")")+"?)")+"?("+D+"|"+R+"|"+U+"|"+$+")"),(0,r.subexp)("\\?("+M+")"),(0,r.subexp)("\\#("+z+")"),(0,r.subexp)((0,r.subexp)("\\/\\/("+(0,r.subexp)("("+c+")@")+"?("+A+")"+(0,r.subexp)("\\:("+k+")")+"?)")+"?("+D+"|"+R+"|"+F+"|"+$+")"),(0,r.subexp)("\\?("+M+")"),(0,r.subexp)("\\#("+z+")"),(0,r.subexp)((0,r.subexp)("\\/\\/("+(0,r.subexp)("("+c+")@")+"?("+A+")"+(0,r.subexp)("\\:("+k+")")+"?)")+"?("+D+"|"+R+"|"+U+"|"+$+")"),(0,r.subexp)("\\?("+M+")"),(0,r.subexp)("\\#("+z+")"),(0,r.subexp)("("+c+")@"),(0,r.subexp)("\\:("+k+")"),{NOT_SCHEME:new RegExp((0,r.merge)("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp((0,r.merge)("[^\\%\\:]",u,i),"g"),NOT_HOST:new RegExp((0,r.merge)("[^\\%\\[\\]\\:]",u,i),"g"),NOT_PATH:new RegExp((0,r.merge)("[^\\%\\/\\:\\@]",u,i),"g"),NOT_PATH_NOSCHEME:new RegExp((0,r.merge)("[^\\%\\/\\@]",u,i),"g"),NOT_QUERY:new RegExp((0,r.merge)("[^\\%]",u,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp((0,r.merge)("[^\\%]",u,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp((0,r.merge)("[^]",u,i),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp((0,r.merge)("[^\\%]",u,o),"g"),PCT_ENCODED:new RegExp(n,"g"),IPV6ADDRESS:new RegExp("\\[?("+S+")\\]?","g")}}t.default=i(!1)},function(e,t,n){(function(e,r){var i,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};!function(a){var s="object"==o(t)&&t&&!t.nodeType&&t,u="object"==o(e)&&e&&!e.nodeType&&e,l="object"==(void 0===r?"undefined":o(r))&&r;l.global!==l&&l.window!==l&&l.self!==l||(a=l);var c,f,p=2147483647,h=36,d=/^xn--/,g=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,b=String.fromCharCode;function _(e){throw new RangeError(y[e])}function w(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+w((e=e.replace(m,".")).split("."),t).join(".")}function x(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function S(e){return w(e,(function(e){var t="";return e>65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,n){var r=0;for(e=n?v(e/700):e>>1,e+=v(e/t);e>455;r+=h)e=v(e/35);return v(r+36*e/(e+38))}function T(e){var t,n,r,i,o,a,s,u,l,c,f,d=[],g=e.length,m=0,y=128,b=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&_("not-basic"),d.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=m,a=1,s=h;i>=g&&_("invalid-input"),((u=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:h)>=h||u>v((p-m)/a))&&_("overflow"),m+=u*a,!(u<(l=s<=b?1:s>=b+26?26:s-b));s+=h)a>v(p/(c=h-l))&&_("overflow"),a*=c;b=P(m-o,t=d.length+1,0==o),v(m/t)>p-y&&_("overflow"),y+=v(m/t),m%=t,d.splice(m++,0,y)}return S(d)}function A(e){var t,n,r,i,o,a,s,u,l,c,f,d,g,m,y,w=[];for(d=(e=x(e)).length,t=128,n=0,o=72,a=0;a<d;++a)(f=e[a])<128&&w.push(b(f));for(r=i=w.length,i&&w.push("-");r<d;){for(s=p,a=0;a<d;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>v((p-n)/(g=r+1))&&_("overflow"),n+=(s-t)*g,t=s,a=0;a<d;++a)if((f=e[a])<t&&++n>p&&_("overflow"),f==t){for(u=n,l=h;!(u<(c=l<=o?1:l>=o+26?26:l-o));l+=h)y=u-c,m=h-c,w.push(b(O(c+y%m,0))),u=v(y/m);w.push(b(O(u,0))),o=P(n,g,r==i),n=0,++r}++n,++t}return w.join("")}if(c={version:"1.4.1",ucs2:{decode:x,encode:S},decode:T,encode:A,toASCII:function(e){return E(e,(function(e){return g.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return E(e,(function(e){return d.test(e)?T(e.slice(4).toLowerCase()):e}))}},"object"==o(n(3))&&n(3))void 0===(i=function(){return c}.call(t,n,t,e))||(e.exports=i);else if(s&&u)if(e.exports==s)u.exports=c;else for(f in c)c.hasOwnProperty(f)&&(s[f]=c[f]);else a.punycode=c}(void 0)}).call(this,n(8)(e),n(1))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}}},function(e,t,n){(function(t){var r=n(7),i=n(21),o=n(34),a=n(35),s=n(45),u=n(48),l=n(49),c=/~(?:[^01]|$)/g,f={},p=["relative","remote"],h=["absolute","uri"],d={};function g(e,t){r.isString(e)&&(e=u(e)),r.isString(t)&&(t=u(t));var n,i,a=O(r.isUndefined(t)?"":t);return h.indexOf(a.reference)>-1?i=a:(n=r.isUndefined(e)?void 0:O(e),r.isUndefined(n)?i=a:((i=n).path=u(o.join(n.path,a.path)),i.query=function(e,t){var n={};function i(e){r.forOwn(e,(function(e,t){n[t]=e}))}return i(s.parse(e||"")),i(s.parse(t||"")),0===Object.keys(n).length?void 0:s.stringify(n)}(n.query,a.query))),i.fragment=void 0,(-1===h.indexOf(i.reference)&&0===i.path.indexOf("../")?"../":"")+l.serialize(i)}function m(e){return p.indexOf(_(e))>-1}function y(e){return r.isUndefined(e.error)&&"invalid"!==e.type}function v(e,t){var n=e;return t.forEach((function(e){if(!(e in n))throw Error("JSON Pointer points to missing location: "+I(t));n=n[e]})),n}function b(e){return Object.keys(e).filter((function(e){return"$ref"!==e}))}function _(e){var t;switch(e.uriDetails.reference){case"absolute":case"uri":t="remote";break;case"same-document":t="local";break;default:t=e.uriDetails.reference}return t}function w(e,t){var n=f[e],i=Promise.resolve(),o=r.cloneDeep(t.loaderOptions||{});return r.isUndefined(n)?(r.isUndefined(o.processContent)&&(o.processContent=function(e,t){t(void 0,JSON.parse(e.text))}),i=(i=a.load(decodeURI(e),o)).then((function(t){return f[e]={value:t},t})).catch((function(t){throw f[e]={error:t},t}))):i=i.then((function(){if(r.isError(n.error))throw n.error;return n.value})),i.then((function(e){return r.cloneDeep(e)}))}function E(e,t){var n=!0;try{if(!r.isPlainObject(e))throw new Error("obj is not an Object");if(!r.isString(e.$ref))throw new Error("obj.$ref is not a String")}catch(e){if(t)throw e;n=!1}return n}function x(e){return-1!==e.indexOf("://")||o.isAbsolute(e)?e:o.resolve(t.cwd(),e)}function S(e,t){e.error=t.message,e.missing=!0}function O(e){return l.parse(e)}function P(e,t){var n,i;if(e=r.isUndefined(e)?{}:r.cloneDeep(e),!r.isObject(e))throw new TypeError("options must be an Object");if(!r.isUndefined(e.resolveCirculars)&&!r.isBoolean(e.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(r.isUndefined(e.filter)||r.isArray(e.filter)||r.isFunction(e.filter)||r.isString(e.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!r.isUndefined(e.includeInvalid)&&!r.isBoolean(e.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!r.isUndefined(e.location)&&!r.isString(e.location))throw new TypeError("options.location must be a String");if(!r.isUndefined(e.refPreProcessor)&&!r.isFunction(e.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!r.isUndefined(e.refPostProcessor)&&!r.isFunction(e.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!r.isUndefined(e.subDocPath)&&!r.isArray(e.subDocPath)&&!N(e.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(r.isUndefined(e.resolveCirculars)&&(e.resolveCirculars=!1),e.filter=function(e){var t,n;return r.isArray(e.filter)||r.isString(e.filter)?(n=r.isString(e.filter)?[e.filter]:e.filter,t=function(e){return n.indexOf(e.type)>-1||n.indexOf(_(e))>-1}):r.isFunction(e.filter)?t=e.filter:r.isUndefined(e.filter)&&(t=function(){return!0}),function(n,r){return("invalid"!==n.type||!0===e.includeInvalid)&&t(n,r)}}(e),r.isUndefined(e.location)&&(e.location=x("./root.json")),(n=e.location.split("#")).length>1&&(e.subDocPath="#"+n[1]),i=decodeURI(e.location)===e.location,e.location=g(e.location,void 0),i&&(e.location=decodeURI(e.location)),e.subDocPath=function(e){var t;return r.isArray(e.subDocPath)?t=e.subDocPath:r.isString(e.subDocPath)?t=L(e.subDocPath):r.isUndefined(e.subDocPath)&&(t=[]),t}(e),!r.isUndefined(t))try{v(t,e.subDocPath)}catch(e){throw e.message=e.message.replace("JSON Pointer","options.subDocPath"),e}return e}function T(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~1/g,"/").replace(/~0/g,"~")}))}function A(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~/g,"~0").replace(/\//g,"~1")}))}function k(e,t){var n={};if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");return function e(t,n,i,o){var a=!0;function s(n,r){i.push(r),e(t,n,i,o),i.pop()}r.isFunction(o)&&(a=o(t,n,i)),-1===t.indexOf(n)&&(t.push(n),!1!==a&&(r.isArray(n)?n.forEach((function(e,t){s(e,t.toString())})):r.isObject(n)&&r.forOwn(n,(function(e,t){s(e,t)}))),t.pop())}(function(e,t){var n,r=[];return t.length>0&&(n=e,t.slice(0,t.length-1).forEach((function(e){e in n&&(n=n[e],r.push(n))}))),r}(e,(t=P(t,e)).subDocPath),v(e,t.subDocPath),r.cloneDeep(t.subDocPath),(function(e,i,o){var a,s,u=!0;return E(i)&&(r.isUndefined(t.refPreProcessor)||(i=t.refPreProcessor(r.cloneDeep(i),o)),a=C(i),r.isUndefined(t.refPostProcessor)||(a=t.refPostProcessor(a,o)),t.filter(a,o)&&(s=I(o),n[s]=a),b(i).length>0&&(u=!1)),u})),n}function C(e){var t,n,i,o={def:e};try{if(E(e,!0)){if(t=e.$ref,i=d[t],r.isUndefined(i)&&(i=d[t]=O(t)),o.uri=t,o.uriDetails=i,r.isUndefined(i.error)){o.type=_(o);try{["#","/"].indexOf(t[0])>-1?N(t,!0):t.indexOf("#")>-1&&N(i.fragment,!0)}catch(e){o.error=e.message,o.type="invalid"}}else o.error=o.uriDetails.error,o.type="invalid";(n=b(e)).length>0&&(o.warning="Extra JSON Reference properties will be ignored: "+n.join(", "))}else o.type="invalid"}catch(e){o.error=e.message,o.type="invalid"}return o}function N(e,t){var n,i=!0;try{if(!r.isString(e))throw new Error("ptr is not a String");if(""!==e){if(n=e.charAt(0),-1===["#","/"].indexOf(n))throw new Error("ptr must start with a / or #/");if("#"===n&&"#"!==e&&"/"!==e.charAt(1))throw new Error("ptr must start with a / or #/");if(e.match(c))throw new Error("ptr has invalid token(s)")}}catch(e){if(!0===t)throw e;i=!1}return i}function L(e){try{N(e,!0)}catch(e){throw new Error("ptr must be a JSON Pointer: "+e.message)}var t=e.split("/");return t.shift(),T(t)}function I(e,t){if(!r.isArray(e))throw new Error("path must be an Array");return(!1!==t?"#":"")+(e.length>0?"/":"")+A(e).join("/")}function j(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");t=P(t,e),e=r.cloneDeep(e)})).then((function(){var n={deps:{},docs:{},refs:{}};return function e(t,n,i){var a,s,u=Promise.resolve(),l=I(n.subDocPath),c=x(n.location),f=o.dirname(n.location),p=c+l;return r.isUndefined(i.docs[c])&&(i.docs[c]=t),r.isUndefined(i.deps[p])&&(i.deps[p]={},a=k(t,n),r.forOwn(a,(function(o,a){var c,h,d=x(n.location)+a,v=o.refdId=decodeURI(x(m(o)?g(f,o.uri):n.location)+"#"+(o.uri.indexOf("#")>-1?o.uri.split("#")[1]:""));i.refs[d]=o,y(o)&&(o.fqURI=v,i.deps[p][a===l?"#":a.replace(l+"/","#/")]=v,0!==d.indexOf(v+"/")?((s=r.cloneDeep(n)).subDocPath=r.isUndefined(o.uriDetails.fragment)?[]:L(decodeURI(o.uriDetails.fragment)),m(o)?(delete s.filter,s.location=v.split("#")[0],u=u.then((c=i,h=s,function(){var e=x(h.location),t=c.docs[e];return r.isUndefined(t)?w(e,h).catch((function(t){return c.docs[e]=t,t})):Promise.resolve().then((function(){return t}))}))):u=u.then((function(){return t})),u=u.then(function(t,n,i){return function(o){if(r.isError(o))S(i,o);else try{return e(o,n,t).catch((function(e){S(i,e)}))}catch(e){S(i,e)}}}(i,s,o))):o.circular=!0)}))),u}(e,t,n).then((function(){return n}))})).then((function(e){var n={},a=[],s=[],u=new i.Graph,l=x(t.location),c=l+I(t.subDocPath),f=o.dirname(l);return Object.keys(e.deps).forEach((function(e){u.setNode(e)})),r.forOwn(e.deps,(function(e,t){r.forOwn(e,(function(e){u.setEdge(t,e)}))})),(a=i.alg.findCycles(u)).forEach((function(e){e.forEach((function(e){-1===s.indexOf(e)&&s.push(e)}))})),r.forOwn(e.deps,(function(t,n){r.forOwn(t,(function(t,r){var i,o=!1,u=n+r.slice(1),l=e.refs[n+r.slice(1)],c=m(l);s.indexOf(t)>-1&&a.forEach((function(e){o||(i=e.indexOf(t))>-1&&e.forEach((function(n){o||0===u.indexOf(n+"/")&&(c&&i!==e.length-1&&"#"===t[t.length-1]||(o=!0))}))})),o&&(l.circular=!0)}))})),r.forOwn(Object.keys(e.deps).reverse(),(function(n){var i=e.deps[n],o=n.split("#"),a=e.docs[o[0]],s=L(o[1]);r.forOwn(i,(function(n,i){var u,l,c,f=n.split("#"),p=e.docs[f[0]],h=s.concat(L(i)),d=e.refs[o[0]+I(h)];if(r.isUndefined(d.error)&&r.isUndefined(d.missing))if(!t.resolveCirculars&&d.circular)d.value=d.def;else{try{d.value=v(p,L(f[1]))}catch(e){return void S(d,e)}""===o[1]&&"#"===i?e.docs[o[0]]=d.value:(u=a,l=h,c=d.value,v(u,l.slice(0,l.length-1))[l[l.length-1]]=c)}}))})),Object.keys(e.refs).forEach((function(i){var o,a,s=e.refs[i];"invalid"!==s.type&&("#"===s.fqURI[s.fqURI.length-1]&&"#"!==s.uri[s.uri.length-1]&&(s.fqURI=s.fqURI.substr(0,s.fqURI.length-1)),o=s.fqURI.split("/"),a=s.uri.split("/"),r.times(a.length-1,(function(e){var t=a[a.length-e-1],n=o.length-e-1,r=o[n];"."!==t&&".."!==t||(t=r),o[n]=t})),s.fqURI=o.join("/"),0===s.fqURI.indexOf(l)?s.fqURI=s.fqURI.replace(l,""):0===s.fqURI.indexOf(f)&&(s.fqURI=s.fqURI.replace(f,"")),"/"===s.fqURI[0]&&(s.fqURI="."+s.fqURI)),0===i.indexOf(c)&&function r(i,o,a){var s,u=o.split("#"),l=e.refs[o];n[u[0]===t.location?"#"+u[1]:I(t.subDocPath.concat(a))]=l,!l.circular&&y(l)?(s=e.deps[l.refdId],0!==l.refdId.indexOf(i)&&Object.keys(s).forEach((function(e){r(l.refdId,l.refdId+e.substr(1),a.concat(L(e)))}))):!l.circular&&l.error&&(l.error=l.error.replace("options.subDocPath","JSON Pointer"),l.error.indexOf("#")>-1&&(l.error=l.error.replace(l.uri.substr(l.uri.indexOf("#")),l.uri)),0!==l.error.indexOf("ENOENT:")&&0!==l.error.indexOf("Not Found")||(l.error="JSON Pointer points to missing location: "+l.uri))}(c,i,L(i.substr(c.length)))})),r.forOwn(e.refs,(function(e){delete e.refdId,e.missing&&(e.error=e.error.split(": ")[0]+": "+e.def.$ref)})),{refs:n,resolved:e.docs[l]}}))}"undefined"==typeof Promise&&n(16),e.exports.clearCache=function(){f={}},e.exports.decodePath=function(e){return T(e)},e.exports.encodePath=function(e){return A(e)},e.exports.findRefs=function(e,t){return k(e,t)},e.exports.findRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),w((t=P(t)).location,t)})).then((function(e){var n=r.cloneDeep(f[t.location]),i=r.cloneDeep(t),o=O(t.location);return r.isUndefined(n.refs)&&(delete i.filter,delete i.subDocPath,i.includeInvalid=!0,f[t.location].refs=k(e,i)),r.isUndefined(t.filter)||(i.filter=t.filter),r.isUndefined(o.fragment)?r.isUndefined(o.subDocPath)||(i.subDocPath=t.subDocPath):i.subDocPath=L(decodeURI(o.fragment)),{refs:k(e,i),value:e}}))}(e,t)},e.exports.getRefDetails=function(e){return C(e)},e.exports.isPtr=function(e,t){return N(e,t)},e.exports.isRef=function(e,t){return function(e,t){return E(e,t)&&"invalid"!==C(e).type}(e,t)},e.exports.pathFromPtr=function(e){return L(e)},e.exports.pathToPtr=function(e,t){return I(e,t)},e.exports.resolveRefs=function(e,t){return j(e,t)},e.exports.resolveRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),w((t=P(t)).location,t)})).then((function(e){var n=r.cloneDeep(t),i=O(t.location);return r.isUndefined(i.fragment)||(n.subDocPath=L(decodeURI(i.fragment))),j(e,n).then((function(t){return{refs:t.refs,resolved:t.resolved,value:e}}))}))}(e,t)}}).call(this,n(2))},function(e,t,n){var r=n(22);e.exports={Graph:r.Graph,json:n(24),alg:n(25),version:r.version}},function(e,t,n){e.exports={Graph:n(5),version:n(23)}},function(e,t,n){e.exports="2.1.5"},function(e,t,n){var r=n(0),i=n(5);function o(e){return r.map(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.isUndefined(t.name)||(i.name=t.name),r.isUndefined(n)||(i.value=n),i}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new i(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},function(e,t,n){e.exports={components:n(26),dijkstra:n(9),dijkstraAll:n(27),findCycles:n(28),floydWarshall:n(29),isAcyclic:n(30),postorder:n(31),preorder:n(32),prim:n(33),tarjan:n(11),topsort:n(12)}},function(e,t,n){var r=n(0);e.exports=function(e){var t,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,t.push(i),r.each(e.successors(i),o),r.each(e.predecessors(i),o))}return r.each(e.nodes(),(function(e){t=[],o(e),t.length&&i.push(t)})),i}},function(e,t,n){var r=n(9),i=n(0);e.exports=function(e,t,n){return i.transform(e.nodes(),(function(i,o){i[o]=r(e,o,t,n)}),{})}},function(e,t,n){var r=n(0),i=n(11);e.exports=function(e){return r.filter(i(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},function(e,t,n){var r=n(0);e.exports=function(e,t,n){return function(e,t,n){var r={},i=e.nodes();return i.forEach((function(e){r[e]={},r[e][e]={distance:0},i.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var i=n.v===e?n.w:n.v,o=t(n);r[e][i]={distance:o,predecessor:e}}))})),i.forEach((function(e){var t=r[e];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[e],i=t[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(e,t||i,n||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(12);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},function(e,t,n){var r=n(13);e.exports=function(e,t){return r(e,t,"post")}},function(e,t,n){var r=n(13);e.exports=function(e,t){return r(e,t,"pre")}},function(e,t,n){var r=n(0),i=n(5),o=n(10);e.exports=function(e,t){var n,a=new i,s={},u=new o;function l(e){var r=e.v===n?e.w:e.v,i=u.priority(r);if(void 0!==i){var o=t(e);o<i&&(s[r]=n,u.decrease(r,o))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var c=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(l)}return a}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return r.exec(e).slice(1)};function o(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,r="/"===a.charAt(0))}return(r?"/":"")+(t=n(o(t.split("/"),(function(e){return!!e})),!r).join("/"))||"."},t.normalize=function(e){var r=t.isAbsolute(e),i="/"===a(e,-1);return(e=n(o(e.split("/"),(function(e){return!!e})),!r).join("/"))||r||(e="."),e&&i&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u;break}var l=[];for(u=s;u<i.length;u++)l.push("..");return(l=l.concat(o.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},t.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){return i(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(2))},function(e,t,n){var r="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},i={file:n(36),http:n(14),https:n(14)},o="object"===("undefined"==typeof window?"undefined":r(window))||"function"==typeof importScripts?i.http:i.file;"undefined"==typeof Promise&&n(16),e.exports.load=function(e,t){var n=Promise.resolve();return void 0===t&&(t={}),(n=n.then((function(){if(void 0===e)throw new TypeError("location is required");if("string"!=typeof e)throw new TypeError("location must be a string");if(void 0!==t){if("object"!==(void 0===t?"undefined":r(t)))throw new TypeError("options must be an object");if(void 0!==t.processContent&&"function"!=typeof t.processContent)throw new TypeError("options.processContent must be a function")}}))).then((function(){return new Promise((function(n,r){(function(e){var t=function(e){return void 0!==e&&(e=-1===e.indexOf("://")?"":e.split("://")[0]),e}(e),n=i[t];if(void 0===n){if(""!==t)throw new Error("Unsupported scheme: "+t);n=o}return n})(e).load(e,t||{},(function(e,t){e?r(e):n(t)}))}))})).then((function(e){return t.processContent?new Promise((function(n,i){t.processContent("object"===(void 0===e?"undefined":r(e))?e:{text:e},(function(e,t){e?i(e):n(t)}))})):"object"===(void 0===e?"undefined":r(e))?e.text:e}))}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw r;e(r)}},function(e,t,n){var r,i="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};"undefined"!=typeof window?r=window:"undefined"!=typeof self?r=self:(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0);var o=n(38),a=n(39),s=n(15),u=n(40),l=n(42);function c(){}var f=t=e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=v,f.getXHR=function(){if(!(!r.XMLHttpRequest||r.location&&"file:"==r.location.protocol&&r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function h(e){if(!s(e))return e;var t=[];for(var n in e)d(t,n,e[n]);return t.join("&")}function d(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach((function(n){d(e,t,n)}));else if(s(n))for(var r in n)d(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function g(e){for(var t,n,r={},i=e.split("&"),o=0,a=i.length;o<a;++o)-1==(n=(t=i[o]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function m(e){return/[\/+]json($|[^-\w])/.test(e)}function y(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,n,r,i,o=e.split(/\r?\n/),a={},s=0,u=o.length;s<u;++s)-1!==(t=(n=o[s]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),i=p(n.slice(t+1)),a[r]=i);return a}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function v(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new y(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function b(e,t,n){var r=f("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}f.serializeObject=h,f.parseString=g,f.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},f.serialize={"application/x-www-form-urlencoded":h,"application/json":JSON.stringify},f.parse={"application/x-www-form-urlencoded":g,"application/json":JSON.parse},u(y.prototype),y.prototype._parseBody=function(e){var t=f.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&m(this.type)&&(t=f.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},y.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},f.Response=y,o(v.prototype),a(v.prototype),v.prototype.type=function(e){return this.set("Content-Type",f.types[e]||e),this},v.prototype.accept=function(e){return this.set("Accept",f.types[e]||e),this},v.prototype.auth=function(e,t,n){return 1===arguments.length&&(t=""),"object"===(void 0===t?"undefined":i(t))&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"}),this._auth(e,t,n,(function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")}))},v.prototype.query=function(e){return"string"!=typeof e&&(e=h(e)),e&&this._query.push(e),this},v.prototype.attach=function(e,t,n){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},v.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},v.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},v.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},v.prototype.buffer=v.prototype.ca=v.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},v.prototype.pipe=v.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},v.prototype._isHost=function(e){return e&&"object"===(void 0===e?"undefined":i(e))&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},v.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||c,this._finalizeQueryString(),this._end()},v.prototype._end=function(){var e=this,t=this.xhr=f.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],o=this._serializer||f.serialize[i?i.split(";")[0]:""];!o&&m(i)&&(o=f.serialize["application/json"]),o&&(n=o(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},f.agent=function(){return new l},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){l.prototype[e.toLowerCase()]=function(t,n){var r=new f.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),l.prototype.del=l.prototype.delete,f.get=function(e,t,n){var r=f("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.head=function(e,t,n){var r=f("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.options=function(e,t,n){var r=f("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.del=b,f.delete=b,f.patch=function(e,t,n){var r=f("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.post=function(e,t,n){var r=f("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.put=function(e,t,n){var r=f("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r="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},i=n(15);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},o.prototype.parse=function(e){return this._parser=e,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function(e){return this._serializer=e,this},o.prototype.timeout=function(e){if(!e||"object"!==(void 0===e?"undefined":r(e)))return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},o.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~a.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},o.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){n.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function(e){return e(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(i(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},o.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},o.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=i(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&i(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},o.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},o.prototype._appendQueryString=function(){console.trace("Unsupported")},o.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(e,t,n){var r=n(41);function i(e){if(e)return function(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}(e)}e.exports=i,i.prototype.get=function(e){return this.header[e.toLowerCase()]},i.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=r.type(t);var n=r.params(t);for(var i in n)this[i]=n[i];this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},i.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t,n){t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t,n){function r(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){r.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}})),r.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,t.arguments)}))},e.exports=r},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(44),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||void 0,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||void 0}).call(this,n(1))},function(e,t,n){(function(e,t){!function(e,n){if(!e.setImmediate){var r,i,o,a,s,u=1,l={},c=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){d(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(d,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return l[u]=i,r(u),u++},p.clearImmediate=h}function h(e){delete l[e]}function d(e){if(c)setTimeout(d,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(undefined,n)}}(t)}finally{h(e),c=!1}}}}}("undefined"==typeof self?void 0===e?void 0:e:self)}).call(this,n(1),n(2))},function(e,t,n){t.decode=t.parse=n(46),t.encode=t.stringify=n(47)},function(e,t,n){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var f,p,h,d,g=e[c].replace(s,"%20"),m=g.indexOf(n);m>=0?(f=g.substr(0,m),p=g.substr(m+1)):(f=g,p=""),h=decodeURIComponent(f),d=decodeURIComponent(p),r(a,h)?i(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){var r="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},i=function(e){switch(void 0===e?"undefined":r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,u){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===(void 0===e?"undefined":r(e))?a(s(e),(function(r){var s=encodeURIComponent(i(r))+n;return o(e[r])?a(e[r],(function(e){return s+encodeURIComponent(i(e))})).join(t):s+encodeURIComponent(i(e[r]))})).join(t):u?encodeURIComponent(i(u))+n+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){e.exports=function(e){var t=/^\\\\\?\\/.test(e),n=/[^\x00-\x80]+/.test(e);return t||n?e:e.replace(/\\/g,"/")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}));var i=l(n(19)),o=l(n(51)),a=l(n(52)),s=l(n(53)),u=l(n(54));function l(e){return e&&e.__esModule?e:{default:e}}r.SCHEMES.http=i.default,r.SCHEMES.https=o.default,r.SCHEMES.mailto=a.default,r.SCHEMES.urn=s.default,r.SCHEMES["urn:uuid"]=u.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(17);t.default=(0,r.buildExps)(!0)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(19))&&r.__esModule?r:{default:r};t.default={scheme:"https",domainHost:i.default.domainHost,parse:i.default.parse,serialize:i.default.serialize}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4),o=(r=n(18))&&r.__esModule?r:{default:r},a=n(6),s={},u="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",l="[0-9A-Fa-f]",c=(0,a.subexp)((0,a.subexp)("%[EFef][0-9A-Fa-f]%"+l+l+"%"+l+l)+"|"+(0,a.subexp)("%[89A-Fa-f][0-9A-Fa-f]%"+l+l)+"|"+(0,a.subexp)("%"+l+l)),f="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",p="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",h=(0,a.merge)(p,'[\\"\\\\]'),d=(0,a.subexp)(f+"+"+(0,a.subexp)("\\."+f+"+")+"*"),g=(0,a.subexp)("\\\\"+h),m=(0,a.subexp)(p+"|"+g),y=(0,a.subexp)('\\"'+m+'*\\"'),v=(0,a.subexp)(u+"|"+c+"|[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),b=(0,a.subexp)(d+"|\\[[\\x21-\\x5A\\x5E-\\x7E]*\\]"),_=(0,a.subexp)(d+"|"+y),w=(0,a.subexp)(_+"\\@"+b);(0,a.subexp)(w+(0,a.subexp)("\\,"+w)+"*");var E=(0,a.subexp)(v+"*"),x=E,S=(0,a.subexp)(E+"\\="+x),O=(0,a.subexp)(S+(0,a.subexp)("\\&"+S)+"*");(0,a.subexp)("\\?"+O);var P=new RegExp(u,"g"),T=new RegExp(c,"g"),A=new RegExp((0,a.merge)("[^]",f,"[\\.]",'[\\"]',h),"g"),k=(new RegExp((0,a.merge)("[^]",f,"[\\.]","[\\[]","[\\x21-\\x5A\\x5E-\\x7E]","[\\]]"),"g"),new RegExp((0,a.merge)("[^]",u,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g")),C=k;function N(e){var t=(0,i.pctDecChars)(e);return t.match(P)?t:e}t.default={scheme:"mailto",parse:function(e,t){var n=e.to=e.path?e.path.split(","):[];if(e.path=void 0,e.query){for(var r=!1,a={},s=e.query.split("&"),u=0,l=s.length;u<l;++u){var c=s[u].split("=");switch(c[0]){case"to":for(var f=c[1].split(","),p=0,h=f.length;p<h;++p)n.push(f[p]);break;case"subject":e.subject=(0,i.unescapeComponent)(c[1],t);break;case"body":e.body=(0,i.unescapeComponent)(c[1],t);break;default:r=!0,a[(0,i.unescapeComponent)(c[0],t)]=(0,i.unescapeComponent)(c[1],t)}}r&&(e.headers=a)}e.query=void 0;for(var d=0,g=n.length;d<g;++d){var m=n[d].split("@");if(m[0]=(0,i.unescapeComponent)(m[0]),t.unicodeSupport)m[1]=(0,i.unescapeComponent)(m[1],t).toLowerCase();else try{m[1]=o.default.toASCII((0,i.unescapeComponent)(m[1],t).toLowerCase())}catch(t){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}n[d]=m.join("@")}return e},serialize:function(e,t){var n=(0,a.toArray)(e.to);if(n){for(var r=0,u=n.length;r<u;++r){var l=String(n[r]),c=l.lastIndexOf("@"),f=l.slice(0,c).replace(T,N).replace(T,a.toUpperCase).replace(A,i.pctEncChar),p=l.slice(c+1);try{p=t.iri?o.default.toUnicode(p):o.default.toASCII((0,i.unescapeComponent)(p,t).toLowerCase())}catch(n){e.error=e.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}n[r]=f+"@"+p}e.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var d=[];for(var g in h)h[g]!==s[g]&&d.push(g.replace(T,N).replace(T,a.toUpperCase).replace(k,i.pctEncChar)+"="+h[g].replace(T,N).replace(T,a.toUpperCase).replace(C,i.pctEncChar));return d.length&&(e.query=d.join("&")),e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),i=new RegExp("^urn\\:((?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31}))$"),o=/^([^\:]+)\:(.*)/,a=/[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g;t.default={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(o);if(n){var i="urn:"+n[1].toLowerCase(),a=r.SCHEMES[i];a||(a=r.SCHEMES[i]={scheme:i,parse:function(e,t){return e},serialize:r.SCHEMES.urn.serialize}),e.scheme=i,e.path=n[2],e=a.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){var n=e.scheme||t.scheme;if(n&&"urn"!==n){var o=n.match(i)||["urn:"+n,n];e.scheme="urn",e.path=o[1]+":"+(e.path?e.path.replace(a,r.pctEncChar):"")}return e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),i=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;t.default={scheme:"urn:uuid",parse:function(e,t){return t.tolerant||e.path&&e.path.match(i)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,t){return t.tolerant||e.path&&e.path.match(i)?e.path=(e.path||"").toLowerCase():e.scheme=void 0,r.SCHEMES.urn.serialize(e,t)}}}]);const yt=function(e,t,n,r){let i;return n="string"==typeof n?[n]:n,e.some((e=>{const o=[...n];let a=t["localization-strings"][e];for(;a&&o.length;)a=a[o.shift()];return i=r||"string"==typeof a?a:void 0,i})),i},vt=async(e,t,n)=>{const r=new URL(n||window.location.href.replace(/(index\.html)?#.*$/,""));return r.search="",r.pathname=e,r.hash=t?"#/"+t:"",(await mt.resolveRefsAt(r.toString(),{loaderOptions:{processContent(e,t){t(void 0,JSON.parse(e.text||e.body.toString()))}}})).resolved},bt=function({field:e,schemaItems:t,metadataObj:n,getFieldAliasOrName:r,lang:i}){const o=t.findIndex((t=>t.title===e)),a=t[o],s={fieldName:r(e)},u=n.fields[e];let l=u&&u["fieldvalue-aliases"];return l&&(l.localeKey&&(l=yt(i,n,l.localeKey.split("/"),!0)),s.rawFieldValueAliasMap=JSON.parse(JSON.stringify(l)),s.aliases=[],a.enum&&a.enum.length?a.enum.forEach((t=>{s.aliases.push(yt(i,n,["fieldvalue",e,t],!0)),t in l&&"string"==typeof l[t]&&s.aliases.push(...l[t])})):Object.entries(l).forEach((([e,t])=>{Array.isArray(t)||(t=Object.values(t)),s.aliases.push(...t.filter((e=>t.every((t=>t===e||!t.toLowerCase().startsWith(e.toLowerCase()))))).map((t=>t+" ("+e+")")))})),s.fieldValueAliasMap=JSON.parse(JSON.stringify(l))),s.fieldSchema=a,s.fieldSchemaIndex=o,s.preferAlias=u.prefer_alias,s.lang=u.lang,s},_t=function({metadataObj:e,schemaItems:t,getFieldAliasOrName:n,lang:r,callback:i}){e.table.browse_fields.forEach(((o,a)=>{"string"==typeof o&&(o={set:[o]}),o.name||(o.name=o.set.join(","));const s=o.name,u=o.set,{presort:l}=o,c=u.map((i=>bt({lang:r,field:i,schemaItems:t,metadataObj:e,getFieldAliasOrName:n})));i({setName:s,browseFields:c,i:a,presort:l})}))};class wt{constructor({metadataObj:e}){this.metadataObj=e}getFieldLang(e){const{metadataObj:t}=this,n=t&&t.fields;return n&&n[e]&&n[e].lang}getFieldMatchesLocale({namespace:e,preferredLocale:t,schemaItems:n,pluginsForWork:r}){const{metadataObj:i}=this;return o=>{const a=(({namespace:e,preferredLocale:t})=>{const n=localStorage.getItem(e+"-langCodes"),r=n&&JSON.parse(n)||[t],i=[];return r.forEach((e=>{const t=e.replace(/-.*$/,"");t===e?i.push(e):i.push(e,t)})),i})({namespace:e,preferredLocale:t});if(r.isPluginField({namespace:e,field:o})){let[,,n]=r.getPluginFieldParts({namespace:e,field:o});return"{locale}"===n&&(n=t),!n||a.includes(n)}const s=this.getFieldLang(o),u=i&&i["localization-strings"];return u&&Object.keys(u).some((e=>{const t=u[e]&&u[e].fieldvalue;return t&&t[o]}))||s&&a.includes(s)||n.some((e=>e.title===o&&"string"!==e.type))}}}const Et=e=>e.replace(/\^/g,"^^").replace(/-/g,"^0"),xt=e=>e?e.replace(/(\^+)0/g,((e,t)=>t.length%2?t.slice(1)+"-":e)).replace(/\^\^/g,"^"):e;class St{constructor({pluginsInWork:e,pluginFieldMappings:t,pluginObjects:n}){this.pluginsInWork=e,this.pluginFieldMappings=t,this.pluginObjects=n}getPluginObject(e){const t=this.pluginsInWork.findIndex((([t])=>t===e));return this.pluginObjects[t]}iterateMappings(e){this.pluginFieldMappings.forEach((({placement:t,"applicable-fields":n},r)=>{const[i,{onByDefault:o,lang:a,meta:s}]=this.pluginsInWork[r],u=this.getPluginObject(i);e({plugin:u,placement:t,applicableFields:n,pluginName:i,pluginLang:a,onByDefaultDefault:o,meta:s})}))}processTargetLanguages(e,t){return!!e&&(Object.entries(e).forEach((([e,{targetLanguage:n,onByDefault:r,meta:i}])=>{Array.isArray(n)?n.forEach((n=>{t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:i})})):t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:i})})),!0)}isPluginField({namespace:e,field:t}){return t.startsWith(`${e}-plugin-`)}getPluginFieldParts({namespace:e,field:t}){let n,r,i;return(t=t.replace(`${e}-plugin-`,"")).includes("-")?[n,r,i]=t.split("-"):n=t,[n,r,i].map(xt)}}const Ot=function(e,t,n){const r=(e.baseDirectory||"")+(t.baseDirectory||"")+"/",i=(e.schemaBaseDirectory||"")+(t.schemaBaseDirectory||"")+"/",o=(e.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return{file:r+n.file.$ref,schemaFile:n.schemaFile?i+n.schemaFile:"",metadataFile:n.metadataFile?o+n.metadataFile:""}},Pt=async function({lang:e,fallbackLanguages:t,work:n,files:r,allowPlugins:i,basePath:o,languages:a,preferredLocale:s}){const u=await d(r),l=e=>u["localization-strings"][e],c=ve({locales:e.map(l),fallbackLocales:t.map(l)}).getFormatter();let f;const p=u.groups.find((e=>(f=e.files.find((t=>n===c(["workNames",e.id,t.name]))),Boolean(f)))),h=u.groups.map((e=>({name:c({key:e.name.localeKey,fallback:!0}),workNames:e.files.map((t=>c(["workNames",e.id,t.name]))),shortcuts:e.files.map((e=>e.shortcut))}))),g=Ot(u,p,f),{file:m}=g;let{schemaFile:y,metadataFile:v}=g,b="",_="";y||(y=m,b="schema"),v||(v=m,_="metadata");let w,E,x,S,O=[];if(i){const e=u["plugin-field-mapping"][p.id][f.name];e&&(x=Object.keys(e),E=Object.entries(u.plugins).filter((([e])=>x.includes(e))),O=E.map((([t])=>e[t])),S=E.map((([,e])=>e.path)),w=E)}const P=await vt(v,_,o),T=function(t){const n=P.fields&&P.fields[t];let r,i;return n&&(i=n.alias),i?"string"==typeof i?r=i:(i=i.localeKey,r=yt(e,P,i.split("/"))):(r=n.name,"object"==typeof r&&(r=r.localeKey,r=yt(e,P,r.split("/")))),r},A=O,k="undefined"==typeof process?location.href.slice(0,location.href.lastIndexOf("/")+1):process.cwd()+"/",[C,N]=await Promise.all([vt(y,b,o),w?Promise.all(S.map((e=>import(k+e)))):null]),L=new St({pluginsInWork:E,pluginFieldMappings:A,pluginObjects:N}),I=C.items.items,j=I.map((({title:e})=>({field:e,fieldAliasOrName:T(e)||e}))),D=new wt({metadataObj:P});if(a&&L){console.log("pluginsForWork",L);const{lang:e,namespace:t}=this;L.iterateMappings((({plugin:n,pluginName:r,pluginLang:i,onByDefaultDefault:o,placement:u,applicableFields:l,meta:f})=>{const p=({applicableField:n,targetLanguage:l,onByDefault:p,metaApplicableField:h}={})=>{const d=L.getPluginObject(r)||{},g=D.getFieldLang(n);d.getTargetLanguage&&(l=d.getTargetLanguage({applicableField:n,targetLanguage:l,pluginLang:i,applicableFieldLang:g}));const m=(({pluginName:e,applicableField:t,targetLanguage:n})=>Et(e)+(t?"-"+Et(t):"-")+(n?"-"+Et(n):""))({pluginName:r,applicableField:n,targetLanguage:l||i||g});"{locale}"===l&&(l=s);const y=yt(e,P,["fieldnames",n]),v=d.getFieldAliasOrName?d.getFieldAliasOrName({locales:e,lf:c,targetLanguage:l,applicableField:n,applicableFieldI18N:y,meta:f,metaApplicableField:h,targetLanguageI18N:a.getLanguageFromCode(l)}):a.getFieldNameFromPluginNameAndLocales({pluginName:r,locales:e,lf:c,targetLanguage:l,applicableFieldI18N:y,meta:f,metaApplicableField:h});j.splice("end"===u?Number.POSITIVE_INFINITY:u,0,{field:`${t}-plugin-${m}`,fieldAliasOrName:v,onByDefault:"boolean"==typeof p?p:o||!1,applicableField:n,metaApplicableField:h,fieldLang:l})};L.processTargetLanguages(l,p)||p()}))}return{fileData:f,lf:c,getFieldAliasOrName:T,metadataObj:P,schemaObj:C,schemaItems:I,fieldInfo:j,pluginsForWork:L,groupsToWorks:h,metadata:D}},Tt=({r:e,logger:t})=>{e.addEventListener("updatefound",(t=>{console.log("update found",t);const n=e.installing;n.addEventListener("statechange",(async()=>{const{state:e}=n;switch(e){case"installing":console.log("Installing new worker");break;case"installed":console.log("Installation status",e),await dt.alert("\nA new version of this offlinable app has been downloaded.\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you should close this tab\nand any other old tabs for this site in order to be able to\nbegin using the new version.\n");break;case"redundant":console.log("Installation status",e),await dt.alert("\nThere was an error during installation (to allow offline/speeded\ncache use).\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you may wish to close this tab\nand any other old tabs for this site in order to try again\nfor offline installation.\n");break;case"activating":console.log("Activating new worker");break;case"activated":console.log("Activated new worker");break;default:throw new Error(`Unknown worker update state: ${e}`)}}))}))},At=async({r:e,logger:t})=>new Promise((async(n,r)=>{navigator.serviceWorker.addEventListener("message",(({data:n})=>{const{message:r,type:i,name:o,errorType:a}=n;switch(console.log("msg1",r,e),i){case"log":return void t.addLogEntry({text:r});case"beginInstall":return void t.addLogEntry({text:"Install: Begun..."});case"finishedInstall":return void t.addLogEntry({text:"Install: Finished..."});case"beginActivate":return t.addLogEntry({text:"Activate: Caching finished"}),void t.addLogEntry({text:"Activate: Begin database resources storage..."});case"finishedActivate":return t.addLogEntry({text:"Activate: Finished..."}),void location.reload();case"error":t.addLogEntry({text:r+("dbError"===a?`Database error ${o}`:"")+"; trying again..."});break;default:console.error("Unexpected type",i)}}));const i=e.installing||e.waiting||e.active;i&&"redundant"===i.state?(await dt.alert('\nThere was likely an error installing. Click "ok" to try again.\n(Error code: Service worker is redundant)\n'),location.reload()):e.installing?console.log("INSTALLING"):e.waiting&&await dt.alert("\nAn update is in progress. After finishing any work\nyou have in them, please close this and any other existing tabs\nrunning this web application and then open the site again.\nPlease note it may take some time to install and may not show\nany indication it is installing.\n",{ok:!1})})),kt=e=>e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):"";var Ct={main({langs:e,languages:t,followParams:n,$p:r}){it("form",{class:"focus",id:"languageSelectionContainer",$on:{submit(e){e.preventDefault()}}},[["select",{name:"lang",size:e.length,$on:{click({target:{parentNode:{selectedOptions:e}}}){n("#languageSelectionContainer",(()=>{r.set("lang",e[0].value,!0)}))}}},e.map((({code:e})=>["option",{value:e},[t.getLanguageFromCode(e)]]))]],qe("#main")),history.state&&"object"==typeof history.state&&Le(document.querySelector("#languageSelectionContainer"),history.state)}};const Nt=["aqua","black","blue","fuchsia","gray","green","lime","maroon","navy","olive","purple","red","silver","teal","white","yellow"],Lt=["Helvetica, sans-serif","Verdana, sans-serif","Gill Sans, sans-serif","Avantgarde, sans-serif","Helvetica Narrow, sans-serif","sans-serif","Times, serif","Times New Roman, serif","Palatino, serif","Bookman, serif","New Century Schoolbook, serif","serif","Andale Mono, monospace","Courier New, monospace","Courier, monospace","Lucidatypewriter, monospace","Fixed, monospace","monospace","Comic Sans, Comic Sans MS, cursive","Zapf Chancery, cursive","Coronetscript, cursive","Florence, cursive","Parkavenue, cursive","cursive","Impact, fantasy","Arnoldboecklin, fantasy","Oldtown, fantasy","Blippo, fantasy","Brushstroke, fantasy","fantasy"],It=ut.repeat(2),jt=ut.repeat(3),Dt=()=>({form:qe("form#browse"),random:qe("#rand")||{},checkboxes:Ge("input[type=checkbox]")});const Rt={languageSelect:Ct,workSelect:({groups:e,lf:t,getNextAlias:n,$p:r,followParams:i})=>{const o=it("form",{id:"workSelect",class:"focus",$on:{submit(e){e.preventDefault()}}},e.map(((e,o)=>["div",[o>0?["br","br","br"]:"",["div",[t({key:e.directions.localeKey,fallback:!0})]],["br"],["select",{class:"file",name:"work"+o,dataset:{name:e.name.localeKey},$on:{change({target:{value:e}}){i("#workSelect",(()=>{r.set("work",e)}))}}},[["option",{value:""},["--"]],...e.files.map((({name:r})=>["option",{value:t(["workNames",e.id,r])},[n()]]))]]]])),qe("#main"));return history.state&&"object"==typeof history.state&&Le(document.querySelector("#workSelect"),history.state),o},workDisplay:{bdo:({fallbackDirection:e,message:t})=>["div",{style:"display: inline; direction: "+e},[t]],columnsTable:({ld:e,fieldInfo:t,$p:n,le:r,iil:i,l:o,metadataObj:a,preferredLocale:s,schemaItems:u,fieldMatchesLocale:l})=>["table",{border:"1",cellpadding:"5",align:"center"},[["tr",[["th",[e("fieldno")]],["th",{align:"left",width:"20"},[e("field_enabled")]],["th",[e("field_title")]],["th",[e("fieldinterlin")]],["th",[e("fieldcss")]]]],...t.map(((e,a)=>{const s=a+1,u="checked"+s,l="field"+s,c=n.get(l);return["tr",[["td",[String(s)]],r("check-columns-to-browse","td","title",{},[r("yes","input","value",{class:"fieldSelector",id:u,name:i("checked")+s,checked:n.get(u)!==o("no")&&(n.has(u)||!1!==e.onByDefault),type:"checkbox"})]),r("check-sequence","td","title",{},[["select",{name:i("field")+s,id:l,size:"1"},t.map((({field:e,fieldAliasOrName:t},r)=>["option",{dataset:{name:e},value:t,selected:c&&c===t||r===a&&!n.has(l)},[t]]))]]),["td",[r("interlinear-tips","input","title",{name:i("interlin")+s,value:n.get("interlin"+s)})]],["td",[["input",{name:i("css")+s,value:n.get("css"+s)}]]]]]})),["tr",[["td",{colspan:3},[r("check_all","input","value",{type:"button",$on:{click(){Ge(".fieldSelector").forEach((e=>{e.checked=!0}))}}}),r("uncheck_all","input","value",{type:"button",$on:{click(){Ge(".fieldSelector").forEach((e=>{e.checked=!1}))}}}),r("checkmark_locale_fields_only","input","value",{type:"button",$on:{click(){t.forEach((({field:e},t)=>{const n=t+1,r=qe("#field"+n).selectedOptions[0].dataset.name;qe("#checked"+n).checked=l(r)}))}}})]]]]]],advancedFormatting:({ld:e,il:t,l:n,lo:r,le:i,$p:o,hideFormattingSection:a})=>["td",{id:"advancedformatting",style:{display:a?"none":"block"}},[["h3",[e("advancedformatting")]],["label",[e("textcolor"),It,["select",{name:t("colorName")},Nt.map(((e,t)=>{const i={value:n(["param_values","colors",e])};return(o.get("colorName")===n(["param_values","colors",e])||1===t&&!o.has("colorName"))&&(i.selected="selected"),r(["param_values","colors",e],i)}))]]],["label",[ut,e("or_entercolor"),It,["input",{name:t("color"),type:"text",value:o.get("color")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("backgroundcolor"),It,["select",{name:t("bgcolorName")},Nt.map(((e,t)=>{const i={value:n(["param_values","colors",e])};return(o.get("bgcolorName")===n(["param_values","colors",e])||14===t&&!o.has("bgcolorName"))&&(i.selected="selected"),r(["param_values","colors",e],i)}))]]],["label",[ut,e("or_entercolor"),It,["input",{name:t("bgcolor"),type:"text",value:o.get("bgcolor")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("text_font"),It,["select",{name:t("fontSeq"),dir:"ltr"},Lt.map(((e,t)=>{const n={value:e};return(o.get("fontSeq")===e||7===t&&!o.has("fontSeq"))&&(n.selected="selected"),["option",n,[e]]}))]]],["br"],["br"],["label",[e("font_style"),It,["select",{name:t("fontstyle")},["italic","normal","oblique"].map(((e,t)=>{const i={value:n(["param_values","fontstyle",e])};return(o.get("fontstyle")===n(["param_values","fontstyle",e])||1===t&&!o.has("fontstyle"))&&(i.selected="selected"),r(["param_values","fontstyle",e],i)}))]]],["br"],["div",[e("font_variant"),jt,["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","normal"]),checked:o.get("fontvariant")!==e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","normal"]),ut]],["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","small-caps"]),checked:o.get("fontvariant")===e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","small-caps"]),ut]]]],["br"],["label",[e("font_weight")," (normal, bold, 100-900, etc.):",It,["input",{name:t("fontweight"),type:"text",value:o.has("fontweight")?o.get("fontweight"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("font_size")," (14pt, 14px, small, 75%, etc.):",It,["input",{name:t("fontsize"),type:"text",value:o.get("fontsize"),size:"7",maxlength:"12"}]]],["br"],["label",{dir:"ltr"},[e("font_stretch"),ut,["select",{name:t("fontstretch")},["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"].map((t=>{const n={value:e(["param_values","font-stretch",t])};return(o.get("fontstretch")===t||!o.has("fontstretch")&&"normal"===t)&&(n.selected="selected"),["option",n,[e(["param_values","font-stretch",t])]]}))]]],["br"],["br"],["label",[e("letter_spacing")," (normal, .9em, -.05cm): ",["input",{name:t("letterspacing"),type:"text",value:o.has("letterspacing")?o.get("letterspacing"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("line_height")," (normal, 1.5, 22px, 150%): ",["input",{name:t("lineheight"),type:"text",value:o.has("lineheight")?o.get("lineheight"):"normal",size:"7",maxlength:"12"}]]],["br"],["br"],i("tableformatting_tips","h3","title",{},[e("tableformatting")]),["div",[e("header_wstyles"),It,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],i,a)=>["label",[["input",{name:t("header"),type:"radio",value:r,checked:o.get("header")===r||!o.has("header")&&1===i}],e(n),i===a.length-1?"":jt]]))]],["div",[e("footer_wstyles"),It,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],i,a)=>["label",[["input",{name:t("footer"),type:"radio",value:r,checked:o.get("footer")===r||!o.has("footer")&&2===i}],e(n),i===a.length-1?"":jt]]))]],["label",[["input",{name:t("headerfooterfixed"),type:"checkbox",value:n("yes"),checked:o.get("headerfooterfixed")===n("yes")}],It,e("headerfooterfixed-wishtoscroll")]],["br"],["div",[e("caption_wstyles"),It,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],i,a)=>["label",[["input",{name:t("caption"),type:"radio",value:r,checked:o.get("caption")===r||!o.has("caption")&&2===i}],e(n),i===a.length-1?"":jt]]))]],["br"],["div",[e("table_wborder"),It,["label",[["input",{name:t("border"),type:"radio",value:"1",checked:"0"!==o.get("border")}],e("yes"),jt]],["label",[["input",{name:t("border"),type:"radio",value:"0",checked:"0"===o.get("border")}],e("no")]]]],["div",[e("interlin_repeat_field_names"),It,["label",[["input",{name:t("interlintitle"),type:"radio",value:"1",checked:"0"!==o.get("interlintitle")}],e("yes"),jt]],["label",[["input",{name:t("interlintitle"),type:"radio",value:"0",checked:"0"===o.get("interlintitle")}],e("no")]]]],["label",[e("interlintitle_css"),It,["input",{name:t("interlintitle_css"),type:"text",value:o.get("interlintitle_css")||"",size:"12"}]]],["br"],["br"],i("pageformatting_tips","h3","title",{},[e("pageformatting")]),["label",[e("page_css"),It,["textarea",{name:t("pagecss"),title:n("page_css_tips"),value:o.get("pagecss")}]]],["br"],i("outputmode_tips","label","title",{},[e("outputmode"),It,["select",{name:t("outputmode")},["table","div"].map((e=>{const t={value:e};return o.get("outputmode")===e&&(t.selected="selected"),r(["param_values","outputmode",e],t)}))]])]],addRandomFormFields({il:e,ld:n,l:r,le:i,$p:o,serializeParamsAsURL:a,content:s}){[[["td",{colspan:12,align:"center"},[["br"],n("or"),["br"],["br"]]]],[["td",{colspan:12,align:"center"},[["label",[n("rnd"),jt,["input",{id:"rand",name:e("rand"),type:"checkbox",value:r("yes"),checked:o.get("rand")===r("yes")}]]],jt,["label",[n("verses-context"),ut,["input",{name:e("context"),type:"number",min:1,size:4,value:o.get("context")}]]],jt,i("view-random-URL","input","value",{type:"button",$on:{click(){const e=a(t(t({},Dt()),{},{type:"randomResult"}));qe("#randomURL").value=e}}}),["input",{id:"randomURL",type:"text"}]]]]].forEach((e=>{e&&e.length&&s.push(["tr",e])}))},getPreferences:({languageParam:e,lf:t,paramsSetter:n,replaceHash:r,getFieldAliasOrNames:i,work:o,langs:a,imfl:s,l:u,localizeParamNames:l,namespace:c,hideFormattingSection:f,groups:p,preferencesPlugin:h})=>["div",{style:{textAlign:"left"},id:"preferences",hidden:"true"},[["div",{style:"margin-top: 10px;"},[["label",[u("localizeParamNames"),["input",{id:"localizeParamNames",type:"checkbox",checked:l,$on:{change({target:{checked:e}}){localStorage.setItem(c+"-localizeParamNames",e)}}}]]]]],["div",[["label",[u("Hide formatting section"),["input",{id:"hideFormattingSection",type:"checkbox",checked:f,$on:{change({target:{checked:e}}){qe("#advancedformatting").style.display=e?"none":"block",localStorage.setItem(c+"-hideFormattingSection",e)}}}]]]]],["div",[["label",{for:"prefLangs"},[u("Preferred language(s)")]],["br"],["select",{id:"prefLangs",multiple:"multiple",size:a.length,$on:{change({target:{selectedOptions:e}}){localStorage.setItem(c+"-langCodes",JSON.stringify([...e].map((e=>e.value))))}}},a.map((e=>{let t=localStorage.getItem(c+"-langCodes");t=t&&JSON.parse(t);const n={value:e.code};return t&&t.includes(e.code)&&(n.selected="selected"),["option",n,[s(["languages",e.code])]]}))]]],h?h({$:qe,l:u,jml:it,paramsSetter:n,getDataForSerializingParamsAsURL:Dt,work:o,replaceHash:r,getFieldAliasOrNames:i}):""]],addBrowseFields({browseFields:e,fieldInfo:t,ld:n,i:r,iil:i,$p:o,content:a}){const s=o.get("work");[r>0?[["td",{colspan:12,align:"center"},[["br"],n("or"),["br"],["br"]]]]:"",[...(()=>{const t=t=>e.reduce(((e,{fieldName:n,aliases:a,fieldSchema:{minimum:u,maximum:l}},c)=>{const f=s+"-"+i(t)+(r+1)+"-"+(c+1),p=f;return e["#"].push(["td",[["label",{for:f},[n]]]],["td",[a?["datalist",{id:"dl-"+p},a.map((e=>["option",[e]]))]:"",a?["input",{name:f,id:p,class:"browseField",list:"dl-"+p,value:o.get(f,!0),$on:"start"===t?{change(e){Ge("input.browseField").forEach((t=>{t.id.includes(r+1+"-"+(c+1))&&(t.value=e.target.value)}))}}:void 0}]:["input",{name:f,id:p,type:"number",min:u,max:l,value:o.get(f,!0)}],jt]]),e}),{"#":[]});return[t("start"),["td",[["b",[n("to")]],jt]],t("end")]})(),["td",[e.length>1?n("versesendingdataoptional"):""]]],[["td",{colspan:4*e.length+2+1,align:"center"},[["table",[["tr",[e.reduce(((e,{fieldName:t,aliases:n,fieldSchema:{minimum:a,maximum:u}},l)=>{const c=s+"-"+i("anchor")+(r+1)+"-"+(l+1),f=c;return e["#"].push(["td",[["label",{for:c},[t]]]],["td",[n?["datalist",{id:"dl-"+f},n.map((e=>["option",[e]]))]:"",n?["input",{name:c,id:f,class:"browseField",list:"dl-"+f,value:o.get(c,!0)}]:["input",{name:c,id:f,type:"number",min:a,max:u,value:o.get(c,!0)}],It]]),e}),{"#":[["td",{style:"font-weight: bold; vertical-align: bottom;"},[n("anchored-at")+jt]]]}),["td",[["label",[n("field")+It,["select",{name:i("anchorfield")+(r+1),size:"1"},t.map((({fieldAliasOrName:e})=>o.get(i("anchorfield")+(r+1),!0)===e?["option",{selected:!0},[e]]:["option",[e]]))]]]]]]]]]]]]].forEach((e=>{e&&e.length&&a.push(["tr",e])}))},main({lf:e,languageParam:n,l:r,namespace:i,heading:o,fallbackDirection:a,imfl:s,langs:u,fieldInfo:l,localizeParamNames:c,serializeParamsAsURL:f,paramsSetter:p,replaceHash:h,getFieldAliasOrNames:d,hideFormattingSection:g,$p:m,metadataObj:y,il:v,le:b,ld:_,iil:w,fieldMatchesLocale:E,preferredLocale:x,schemaItems:S,content:O,groups:P,preferencesPlugin:T}){const A=m.get("work"),k=({type:e})=>f(t(t({},Dt()),{},{type:e}));it("div",{class:"focus"},[["div",{style:"float: left;"},[["button",{$on:{click(){const e=qe("#preferences");e.hidden=!e.hidden}}},[r("Preferences")]],Rt.workDisplay.getPreferences({languageParam:n,lf:e,paramsSetter:p,replaceHash:h,getFieldAliasOrNames:d,work:A,langs:u,imfl:s,l:r,localizeParamNames:c,namespace:i,groups:P,hideFormattingSection:g,preferencesPlugin:T})]],["h2",[o]],["br"],["form",{id:"browse",$custom:{$submit(){const e=k({type:"saveSettings"}).replace(/^[^#]*#/,"");console.log("history thisParams",e),history.replaceState(e,document.title,location.href);const t=k({type:"result"});location.href=t}},$on:{keydown({key:e,target:t}){"Enter"===e&&"textarea"!==t.localName.toLowerCase()&&this.$submit()},submit(e){e.preventDefault(),this.$submit()}},name:v("browse")},[["table",{align:"center"},O],["br"],["div",{style:"margin-left: 20px"},[["br"],["br"],["table",{border:"1",align:"center",cellpadding:"5"},[["tr",{valign:"top"},[["td",[Rt.workDisplay.columnsTable({ld:_,fieldInfo:l,$p:m,le:b,iil:w,l:r,metadataObj:y,preferredLocale:x,schemaItems:S,fieldMatchesLocale:E}),b("save-settings-URL","input","value",{type:"button",$on:{click(){const e=k({type:"saveSettings"});qe("#settings-URL").value=e}}}),["input",{id:"settings-URL"}],["br"],["button",{$on:{async click(e){e.preventDefault();const n=p(t(t({},Dt()),{},{workName:A,type:"startEndResult"})),r=h(n)+`&work=${A}&${A}-startEnd1=%s`;try{await navigator.clipboard.writeText(r)}catch(e){}}}},[r("Copy_shortcut_URL")]]]],Rt.workDisplay.advancedFormatting({ld:_,il:v,l:r,lo:(e,t)=>["option",t,[r({key:e,fallback:({message:e})=>(t.dir=a,e)})]],le:b,$p:m,hideFormattingSection:g})]]]]]],["p",{align:"center"},[b("submitgo","input","value",{type:"submit"})]]]]],qe("#main"))}},resultsDisplayServerOrClient:{caption:({heading:e,ranges:t})=>e+" "+t,startSeparator:({l:e})=>e("colon"),innerBrowseFieldSeparator:({l:e})=>e("comma-space"),ranges:({l:e,startRange:t,endVals:n,rangeNames:r})=>t+"-"+n.join(Rt.resultsDisplayServerOrClient.startSeparator({l:e}))+" ("+r+")",fieldValueAlias:({key:e,value:t})=>t+" ("+e+")",interlinearSegment:({lang:e,dir:t,html:n})=>`<span${e?` lang="${e}"`:""}${t?` dir="${t}"`:""}>${n}</span>`,interlinearTitle:({l:e,val:t})=>`<span class="interlintitle">${t}</span>${e("colon-space")}`,styles({$p:e,$pRaw:t,$pRawEsc:n,$pEscArbitrary:r,escapeQuotedCSS:i,escapeCSS:o,tableWithFixedHeaderAndFooter:a,checkedFieldIndexes:s,hasCaption:u}){const l=e.has("color",!0)&&"#"!==e.get("color",!0)?r("color"):n("colorName"),c=e.has("bgcolor",!0)&&"#"!==e.get("bgcolor",!0)?r("bgcolor"):n("bgcolorName"),f=1+(0+(u?2:0)),p=f+1+"em",h=`100% - ${p} - 2em - 0.5em`;return["style",[(a?`\nhtml, body, #main, #main > div {\n height: 100%; /* Needed to ensure descendent heights retain 100%; could be avoided if didn't want percent on table height */\n overflow-y: hidden; /* Not sure why we're getting extra here, but... */\n}\n.anchor-table-header {\n background-color: ${c||"white"}; /* Header background (not just for div text inside header, but for whole header area) */\n overflow-x: hidden; /* Not sure why we're getting extra here, but... */\n position: relative; /* Ensures we are still flowing, but provides anchor for absolutely positioned thead below (absolute positioning positions relative to nearest non-static ancestor; clear demo at https://www.w3schools.com/cssref/playit.asp?filename=playcss_position&preval=fixed ) */\n padding-top: ${p}; /* Provides space for the header (and caption) (the one that is absolutely positioned below relative to here) */\n height: 100%; /* Percent of the whole screen taken by the table */\n}\n.anchor-table-body {\n overflow-y: auto; /* Provides scrollbars when text fills up beyond the height */\n height: ${`calc(${h})`}; /* If < 100%, the header anchor background color will seep below table */\n}\n\n.caption, .thead .th, .tfoot .th {\n line-height: 0; /* th div will have own line-height; reducing here avoids fattening it by an inner div */\n color: transparent; /* Hides the non-div duplicated header text */\n white-space: nowrap; /* Ensures column header text uses up full width without overlap (esp. wrap no longer seems to work); this must be applied outside of the div */\n border: none; /* We don't want a border for this invisible section */\n}\ndiv.inner-caption, .thead .th div.th-inner, .tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n position: absolute; /* Puts relative to nearest non-static ancestor (our relative header anchor) */\n color: initial; /* Header must have an explicit color or it will get transparent container color */\n line-height: normal; /* Revert ancestor line height of 0 */\n}\n.thead .th div.th-inner {\n top: ${f}em; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\ndiv.inner-caption {\n top: 1em;\n}\n.tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n top: ${`calc(${h} + 0.5em)`}; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\n.zupa div.zupa1 {\n margin: 0 auto !important;\n width: 0 !important;\n}\n.zupa div.th-inner, .zupa div.inner-caption {\n width: 100%;\n margin-left: -50%;\n text-align: center;\n}\n`:"")+("y"===t("caption")?a?".caption div.inner-caption, ":".caption, ":"")+("y"===t("header")?a?"":".thead .th, ":"")+("y"===t("footer")?a?"":".tfoot .th, ":"")+".tbody td"+` {\n vertical-align: top;\n font-style: ${n("fontstyle")};\n font-variant: ${n("fontvariant")};\n font-weight: ${r("fontweight")};\n ${r("fontsize")?`font-size: ${r("fontsize")};`:""}\n font-family: ${r("fontSeq")};\n\n font-stretch: ${n("fontstretch")};\n letter-spacing: ${r("letterspacing")};\n line-height: ${r("lineheight")};\n ${l?`color: ${o(l)};`:""}\n ${c?`background-color: ${o(c)};`:""}\n}\n${o(r("pagecss")||"")}\n`+s.map(((e,n)=>("y"===t("header")?a?`.thead .th:nth-child(${n+1}) div.th-inner, `:`.thead .th:nth-child(${n+1}), `:"")+("y"===t("footer")?a?`.tfoot .th:nth-child(${n+1}) div.th-inner, `:`.tfoot .th:nth-child(${n+1}), `:"")+`.tbody td:nth-child(${n+1}) `+`{\n ${r("css"+(e+1))}\n}\n`)).join("")+(r("interlintitle_css")?`\n/* http://salzerdesign.com/test/fixedTable.html */\n.interlintitle {\n ${o(r("interlintitle_css"))}\n}\n`:"")+(c?`\nbody {\n background-color: ${c};\n}\n`:"")]]},main({tableData:e,$p:n,$pRaw:r,$pRawEsc:i,$pEscArbitrary:o,escapeQuotedCSS:a,escapeCSS:s,escapeHTML:u,l:l,localizedFieldNames:c,fieldLangs:f,fieldDirs:p,caption:h,hasCaption:d,showInterlinTitles:g,determineEnd:m,getCanonicalID:y,canonicalBrowseFieldSetName:v,getCellValue:b,checkedAndInterlinearFieldInfo:_,interlinearSeparator:w="<br /><br />"}){const E={table:[["table",{class:"table",border:r("border")||"0"}],["tr",{class:"tr"}],["td"],["th",{class:"th"}],["caption",{class:"caption"}],["thead",{class:"thead"}],["tbody",{class:"tbody"}],["tfoot",{class:"tfoot"}]],div:[["div",{class:"table",style:"display: table;"}],["div",{class:"tr",style:"display: table-row;"}],["div",{class:"td",style:"display: table-cell;"}],["div",{class:"th",style:"display: table-cell;"}],["div",{class:"caption",style:"display: table-caption;"}],["div",{class:"thead",style:"display: table-header-group;"}],["div",{class:"tbody",style:"display: table-row-group;"}],["div",{class:"tfoot",style:"display: table-footer-group;"}]],"json-array":"json","json-object":"json"},x=n.get("outputmode",!0);switch(x){case"json-object":case"json-array":throw new Error("JSON object support is currently not available")}const S=E[Object.prototype.hasOwnProperty.call(E,x)?x:"table"],[O,P,T,A,k,C,N,L]=S,[I,j,D]=_,R="yes"===r("headerfooterfixed"),F=(e,t)=>((e=JSON.parse(JSON.stringify(e))).push(t),e),U=([e,n],r)=>[e,t(t({},n),r)],$={start:!1,end:!1},M=[],{showEmptyInterlinear:z,showTitleOnSingleInterlinear:q}=this,G=(e,t)=>{if(!z&&(t||([...(e=(new DOMParser).parseFromString(e,"text/html").body).querySelectorAll("br")].forEach((e=>{e.remove()})),e=e.innerHTML),!e.trim()))return!0};return e.some(((e,t)=>{const n=m({tr:e,foundState:$});if("boolean"==typeof n)return n;const r=y({tr:e});return M.push(F(U(P,{dataset:{row:n,"canonical-type":v,"canonical-id":r}}),j.map(((n,r)=>{const i=D[r],o=i,{tdVal:a,htmlEscaped:s}=b({tr:e,idx:n}),u=o&&i.map((t=>{const{tdVal:n,htmlEscaped:r}=b({tr:e,idx:t});console.log("showEmptyInterlinear",z,r);return G(n,r)?"":o?Rt.resultsDisplayServerOrClient.interlinearSegment({lang:f[t],dir:p[t],html:(g?Rt.resultsDisplayServerOrClient.interlinearTitle({l:l,val:c[t]}):"")+n}):n})).filter((e=>""!==e));return U(T,{id:"row"+(t+1)+"col"+(r+1),lang:f[n],dir:p[n],dataset:{col:c[n]},innerHTML:(o&&!G(a,s)&&(q||u.length)?Rt.resultsDisplayServerOrClient.interlinearSegment({lang:f[n],html:(g?Rt.resultsDisplayServerOrClient.interlinearTitle({l:l,val:c[n]}):"")+a}):a)+(i&&u.length?w+u.join(w):"")})})))),!1})),["div",[Rt.resultsDisplayServerOrClient.styles({$p:n,$pRaw:r,$pRawEsc:i,$pEscArbitrary:o,escapeQuotedCSS:a,escapeCSS:s,tableWithFixedHeaderAndFooter:R,checkedFieldIndexes:j,hasCaption:d}),(B=[F(O,[h?F(k,[h,R?["div",{class:"zupa1"},[["div",{class:"inner-caption"},[["span",[h]]]]]]:""]):"","0"!==r("header")?F(C,[F(P,I.map(((e,t)=>{const n=D[t];return e=u(e)+(n?l("comma-space")+n.map((e=>c[e])).join(l("comma-space")):""),F(A,[e,R?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",r("footer")&&"0"!==r("footer")?F(L,[F(P,I.map(((e,t)=>{const n=D[t];return e=u(e)+(n?l("comma-space")+n.map((e=>c[e])).join(l("comma-space")):""),F(A,[e,R?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",F(N,M)])],R?["div",{class:"table-responsive anchor-table-header zupa"},[["div",{class:"table-responsive anchor-table-body"},B]]]:["div",{class:"table-responsive"},B])]];var B}},resultsDisplayClient:{anchorRowCol:({anchorRowCol:e})=>qe("#"+e),anchors:({escapedRow:e,escapedCol:t})=>qe('tr[data-row="'+e+'"]'+(t?'> td[data-col="'+t+'"]':"")),main(...e){let t;try{t=Rt.resultsDisplayServerOrClient.main(...e)}catch(e){"JSON support is currently not available"===e.message&&dt.alert(e.message)}it(...t,qe("#main"))}},defaultBody(){for(;st.hasChildNodes();)st.firstChild.remove();return it("div",{id:"main",role:"main"},st)}};function Ft(e,t){if(t||!this.localizeParamNames)return e;const n=/\d+(-\d+)?$/,r=e.match(n);return r?this.l10n(["params","indexed",e.replace(n,"")])+r[0]:this.l10n(["params",e])}Rt.permissions={versionChange(){qe("#versionChange").showModal()},addLogEntry({text:e}){const t=qe("#installationLogContainer");try{t.showModal();qe("#dialogContainer").hidden=!1}catch(e){}qe("#installationLog").append(e+"\n")},exitDialogs(){const e=qe("#dialogContainer");e&&(e.hidden=!0)},dbError({type:e,escapedErrorMessage:t}){e&&it("span",[e," ",t],qe("#dbError")),qe("#dbError").showModal()},errorRegistering(e){e&&it("span",[e],qe("#errorRegistering")),qe("#errorRegistering").showModal()},browserNotGrantingPersistence(){qe("#browserNotGrantingPersistence").showModal()},main({l:e,ok:t,refuse:n,close:r,closeBrowserNotGranting:i}){const o=it("dialog",{style:"text-align: center; height: 100%",id:"installationLogContainer",class:"focus"},[["p",[e("wait-installing")]],["div",{style:"height: 80%; overflow: auto;"},[["pre",{id:"installationLog"},[]]]]]);let a="";t&&(a=it("dialog",{id:"willRequestStoragePermissions",$on:{close:r}},[["section",[e("will-request-storage-permissions")]],["br"],["div",{class:"focus"},[["button",{$on:{click:t}},[e("OK")]],["br"],["br"],["button",{$on:{click:n}},[e("refuse-request-storage-permissions")]]]]]));const s=it("dialog",{id:"errorRegistering"},[["section",[e("errorRegistering")]]]);let u="";i&&(u=it("dialog",{id:"browserNotGrantingPersistence"},[["section",[e("browser-not-granting-persistence")]],["br"],["div",{class:"focus"},[["button",{$on:{click:i}},[e("OK")]]]]]));const l=it("dialog",{id:"versionChange"},[["section",[e("versionChange")]]]),c=it("dialog",{id:"dbError"},[["section",[e("dbError")]]]);return it("div",{id:"dialogContainer",style:"height: 100%"},[o,a,u,s,l,c],qe("#main")),[o,a,u,s,l,c]}};class Ut{constructor({l10n:e,params:t}={}){this.l10n=e,t||(t=location.hash.slice(1)),"string"==typeof t&&(t=new URLSearchParams(t)),this.params=t}get(e,t){return this.params.get(Ft.call(this,e,t))}getAll(e,t){return this.params.getAll(Ft.call(this,e,t))}has(e,t){return this.params.has(Ft.call(this,e,t))}delete(e,t){return this.params.delete(Ft.call(this,e,t))}set(e,t,n){return this.params.set(Ft.call(this,e,n),t)}append(e,t,n){return this.params.append(Ft.call(this,e,n),t)}toString(){return this.params.toString()}}const $t=e=>location.href.replace(/#.*$/,"")+"#"+e.toString(),Mt=function({l:e,il:t,$p:n}){return function({form:r,random:i={},checkboxes:o,type:a,fieldAliasOrNames:s=[],workName:u}){const l=new URLSearchParams(n.params),c=Ae(r,{hash:!0,empty:!0});function f(){let e=1,t=1;for(;l.has(`${u}-start${e}-${t}`,!0);){for(;l.has(`${u}-start${e}-${t}`,!0);)l.delete(`${u}-start${e}-${t}`,!0),l.delete(`${u}-end${e}-${t}`,!0),l.delete(`${u}-anchor${e}-${t}`,!0),t++;t=1,e++}}switch(Object.keys(c).forEach((e=>{l.set(e,c[e])})),l.delete(t("rand")),l.set(t("rand"),i.checked?e("yes"):e("no")),o.forEach((t=>{l.delete(t.name),t.name&&l.set(t.name,t.checked?e("yes"):e("no"))})),a){case"saveSettings":l.delete(t("rand"));break;case"shortcutResult":{l.delete(t("rand"));let n=1;for(;l.has(`anchorfield${n}`,!0);)l.delete(`anchorfield${n}`,!0),n++;for(f(),n=1;l.has(`field${n}`,!0);)l.delete(`field${n}`,!0),l.delete(`checked${n}`,!0),l.delete(`interlin${n}`,!0),l.delete(`css${n}`,!0),n++;s.forEach(((t,n)=>{l.set(`field${n+1}`,t,!0),l.set(`checked${n+1}`,e("yes"),!0),l.set(`interlin${n+1}`,""),l.set(`css${n+1}`,"")})),l.delete("work",!0)}case"startEndResult":case"randomResult":case"result":"startEndResult"===a&&f(),("randomResult"===a||i.checked)&&(l.delete(t("rand")),l.set(t("rand"),e("yes"))),l.set(t("result"),e("yes"));break;default:console.error("Unexpected type",a)}return l}},zt=["lf","fileData","metadataObj"];var qt,Gt=qt={_regexEscape:/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g,_regexParseLocale:/^([a-zA-Z]*)([_\-a-zA-Z]*)$/,_escapeRegExpPattern:function(e){return"string"!=typeof e?e:e.replace(qt._regexEscape,"\\$1")},_toLowerCase:function(e,t){return"string"!=typeof e?t&&e:e.toLowerCase()},_toUpperCase:function(e,t){return"string"!=typeof e?t&&e:e.toUpperCase()},_trim:function(e,t,n){var r,i=[],o=function(e){i.push("^"+e+"+|"+e+"+$")};if("boolean"==typeof t&&(n=t,t=null),"string"!=typeof e)return n&&e;if(Array.isArray(t)&&t.map((function(e){var t=qt._escapeRegExpPattern(e);o(t)})),"string"==typeof t){var a=qt._escapeRegExpPattern(t);o(a)}t||o("\\s");var s="("+i.join("|")+")";for(r=new RegExp(s,"g");e.match(r);)e=e.replace(r,"");return e},_parseLocale:function(e){var t,n=qt._regexParseLocale.exec(e);if(e&&n)return n[2]=qt._trim(n[2],["-","_"]),{lang:qt._toLowerCase(n[1]),countryCode:t=qt._toUpperCase(n[2])||t}},isRtlLang:function(e){var t=qt._parseLocale(e);if(t)return qt._BIDI_RTL_LANGS.indexOf(t.lang)>=0},getLangDir:function(e){return qt.isRtlLang(e)?"rtl":"ltr"}};Object.defineProperty(qt,"_BIDI_RTL_LANGS",{value:["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],writable:!1,enumerable:!0,configurable:!1});var Bt={isRtlLang:Gt.isRtlLang,getLangDir:Gt.getLangDir};const{getLangDir:Vt}=Bt,Wt=/^.* \((.*?)\)$/,Ht=e=>"string"==typeof e?e.replace(Wt,"$1"):e,Kt=async function({l:e,lang:t,fallbackLanguages:n,imfLocales:r,$p:i,skipIndexedDB:o,noIndexedDB:a,prefI18n:s,files:u,allowPlugins:l,langData:c,basePath:f="",dynamicBasePath:p=""}){const h=new gt({langData:c}),d=({schemaItems:e,fieldInfo:n,metadataObj:r,getFieldAliasOrName:i,usePreferAlias:o})=>n.map((({field:n,plugin:a})=>{if(a)return;const{preferAlias:s,fieldValueAliasMap:u}=bt({field:n,schemaItems:e,metadataObj:r,getFieldAliasOrName:i,lang:t});return o?u?(Object.entries(u).forEach((([e,t])=>{Array.isArray(t)?u[e]=t.map((t=>Rt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t}))):t&&"object"==typeof t?"string"==typeof s?u[e]=Rt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t[s]}):Object.entries(t).forEach((([t,n])=>{u[e][t]=Rt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:n})})):u[e]=Rt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t})})),!1!==s?u:void 0):void 0:!1!==s?u:void 0})),g=(e,t)=>{let n;const o=i.get(e,!0);return function e(t){return Array.isArray(t)?t.some(e):Object.values(t).some(((r,i)=>"string"!=typeof r?e(r):r===o&&(n=Object.keys(t)[i],!0)))}(r),n||t||console.log("Bad param/value",e,"::",o),n},m=kt,{fileData:y,lf:v,getFieldAliasOrName:b,schemaObj:_,metadataObj:w,pluginsForWork:E}=await Pt({files:u||this.files,allowPlugins:"boolean"==typeof l?l:this.allowPlugins,lang:t,fallbackLanguages:n,work:i.get("work"),basePath:f});console.log("pluginsForWork",E);const x=yt(t,w,"heading"),S=_.items.items,O=[],P=[],T=[];_t({metadataObj:w,schemaItems:S,getFieldAliasOrName:b,lang:t,callback({setName:e,browseFields:t,presort:n}){O.push(e),P.push(n),T.push(t)}});const A=S.map((({title:e,format:t})=>({field:e,fieldAliasOrName:b(e)||e,escapeColumn:"html"!==t,fieldLang:w.fields[e].lang}))),[k]=t,C=new wt({metadataObj:w});if(E){console.log("pluginsForWork",E);const{lang:e}=this;E.iterateMappings((({plugin:t,pluginName:n,pluginLang:r,onByDefaultDefault:i,placement:o,applicableFields:a,meta:s})=>{o="end"===o?Number.POSITIVE_INFINITY:o;const u=({applicableField:t,targetLanguage:a,onByDefault:u,metaApplicableField:l}={})=>{const c=E.getPluginObject(n)||{},f=C.getFieldLang(t);c.getTargetLanguage&&(a=c.getTargetLanguage({applicableField:t,targetLanguage:a,pluginLang:r,applicableFieldLang:f})),"{locale}"===a&&(a=k);const p=yt(e,w,["fieldnames",t]),d=c.getFieldAliasOrName?c.getFieldAliasOrName({locales:e,lf:v,targetLanguage:a,applicableField:t,applicableFieldI18N:p,meta:s,metaApplicableField:l,targetLanguageI18N:h.getLanguageFromCode(a)}):h.getFieldNameFromPluginNameAndLocales({pluginName:n,locales:e,lf:v,targetLanguage:a,applicableFieldI18N:p,meta:s,metaApplicableField:l});A.splice(o,0,{plugin:c,meta:s,placement:o,fieldAliasOrName:d,escapeColumn:!1!==c.escapeColumn,onByDefault:"boolean"==typeof u?u:i||!1,applicableField:t,metaApplicableField:l,fieldLang:a})};E.processTargetLanguages(a,u)||u()}))}const N=A.map((e=>e.fieldAliasOrName)),L=A.map((e=>e.escapeColumn)),I=A.map((({fieldLang:e})=>e!==k?e:null)),j=d({schemaItems:S,fieldInfo:A,metadataObj:w,getFieldAliasOrName:b,usePreferAlias:!1}),D=d({schemaItems:S,fieldInfo:A,metadataObj:w,getFieldAliasOrName:b,usePreferAlias:!0}),R=i.localizeParamNames=i.has("i18n",!0)?"1"===i.get("i18n",!0):"true"===s||"false"!==s&&this.localizeParamNames,F=R?t=>e(["params",t]):e=>e,U=R?t=>e(["params","indexed",t]):e=>e,$=R?(e,t="")=>i.get(F(e)+t,!0):(e,t="")=>i.get(e+t,!0),M=R?(e,t="")=>i.get(i.get("work")+"-"+U(e)+t,!0):(e,t="")=>i.get(i.get("work")+"-"+e+t,!0),z=T.findIndex(((e,t)=>M("startEnd",t+1)));if(-1!==z){const e="-",t=":",n=(M("startEnd",z+1)||"").trim(),[r,o]=n.split(e);if(void 0!==o){const e=r.split(t),n=o.split(t),a=e.length-n.length;a>0?n.unshift(...e.slice(0,a)):a<0&&e.push(...Array.from({length:-a}).fill("1")),console.log("startPartVals",e),console.log("endPartVals",n),e.forEach(((e,t)=>{const r=n[t];i.set(`${i.get("work")}-start${z+1}-${t+1}`,e,!0),i.set(`${i.get("work")}-end${z+1}-${t+1}`,r,!0)}))}}const q=T.findIndex(((e,t)=>M("start",t+1+"-1"))),G=T[q],B=O[q],V=G.map((e=>e.fieldName)),W=T[0],H=O[0],K=W.map((e=>e.fieldName)),X=G.map((e=>e.fieldSchema.type)),Y=e=>V.map(((t,n)=>i.get(i.get("work")+"-"+e+(q+1)+"-"+(n+1),!0))),J=Y("start"),Z=Y("end"),[Q,ee]=(({starts:t,ends:n,applicableBrowseFieldNames:r,heading:i})=>{let o;const a="0"!==g("caption");if(a){const a=Rt.resultsDisplayServerOrClient.startSeparator({l:e}),s=Rt.resultsDisplayServerOrClient.innerBrowseFieldSeparator({l:e}),u=(()=>{const i=[],o=t.reduce(((e,t,r)=>{const o=e+t;return t===n[r]?o+(r>0?s:" "):(i.push(n[r]),o+a)}),"").slice(0,-a.length),u=r.join(s);return kt(Rt.resultsDisplayServerOrClient.ranges({l:e,startRange:o,endVals:i,rangeNames:u}))})();o=Rt.resultsDisplayServerOrClient.caption({heading:i,ranges:u})}return[a,o]})({starts:J,ends:Z,applicableBrowseFieldNames:V,heading:x}),te="1"===g("interlintitle");console.log("rand","yes"===$("rand"));const ne=(e,t)=>{let n;if(/^\d+$/.test(e)||Wt.test(e))n=Ht(e);else{const{rawFieldValueAliasMap:r}=G[t];let i;if(r){const t=Object.entries(r);Array.isArray(t[0][1])?t.some((([t,n])=>!!n.includes(e)&&(i=t,!0))):t.some((([t,n])=>!!Object.values(n).includes(e)&&(i=t,!0)))}n=void 0===i?e:i}return"integer"===X[t]?Number.parseInt(n):n},re=y.name,ie=J.map(ne),oe=Z.map(ne);let ae,se=!1;if(o||a){const e=P[q];if(this.noDynamic)({resolved:{data:ae}}=await mt.resolveRefs(y.file)),(({presort:e,tableData:t,applicableBrowseFieldNames:n,localizedFieldNames:r})=>{e&&t.sort(((e,t)=>{let i;return n.some((n=>{const o=r.indexOf(n),a=e[o]<t[o],s=e[o]>t[o];return i=s?1:-1,a||s})),i}))})({presort:e,tableData:ae,applicableBrowseFieldNames:V,localizedFieldNames:N});else{const e=`${p}textbrowser?${i.toString()}`;ae=await(await fetch(e)).json(),se=!0}}else ae=await new Promise(((e,t)=>{const n=this.namespace+"-textbrowser-cache-data";indexedDB.open(n).onsuccess=({target:{result:t}})=>{const n="files-to-cache-"+re;t.transaction(n).objectStore(n).index("browseFields-"+B).getAll(IDBKeyRange.bound(ie,oe)).onsuccess=({target:{result:t}})=>{const n=t.map((e=>e.value));e(n)}}}));!se&&E&&(A.forEach((({plugin:e,placement:t},n)=>{e&&ae.forEach(((e,n)=>{e.splice(t,0,null)}))})),A.forEach((({plugin:e,applicableField:t,fieldLang:n,meta:r,metaApplicableField:o},a)=>{if(!e)return;const s=A.findIndex((({field:e})=>e===t));ae.forEach(((u,l)=>{const c=u[s];u[a]=e.getCellData&&e.getCellData({tr:u,tableData:ae,i:l,j:a,applicableField:t,fieldInfo:A,applicableFieldIdx:s,applicableFieldText:c,fieldLang:n,getLangDir:Vt,meta:r,metaApplicableField:o,$p:i,thisObj:this})||c})),console.log("applicableFieldIdx",s)})));const ue=Vt(k),le=I.map((e=>{if(!e)return null;const t=Vt(e);return t!==ue?t:null})),ce={tableData:ae,$p:i,$pRaw:g,$pRawEsc:e=>kt(g(e)),$pEscArbitrary:e=>kt(i.get(e,!0)),escapeQuotedCSS:e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),escapeCSS:m,escapeHTML:kt,l:e,localizedFieldNames:N,fieldLangs:I,fieldDirs:le,caption:ee,hasCaption:Q,showInterlinTitles:te,determineEnd:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,applicableBrowseFieldNames:r,startsRaw:i,endsRaw:o})=>({tr:a,foundState:s})=>{const u=[],l=r.map((r=>{const i=n.indexOf(r);return void 0!==e[i]?u.push(t[i][a[i]]):u.push(a[i]),a[i]}));if(!s.start){if(i.some(((e,t)=>e!==l[t])))return!1;s.start=!0}if(o.every(((e,t)=>e===l[t])))s.end=!0;else if(s.end)return!0;return u.join("-")})({applicableBrowseFieldNames:V,fieldValueAliasMap:j,fieldValueAliasMapPreferred:D,localizedFieldNames:N,startsRaw:ie,endsRaw:oe}),canonicalBrowseFieldSetName:H,getCanonicalID:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,canonicalBrowseFieldNames:r})=>({tr:i,foundState:o})=>r.map((r=>{const o=n.indexOf(r);return void 0!==e[o]?t[o][i[o]]:i[o]})).join("-"))({canonicalBrowseFieldNames:K,fieldValueAliasMap:j,fieldValueAliasMapPreferred:D,localizedFieldNames:N}),getCellValue:(({fieldValueAliasMapPreferred:t,escapeColumnIndexes:n})=>({tr:r,idx:i})=>{let o=void 0!==t[i]?t[i][r[i]]:r[i];return o&&"object"==typeof o&&(o=Object.values(o)),Array.isArray(o)&&(o=o.join(e("comma-space"))),!n[i]&&this.trustFormatHTML||"string"!=typeof o?{tdVal:o}:{tdVal:kt(o),htmlEscaped:!0}})({fieldValueAliasMapPreferred:D,escapeColumnIndexes:L,escapeHTML:kt}),checkedAndInterlinearFieldInfo:(({localizedFieldNames:t})=>{let n,r,o=1,a=[];do{n=i.get("field"+o,!0),r=i.get("checked"+o,!0),o++,!n||r!==e("yes")&&null!==r||a.push(n)}while(n);a=a.filter((e=>t.includes(e)));const s=a.map((e=>t.indexOf(e))),u=s.map(((e,t)=>{const n=i.get("interlin"+(e+1),!0);return n&&n.split(/\s*,\s*/).map((e=>Number.parseInt(e)-1)).filter((e=>!Number.isNaN(e)))}));return[a,s,u]})({localizedFieldNames:N}),interlinearSeparator:this.interlinearSeparator};return{fieldInfo:A,$p:i,applicableBrowseFieldSet:G,fieldValueAliasMapPreferred:D,lf:v,iil:U,ilRaw:$,browseFieldSets:T,lang:t,metadataObj:w,fileData:y,templateArgs:ce}};async function Xt(){try{Rt.permissions.addLogEntry({text:"Worker registration: Beginning..."});if(!await navigator.storage.persist())return void Rt.permissions.browserNotGrantingPersistence();await(async({serviceWorkerPath:e,logger:t})=>{let n;console.log("--ready to register service worker",e);try{n=await navigator.serviceWorker.register(e,{type:"module"})}catch(t){return console.log("serviceWorkerPath",e),void await dt.alert("\nThere was an error during registration (for offline ability).\nPlease refresh the page if you wish to reattempt.\n")}return t.addLogEntry({text:"Worker registration: Complete"}),At({r:n,logger:t})})({serviceWorkerPath:this.serviceWorkerPath,logger:Rt.permissions})}catch(e){if(console.log("err",e),e&&"object"==typeof e){const{errorType:t}=e;if("versionChange"===t)return void Rt.permissions.versionChange()}Rt.permissions.errorRegistering(kt(e&&e.message))}}async function Yt(e,t){await new Promise(((e,n)=>{const[,r,i]=Rt.permissions.main({l:t,ok:async()=>{const e=await Notification.requestPermission();r.close(e)},refuse:()=>{r.close()},close:async()=>{try{if(!r.returnValue)return void function(){localStorage.setItem(this.namespace+"-refused","true")}()}catch(e){console.log("err",e),Rt.permissions.errorRegistering(kt(e&&e.message))}switch(r.returnValue){case"denied":case"default":return void e();case"granted":if(navigator.serviceWorker.controller)return void e();await Xt.call(this);break;default:console.error("Unexpected returnValue",r.returnValue)}},closeBrowserNotGranting:e=>{i.close()}});r.showModal()}))}class Jt{constructor(e){const t=new URL("node_modules/textbrowser/resources/index.js",location);this.site=e.site||"site.json";const n=e.stylesheets||["@builtin"],r=n.indexOf("@builtin");var i,o;-1!==r&&n.splice(r,1,new URL("index.css",t).href),this.stylesheets=n,o=e,(i=this).userJSON=o.userJSON||"resources/user.json",i.languages=o.languages||new URL("../appdata/languages.json",new URL("node_modules/textbrowser/resources/index.js",location)).href,i.serviceWorkerPath=o.serviceWorkerPath||`sw.js?pathToUserJSON=${encodeURIComponent(i.userJSON)}&stylesheets=${encodeURIComponent(JSON.stringify(i.stylesheets||[]))}`,i.files=o.files||"files.json",i.namespace=o.namespace||"textbrowser",this.allowPlugins=e.allowPlugins,this.dynamicBasePath=e.dynamicBasePath,this.trustFormatHTML=e.trustFormatHTML,this.requestPersistentStorage=e.requestPersistentStorage,this.localizeParamNames=void 0===e.localizeParamNames||e.localizeParamNames,this.hideFormattingSection=Boolean(e.hideFormattingSection),this.preferencesPlugin=e.preferencesPlugin,this.interlinearSeparator=e.interlinearSeparator,this.showEmptyInterlinear=e.showEmptyInterlinear,this.showTitleOnSingleInterlinear=e.showTitleOnSingleInterlinear,this.noDynamic=e.noDynamic,this.skipIndexedDB=e.skipIndexedDB}async init(){return this._stylesheetElements=await be(this.stylesheets),this.displayLanguages()}async displayLanguages(){try{const[e,t]=await d([this.languages,this.site]);this.langData=e,this.siteData=t;const n=this.paramChange();return window.addEventListener("hashchange",(()=>this.paramChange())),n}catch(e){console.log("err",e),dt.alert(e)}}getWorkData(e){try{return Pt.call(this,t(t({},e),{},{files:this.files,allowPlugins:this.allowPlugins}))}catch(e){console.log("err",e),dt.alert("catch:"+e)}}getDirectionForLanguageCode(e){const t=this.langData.languages,n=t.find((t=>t.code===e));return n&&n.direction||t.find((t=>t.code.startsWith(e+"-")))}getFieldNameAndValueAliases(e){return bt(t(t({},e),{},{lang:this.lang}))}getBrowseFieldData(e){return _t(t(t({},e),{},{lang:this.lang}))}async paramChange(){Rt.defaultBody();const e=this.$p="string"==typeof history.state?new Ut({params:history.state}):new Ut,n=(t,n)=>{const r=document.querySelector(t),i=location.href.replace(/#.*$/,"")+"#"+e.toString();history.replaceState(Ae(r,{hash:!0,empty:!0}),document.title,i),n(),location.hash="#"+e.toString()},r=new gt({langData:this.langData}),{lang:i,langs:o,languageParam:a,fallbackLanguages:s}=r.getLanguageInfo({$p:e});this.lang=i;const[u]=i,l=this.getDirectionForLanguageCode(u);document.documentElement.lang=u,document.dir=l;const c=(()=>{const e=e=>this.siteData["localization-strings"][e];return ve({locales:i.map(e),fallbackLocales:s.map(e)}).getFormatter()})();document.title=c("browser-title");const f=localStorage.getItem(this.namespace+"-refused"),p=await navigator.storage.persisted(),h=await navigator.serviceWorker.getRegistration(this.serviceWorkerPath),g=e.get("result"),m=async()=>{if(g)return;!(f||navigator.serviceWorker.controller&&p)&&(p?(Rt.permissions.main({l:c}),await Xt.call(this)):await Yt.call(this,o,c),Rt.permissions.exitDialogs())};if(h){const e=h.installing||h.waiting||h.active;if(!e)return console.error("Unexpected error: worker registration received without a worker."),void await m();Rt.permissions.main({l:c});setInterval((()=>{h.update()}),36e5),console.log("worker.state",e.state);const t=async()=>{try{return At({r:h,langs:o,languages:this.languages,logger:Rt.permissions})}catch(e){return console.log("err",e),dt.alert("\n There was an unexpected error activating the new version;\n please save any unfinished work, close this tab, and try\n opening this site again.\n\n Please contact a service administrator if the problem\n persists (Error type: worker activation).\n ")}};switch(e.state){case"installing":t(),Tt({r:h,logger:{addLogEntry(e){console.log(e)}}});break;case"installed":await t();break;case"activating":return await dt.alert("\n Please wait for a short while as we work to update to a new version.\n "),t(),void navigator.serviceWorker.onmessage({data:"finishActivate"});case"activated":Tt({r:h,logger:{addLogEntry(e){console.log(e)}}});break;case"redundant":return void await t();default:console.log("Unexpected worker.state",e.state)}}else await m();if(Rt.permissions.exitDialogs(),!a)return e.l10n=c,document.title=c("languages-title"),void Rt.languageSelect.main({langs:o,languages:r,followParams:n,$p:e});return Ie({$p:e,lang:i,langs:o,langData:this.langData,fallbackLanguages:s,resultsDisplay:e=>{const n=f||!navigator.serviceWorker.controller;return this.resultsDisplayClient(t(t({langData:this.langData},e),{},{noIndexedDB:n,dynamicBasePath:this.dynamicBasePath,files:this.files,allowPlugins:this.allowPlugins}))},localeCallback:t=>{this.l10n=t,e.l10n=t;return e.get("work")?!g&&(this.workDisplay({l:t,lang:i,preferredLocale:u,fallbackLanguages:s,languageParam:a,$p:e,languages:r,preferencesPlugin:this.preferencesPlugin}),!0):(async function({files:e,lang:t,fallbackLanguages:n,$p:r,followParams:i}){try{const o=await d(e),a=e=>o["localization-strings"][e],s=await d(o.groups.reduce(((e,t)=>{const n=(o.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return t.files.reduce(((e,t)=>[...e,n+t.metadataFile]),e)}),[])),u=ve({locales:t.map(a),fallbackLocales:n.map(a)}).getFormatter();document.title=u({key:"browserfile-workselect",fallback:!0});const l=s[Symbol.iterator](),c=()=>{const e=l.next().value;return yt(t,e,"alias")};Rt.workSelect({groups:o.groups,lf:u,getNextAlias:c,$p:r,followParams:i})}catch(e){console.log("Error",e),dt.alert(e)}}({files:this.files,lang:i,fallbackLanguages:s,$p:e,followParams:n}),!0)}})}}Jt.prototype.workDisplay=async function({l:e,languageParam:n,lang:i,preferredLocale:o,languages:a,fallbackLanguages:s,$p:u}){const{preferencesPlugin:l}=this,c=this.langData.languages,f=this.getDirectionForLanguageCode(s[0]),p=localStorage.getItem(this.namespace+"-localizeParamNames"),h=u.localizeParamNames=u.has("i18n",!0)?"1"===u.get("i18n",!0):"true"===p||"false"!==p&&this.localizeParamNames,g=localStorage.getItem(this.namespace+"-hideFormattingSection"),m=u.has("formatting",!0)?"0"===u.get("formatting",!0):"true"===g||"false"!==g&&this.hideFormattingSection;try{const p=await this.getWorkData({lang:i,fallbackLanguages:s,preferredLocale:o,languages:a,work:u.get("work")}),{lf:g,fileData:y,metadataObj:v}=p,b=r(p,zt);document.title=g({key:"browserfile-workdisplay",values:{work:y?yt(i,v,"alias"):""},fallback:!0}),await async function({lf:t,metadataObj:r,getFieldAliasOrName:p,schemaObj:g,schemaItems:y,fieldInfo:v,metadata:b,pluginsForWork:_,groupsToWorks:w}){const E=h?t=>e(["params",t]):e=>e,x=h?t=>e(["params","indexed",t]):e=>e,S=a.localeFromLangData.bind(a),O=ve({locales:i.map(S),fallbackLocales:s.map(S)}).getFormatter(),P=(t,n,r)=>e({key:t,values:n,formats:r,fallback:({message:e})=>Rt.workDisplay.bdo({fallbackDirection:f,message:e})}),T=b.getFieldMatchesLocale({namespace:this.namespace,preferredLocale:o,schemaItems:y,pluginsForWork:_}),A=[];this.getBrowseFieldData({metadataObj:r,schemaItems:y,getFieldAliasOrName:p,callback({browseFields:e,i:t}){Rt.workDisplay.addBrowseFields({browseFields:e,fieldInfo:v,ld:P,i:t,iil:x,$p:u,content:A})}});const k=function(...e){const t=Mt(...e);return function(...e){const n=t(...e);return $t(n)}}({l:e,il:E,$p:u}),C=Mt({l:e,il:E,$p:u}),{groups:N}=await d(this.files),L=yt(i,r,"heading"),I=(()=>{const e=Promise.all(w.map((async({name:e,workNames:t,shortcuts:n})=>({groupName:e,worksToFields:await Promise.all(t.map((async(e,t)=>({workName:e,shortcut:n[t],fieldAliasOrNames:(await this.getWorkData({lang:i,fallbackLanguages:s,preferredLocale:o,languages:a,work:e})).fieldInfo.map((({fieldAliasOrName:e})=>e))}))))}))));return async()=>e})();Rt.workDisplay.main({languageParam:n,lang:i,lf:t,l:e,namespace:this.namespace,groups:N,heading:L,imfl:O,fallbackDirection:f,langs:c,fieldInfo:v,localizeParamNames:h,serializeParamsAsURL:k,paramsSetter:C,replaceHash:$t,getFieldAliasOrNames:I,hideFormattingSection:m,$p:u,metadataObj:r,il:E,le:(t,n,r,i,o=[])=>(i[r]=e({key:t,fallback:({message:e})=>(i.dir=f,e)}),[n,i,o]),ld:P,iil:x,fieldMatchesLocale:T,preferredLocale:o,schemaItems:y,content:A,preferencesPlugin:l})}.call(this,t({lf:g,metadataObj:v},b))}catch(e){console.log("err",e),dt.alert(e)}},Jt.prototype.resultsDisplayClient=async function(e){const n=await navigator.storage.persisted(),r=this.skipIndexedDB||!n||!navigator.serviceWorker.controller,i=localStorage.getItem(this.namespace+"-localizeParamNames"),{fieldInfo:o,$p:a,browseFieldSets:s,applicableBrowseFieldSet:u,lang:l,metadataObj:c,fileData:f,fieldValueAliasMapPreferred:p,lf:h,iil:d,ilRaw:g,templateArgs:m}=await Kt.call(this,t(t({},e),{},{skipIndexedDB:r,prefI18n:i}));document.title=h({key:"browserfile-resultsdisplay",values:{work:f?yt(l,c,"alias"):""},fallback:!0}),Rt.resultsDisplayClient.main(m),(({applicableBrowseFieldSet:e,fieldValueAliasMapPreferred:t,ilRaw:n,iil:r,max:i,$p:o})=>{const a=e.map((e=>e.fieldSchemaIndex)),s=o.get("work");let u;const l=n("anchorrowcol");if(l&&(u=Rt.resultsDisplayClient.anchorRowCol({anchorRowCol:l})),!u){const e=[];let n="";for(let u,l=1;!u&&!e.length;l++)for(let c=1;;c++){const f=s+"-anchor"+l+"-"+c,p=o.get(f,!0);if(!p){(l===i||e.length)&&(u=!0);break}n=o.get(r("anchorfield")+l,!0);const h=a[c-1],d=Ht(p),g=t[h]&&t[h][d];e.push(g||p)}if(e.length){const t=e=>(e||"").replace(/["\\]/g,"\\$&"),r=t(e.join("-")),i=n?t(n):void 0;u=Rt.resultsDisplayClient.anchors({escapedRow:r,escapedCol:i})}}u&&u.scrollIntoView()})({applicableBrowseFieldSet:u,fieldValueAliasMapPreferred:p,iil:d,ilRaw:g,$p:e.$p,max:s.length}),o.forEach((({plugin:e,applicableField:t,meta:n,j:r})=>{e&&e.done&&e.done({$p:a,applicableField:t,meta:n,j:r,thisObj:this})}))},Jt.prototype.getWorkFiles=async function(e=this.files){const t=await d(e),n=[];return t.groups.forEach((e=>{e.files.forEach((r=>{const{file:i,schemaFile:o,metadataFile:a}=Ot(t,e,r);n.push(i,o,a)}))})),n.push(...Object.values(t.plugins).map((e=>e.path))),n};export{Jt as default};
5
+ */u=function(){var e,t,n,r=Object.prototype.toString,i=void 0!==o?function(e){return o(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function a(e,r){n.add(e,r),t||(t=i(n.drain))}function s(e){var t,n=c(e);return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function u(){for(var e=0;e<this.chain.length;e++)l(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function l(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function f(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=s(e))?a((function(){var r=new h(n);try{t.call(e,(function(){f.apply(r,arguments)}),(function(){p.apply(r,arguments)}))}catch(e){p.call(r,e)}})):(n.msg=e,n.state=1,n.chain.length>0&&a(u,n))}catch(e){p.call(new h(n),e)}}}function p(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(u,t))}function d(e,t,n,r){for(var o=0;o<t.length;o++)!function(o){e.resolve(t[o]).then((function(e){n(o,e)}),r)}(o)}function h(e){this.def=e,this.triggered=!1}function v(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new v(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t})),t.chain.push(r),0!==t.state&&a(u,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){f.call(t,e)}),(function(e){p.call(t,e)}))}catch(e){p.call(t,e)}}n=function(){var e,n,r;function o(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,i){r=new o(t,i),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var y=e({},"constructor",g,!1);return g.prototype=y,e(y,"__NPO__",0,!1),e(g,"resolve",(function(e){return e&&"object"==c(e)&&1===e.__NPO__?e:new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)}))})),e(g,"reject",(function(e){return new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)}))})),e(g,"all",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var o=e.length,i=Array(o),a=0;d(t,e,(function(e,t){i[e]=t,++a===o&&n(i)}),r)}))})),e(g,"race",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");d(t,e,(function(e,t){n(t)}),r)}))})),g},(s=void 0!==r?r:this)[a="Promise"]=s[a]||u(),e.exports?e.exports=s[a]:void 0===(i=function(){return s[a]}.call(t,n,t,e))||(e.exports=i)}).call(this,n(11),n(232).setImmediate)},function(e,t,n){(function(t){var r=n(85),o=n(86),i=n(223),a=n(224),s=n(234),u=n(237),c=n(238),l=/~(?:[^01]|$)/g,f={},p=["relative","remote"],d=["absolute","uri"],h={};function v(e,t){r.isString(e)&&(e=u(e)),r.isString(t)&&(t=u(t));var n,o,a=E(r.isUndefined(t)?"":t);return d.indexOf(a.reference)>-1?o=a:(n=r.isUndefined(e)?void 0:E(e),r.isUndefined(n)?o=a:((o=n).path=u(i.join(n.path,a.path)),o.query=function(e,t){var n={};function o(e){r.forOwn(e,(function(e,t){n[t]=e}))}return o(s.parse(e||"")),o(s.parse(t||"")),0===Object.keys(n).length?void 0:s.stringify(n)}(n.query,a.query))),o.fragment=void 0,(-1===d.indexOf(o.reference)&&0===o.path.indexOf("../")?"../":"")+c.serialize(o)}function g(e){return p.indexOf(w(e))>-1}function y(e){return r.isUndefined(e.error)&&"invalid"!==e.type}function m(e,t){var n=e;return t.forEach((function(e){if(!(e in n))throw Error("JSON Pointer points to missing location: "+D(t));n=n[e]})),n}function b(e){return Object.keys(e).filter((function(e){return"$ref"!==e}))}function w(e){var t;switch(e.uriDetails.reference){case"absolute":case"uri":t="remote";break;case"same-document":t="local";break;default:t=e.uriDetails.reference}return t}function _(e,t){var n=f[e],o=Promise.resolve(),i=r.cloneDeep(t.loaderOptions||{});return r.isUndefined(n)?(r.isUndefined(i.processContent)&&(i.processContent=function(e,t){t(void 0,JSON.parse(e.text))}),o=(o=a.load(decodeURI(e),i)).then((function(t){return f[e]={value:t},t})).catch((function(t){throw f[e]={error:t},t}))):o=o.then((function(){if(r.isError(n.error))throw n.error;return n.value})),o.then((function(e){return r.cloneDeep(e)}))}function x(e,t){var n=!0;try{if(!r.isPlainObject(e))throw new Error("obj is not an Object");if(!r.isString(e.$ref))throw new Error("obj.$ref is not a String")}catch(e){if(t)throw e;n=!1}return n}function S(e){return-1!==e.indexOf("://")||i.isAbsolute(e)?e:i.resolve(t.cwd(),e)}function j(e,t){e.error=t.message,e.missing=!0}function E(e){return c.parse(e)}function O(e,t,n){m(e,t.slice(0,t.length-1))[t[t.length-1]]=n}function k(e,t){var n,o;if(e=r.isUndefined(e)?{}:r.cloneDeep(e),!r.isObject(e))throw new TypeError("options must be an Object");if(!r.isUndefined(e.resolveCirculars)&&!r.isBoolean(e.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(r.isUndefined(e.filter)||r.isArray(e.filter)||r.isFunction(e.filter)||r.isString(e.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!r.isUndefined(e.includeInvalid)&&!r.isBoolean(e.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!r.isUndefined(e.location)&&!r.isString(e.location))throw new TypeError("options.location must be a String");if(!r.isUndefined(e.refPreProcessor)&&!r.isFunction(e.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!r.isUndefined(e.refPostProcessor)&&!r.isFunction(e.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!r.isUndefined(e.subDocPath)&&!r.isArray(e.subDocPath)&&!T(e.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(r.isUndefined(e.resolveCirculars)&&(e.resolveCirculars=!1),e.filter=function(e){var t,n;return r.isArray(e.filter)||r.isString(e.filter)?(n=r.isString(e.filter)?[e.filter]:e.filter,t=function(e){return n.indexOf(e.type)>-1||n.indexOf(w(e))>-1}):r.isFunction(e.filter)?t=e.filter:r.isUndefined(e.filter)&&(t=function(){return!0}),function(n,r){return("invalid"!==n.type||!0===e.includeInvalid)&&t(n,r)}}(e),r.isUndefined(e.location)&&(e.location=S("./root.json")),(n=e.location.split("#")).length>1&&(e.subDocPath="#"+n[1]),o=decodeURI(e.location)===e.location,e.location=v(e.location,void 0),o&&(e.location=decodeURI(e.location)),e.subDocPath=function(e){var t;return r.isArray(e.subDocPath)?t=e.subDocPath:r.isString(e.subDocPath)?t=C(e.subDocPath):r.isUndefined(e.subDocPath)&&(t=[]),t}(e),!r.isUndefined(t))try{m(t,e.subDocPath)}catch(e){throw e.message=e.message.replace("JSON Pointer","options.subDocPath"),e}return e}function A(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~1/g,"/").replace(/~0/g,"~")}))}function P(e){if(!r.isArray(e))throw new TypeError("path must be an array");return e.map((function(e){return r.isString(e)||(e=JSON.stringify(e)),e.replace(/~/g,"~0").replace(/\//g,"~1")}))}function I(e,t){var n={};if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");return function e(t,n,o,i){var a=!0;function s(n,r){o.push(r),e(t,n,o,i),o.pop()}r.isFunction(i)&&(a=i(t,n,o)),-1===t.indexOf(n)&&(t.push(n),!1!==a&&(r.isArray(n)?n.forEach((function(e,t){s(e,t.toString())})):r.isObject(n)&&r.forOwn(n,(function(e,t){s(e,t)}))),t.pop())}(function(e,t){var n,r=[];return t.length>0&&(n=e,t.slice(0,t.length-1).forEach((function(e){e in n&&(n=n[e],r.push(n))}))),r}(e,(t=k(t,e)).subDocPath),m(e,t.subDocPath),r.cloneDeep(t.subDocPath),(function(e,o,i){var a,s,u=!0;return x(o)&&(r.isUndefined(t.refPreProcessor)||(o=t.refPreProcessor(r.cloneDeep(o),i)),a=N(o),r.isUndefined(t.refPostProcessor)||(a=t.refPostProcessor(a,i)),t.filter(a,i)&&(s=D(i),n[s]=a),b(o).length>0&&(u=!1)),u})),n}function N(e){var t,n,o,i={def:e};try{if(x(e,!0),t=e.$ref,o=h[t],r.isUndefined(o)&&(o=h[t]=E(t)),i.uri=t,i.uriDetails=o,r.isUndefined(o.error)){i.type=w(i);try{["#","/"].indexOf(t[0])>-1?T(t,!0):t.indexOf("#")>-1&&T(o.fragment,!0)}catch(e){i.error=e.message,i.type="invalid"}}else i.error=i.uriDetails.error,i.type="invalid";(n=b(e)).length>0&&(i.warning="Extra JSON Reference properties will be ignored: "+n.join(", "))}catch(e){i.error=e.message,i.type="invalid"}return i}function T(e,t){var n,o=!0;try{if(!r.isString(e))throw new Error("ptr is not a String");if(""!==e){if(n=e.charAt(0),-1===["#","/"].indexOf(n))throw new Error("ptr must start with a / or #/");if("#"===n&&"#"!==e&&"/"!==e.charAt(1))throw new Error("ptr must start with a / or #/");if(e.match(l))throw new Error("ptr has invalid token(s)")}}catch(e){if(!0===t)throw e;o=!1}return o}function C(e){try{T(e,!0)}catch(e){throw new Error("ptr must be a JSON Pointer: "+e.message)}var t=e.split("/");return t.shift(),A(t)}function D(e,t){if(!r.isArray(e))throw new Error("path must be an Array");return(!1!==t?"#":"")+(e.length>0?"/":"")+P(e).join("/")}function F(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isArray(e)&&!r.isObject(e))throw new TypeError("obj must be an Array or an Object");t=k(t,e),e=r.cloneDeep(e)})).then((function(){var n={deps:{},docs:{},refs:{}};return function e(t,n,o){var a,s,u=Promise.resolve(),c=D(n.subDocPath),l=S(n.location),f=i.dirname(n.location),p=l+c;return r.isUndefined(o.docs[l])&&(o.docs[l]=t),r.isUndefined(o.deps[p])&&(o.deps[p]={},a=I(t,n),r.forOwn(a,(function(i,a){var l,d,h=S(n.location)+a,m=i.refdId=decodeURI(S(g(i)?v(f,i.uri):n.location)+"#"+(i.uri.indexOf("#")>-1?i.uri.split("#")[1]:""));o.refs[h]=i,y(i)&&(i.fqURI=m,o.deps[p][a===c?"#":a.replace(c+"/","#/")]=m,0!==h.indexOf(m+"/")&&h!==m?((s=r.cloneDeep(n)).subDocPath=r.isUndefined(i.uriDetails.fragment)?[]:C(decodeURI(i.uriDetails.fragment)),g(i)?(delete s.filter,s.location=m.split("#")[0],u=u.then((l=o,d=s,function(){var e=S(d.location),t=l.docs[e];return r.isUndefined(t)?_(e,d).catch((function(t){return l.docs[e]=t,t})):Promise.resolve().then((function(){return t}))}))):u=u.then((function(){return t})),u=u.then(function(t,n,o){return function(i){if(r.isError(i))j(o,i);else try{return e(i,n,t).catch((function(e){j(o,e)}))}catch(e){j(o,e)}}}(o,s,i))):i.circular=!0)}))),u}(e,t,n).then((function(){return n}))})).then((function(e){var n={},a=[],s=[],u=new o.Graph,c=S(t.location),l=c+D(t.subDocPath),f=i.dirname(c);return Object.keys(e.deps).forEach((function(e){u.setNode(e)})),r.forOwn(e.deps,(function(e,t){r.forOwn(e,(function(e){u.setEdge(t,e)}))})),(a=o.alg.findCycles(u)).forEach((function(e){e.forEach((function(e){-1===s.indexOf(e)&&s.push(e)}))})),r.forOwn(e.deps,(function(t,n){r.forOwn(t,(function(t,r){var o,i=!1,u=n+r.slice(1),c=e.refs[n+r.slice(1)],l=g(c);s.indexOf(t)>-1&&a.forEach((function(e){i||(o=e.indexOf(t))>-1&&e.forEach((function(n){i||0===u.indexOf(n+"/")&&(l&&o!==e.length-1&&"#"===t[t.length-1]||(i=!0))}))})),i&&(c.circular=!0)}))})),r.forOwn(Object.keys(e.deps).reverse(),(function(n){var o=e.deps[n],i=n.split("#"),a=e.docs[i[0]],s=C(i[1]);r.forOwn(o,(function(n,o){var u=n.split("#"),c=e.docs[u[0]],l=s.concat(C(o)),f=e.refs[i[0]+D(l)];if(r.isUndefined(f.error)&&r.isUndefined(f.missing))if(!t.resolveCirculars&&f.circular)f.value=r.cloneDeep(f.def);else{try{f.value=m(c,C(u[1]))}catch(e){return void j(f,e)}""===i[1]&&"#"===o?e.docs[i[0]]=f.value:O(a,l,f.value)}}))})),Object.keys(e.refs).forEach((function(o){var i,a,s=e.refs[o];"invalid"!==s.type&&("#"===s.fqURI[s.fqURI.length-1]&&"#"!==s.uri[s.uri.length-1]&&(s.fqURI=s.fqURI.substr(0,s.fqURI.length-1)),i=s.fqURI.split("/"),a=s.uri.split("/"),r.times(a.length-1,(function(e){var t=a[a.length-e-1],n=a[a.length-e],r=i.length-e-1;"."!==t&&".."!==t&&".."!==n&&(i[r]=t)})),s.fqURI=i.join("/"),0===s.fqURI.indexOf(c)?s.fqURI=s.fqURI.replace(c,""):0===s.fqURI.indexOf(f)&&(s.fqURI=s.fqURI.replace(f,"")),"/"===s.fqURI[0]&&(s.fqURI="."+s.fqURI)),0===o.indexOf(l)&&function r(o,i,a){var s,u=i.split("#"),c=e.refs[i];n[u[0]===t.location?"#"+u[1]:D(t.subDocPath.concat(a))]=c,!c.circular&&y(c)?(s=e.deps[c.refdId],0!==c.refdId.indexOf(o)&&Object.keys(s).forEach((function(e){r(c.refdId,c.refdId+e.substr(1),a.concat(C(e)))}))):!c.circular&&c.error&&(c.error=c.error.replace("options.subDocPath","JSON Pointer"),c.error.indexOf("#")>-1&&(c.error=c.error.replace(c.uri.substr(c.uri.indexOf("#")),c.uri)),0!==c.error.indexOf("ENOENT:")&&0!==c.error.indexOf("Not Found")||(c.error="JSON Pointer points to missing location: "+c.uri))}(l,o,C(o.substr(l.length)))})),r.forOwn(n,(function(t,n){delete t.refdId,t.circular&&"local"===t.type&&(t.value.$ref=t.fqURI,O(e.docs[c],C(n),t.value)),t.missing&&(t.error=t.error.split(": ")[0]+": "+t.def.$ref)})),{refs:n,resolved:e.docs[c]}}))}"undefined"==typeof Promise&&n(83),e.exports.clearCache=function(){f={}},e.exports.decodePath=function(e){return A(e)},e.exports.encodePath=function(e){return P(e)},e.exports.findRefs=function(e,t){return I(e,t)},e.exports.findRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),_((t=k(t)).location,t)})).then((function(e){var n=r.cloneDeep(f[t.location]),o=r.cloneDeep(t);return r.isUndefined(n.refs)&&(delete o.filter,delete o.subDocPath,o.includeInvalid=!0,f[t.location].refs=I(e,o)),r.isUndefined(t.filter)||(o.filter=t.filter),{refs:I(e,o),value:e}}))}(e,t)},e.exports.getRefDetails=function(e){return N(e)},e.exports.isPtr=function(e,t){return T(e,t)},e.exports.isRef=function(e,t){return function(e,t){return x(e,t)&&"invalid"!==N(e).type}(e,t)},e.exports.pathFromPtr=function(e){return C(e)},e.exports.pathToPtr=function(e,t){return D(e,t)},e.exports.resolveRefs=function(e,t){return F(e,t)},e.exports.resolveRefsAt=function(e,t){return function(e,t){var n=Promise.resolve();return n.then((function(){if(!r.isString(e))throw new TypeError("location must be a string");return r.isUndefined(t)&&(t={}),r.isObject(t)&&(t.location=e),_((t=k(t)).location,t)})).then((function(e){return F(e,t).then((function(t){return{refs:t.refs,resolved:t.resolved,value:e}}))}))}(e,t)}}).call(this,n(13))},function(e,t,n){(function(e,r){var o;function i(e){return(i="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)}
6
+ /**
7
+ * @license
8
+ * Lodash <https://lodash.com/>
9
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
10
+ * Released under MIT license <https://lodash.com/license>
11
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
12
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
13
+ */(function(){var a="Expected a function",s="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",f="[object Boolean]",p="[object Date]",d="[object Error]",h="[object Function]",v="[object GeneratorFunction]",g="[object Map]",y="[object Number]",m="[object Object]",b="[object RegExp]",w="[object Set]",_="[object String]",x="[object Symbol]",S="[object WeakMap]",j="[object ArrayBuffer]",E="[object DataView]",O="[object Float32Array]",k="[object Float64Array]",A="[object Int8Array]",P="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",T="[object Uint16Array]",C="[object Uint32Array]",D=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,R=/[&<>"']/g,U=RegExp($.source),M=RegExp(R.source),z=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J=/[\\^$.*+?()[\]{}|]/g,K=RegExp(J.source),G=/^\s+|\s+$/g,Z=/^\s+/,X=/\s+$/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,ee=/,? & /,te=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ne=/\\(\\)?/g,re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,oe=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,se=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fe=/($^)/,pe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ve="["+he+"]",ge="["+de+"]",ye="\\d+",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+he+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",we="\\ud83c[\\udffb-\\udfff]",_e="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",je="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="(?:"+me+"|"+be+")",Oe="(?:"+je+"|"+be+")",ke="(?:"+ge+"|"+we+")?",Ae="[\\ufe0e\\ufe0f]?"+ke+"(?:\\u200d(?:"+[_e,xe,Se].join("|")+")[\\ufe0e\\ufe0f]?"+ke+")*",Pe="(?:"+["[\\u2700-\\u27bf]",xe,Se].join("|")+")"+Ae,Ie="(?:"+[_e+ge+"?",ge,xe,Se,"[\\ud800-\\udfff]"].join("|")+")",Ne=RegExp("['’]","g"),Te=RegExp(ge,"g"),Ce=RegExp(we+"(?="+we+")|"+Ie+Ae,"g"),De=RegExp([je+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,je,"$"].join("|")+")",Oe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,je+Ee,"$"].join("|")+")",je+"?"+Ee+"+(?:['’](?:d|ll|m|re|s|t|ve))?",je+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,Pe].join("|"),"g"),Fe=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$e=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Re=-1,Ue={};Ue[O]=Ue[k]=Ue[A]=Ue[P]=Ue[I]=Ue[N]=Ue["[object Uint8ClampedArray]"]=Ue[T]=Ue[C]=!0,Ue[c]=Ue[l]=Ue[j]=Ue[f]=Ue[E]=Ue[p]=Ue[d]=Ue[h]=Ue[g]=Ue[y]=Ue[m]=Ue[b]=Ue[w]=Ue[_]=Ue[S]=!1;var Me={};Me[c]=Me[l]=Me[j]=Me[E]=Me[f]=Me[p]=Me[O]=Me[k]=Me[A]=Me[P]=Me[I]=Me[g]=Me[y]=Me[m]=Me[b]=Me[w]=Me[_]=Me[x]=Me[N]=Me["[object Uint8ClampedArray]"]=Me[T]=Me[C]=!0,Me[d]=Me[h]=Me[S]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,qe=parseInt,We="object"==(void 0===e?"undefined":i(e))&&e&&e.Object===Object&&e,Ve="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,He=We||Ve||Function("return this")(),Je="object"==i(t)&&t&&!t.nodeType&&t,Ke=Je&&"object"==i(r)&&r&&!r.nodeType&&r,Ge=Ke&&Ke.exports===Je,Ze=Ge&&We.process,Xe=function(){try{return Ke&&Ke.require&&Ke.require("util").types||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),Ye=Xe&&Xe.isArrayBuffer,Qe=Xe&&Xe.isDate,et=Xe&&Xe.isMap,tt=Xe&&Xe.isRegExp,nt=Xe&&Xe.isSet,rt=Xe&&Xe.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function it(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function at(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function st(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ct(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function lt(e,t){return!(null==e||!e.length)&&wt(e,t,0)>-1}function ft(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function pt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function dt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function ht(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function vt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function gt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var yt=jt("length");function mt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function bt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function wt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):bt(e,xt,n)}function _t(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function xt(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?kt(e,t)/n:NaN}function jt(e){return function(t){return null==t?void 0:t[e]}}function Et(e){return function(t){return null==e?void 0:e[t]}}function Ot(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function kt(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function At(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Pt(e){return function(t){return e(t)}}function It(e,t){return pt(t,(function(t){return e[t]}))}function Nt(e,t){return e.has(t)}function Tt(e,t){for(var n=-1,r=e.length;++n<r&&wt(t,e[n],0)>-1;);return n}function Ct(e,t){for(var n=e.length;n--&&wt(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Ft=Et({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Lt=Et({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function $t(e){return"\\"+ze[e]}function Rt(e){return Fe.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Mt(e,t){return function(n){return e(t(n))}}function zt(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function Bt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function qt(e){return Rt(e)?function(e){for(var t=Ce.lastIndex=0;Ce.test(e);)++t;return t}(e):yt(e)}function Wt(e){return Rt(e)?function(e){return e.match(Ce)||[]}(e):function(e){return e.split("")}(e)}var Vt=Et({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Ht=function e(t){var n,r=(t=null==t?He:Ht.defaults(He.Object(),t,Ht.pick(He,$e))).Array,o=t.Date,de=t.Error,he=t.Function,ve=t.Math,ge=t.Object,ye=t.RegExp,me=t.String,be=t.TypeError,we=r.prototype,_e=he.prototype,xe=ge.prototype,Se=t["__core-js_shared__"],je=_e.toString,Ee=xe.hasOwnProperty,Oe=0,ke=(n=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ae=xe.toString,Pe=je.call(ge),Ie=He._,Ce=ye("^"+je.call(Ee).replace(J,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=Ge?t.Buffer:void 0,ze=t.Symbol,We=t.Uint8Array,Ve=Fe?Fe.allocUnsafe:void 0,Je=Mt(ge.getPrototypeOf,ge),Ke=ge.create,Ze=xe.propertyIsEnumerable,Xe=we.splice,yt=ze?ze.isConcatSpreadable:void 0,Et=ze?ze.iterator:void 0,Jt=ze?ze.toStringTag:void 0,Kt=function(){try{var e=Qo(ge,"defineProperty");return e({},"",{}),e}catch(e){}}(),Gt=t.clearTimeout!==He.clearTimeout&&t.clearTimeout,Zt=o&&o.now!==He.Date.now&&o.now,Xt=t.setTimeout!==He.setTimeout&&t.setTimeout,Yt=ve.ceil,Qt=ve.floor,en=ge.getOwnPropertySymbols,tn=Fe?Fe.isBuffer:void 0,nn=t.isFinite,rn=we.join,on=Mt(ge.keys,ge),an=ve.max,sn=ve.min,un=o.now,cn=t.parseInt,ln=ve.random,fn=we.reverse,pn=Qo(t,"DataView"),dn=Qo(t,"Map"),hn=Qo(t,"Promise"),vn=Qo(t,"Set"),gn=Qo(t,"WeakMap"),yn=Qo(ge,"create"),mn=gn&&new gn,bn={},wn=Oi(pn),_n=Oi(dn),xn=Oi(hn),Sn=Oi(vn),jn=Oi(gn),En=ze?ze.prototype:void 0,On=En?En.valueOf:void 0,kn=En?En.toString:void 0;function An(e){if(qa(e)&&!Ta(e)&&!(e instanceof Tn)){if(e instanceof Nn)return e;if(Ee.call(e,"__wrapped__"))return ki(e)}return new Nn(e)}var Pn=function(){function e(){}return function(t){if(!Ba(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function In(){}function Nn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Tn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Cn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fn;++t<n;)this.add(e[t])}function $n(e){var t=this.__data__=new Dn(e);this.size=t.size}function Rn(e,t){var n=Ta(e),r=!n&&Na(e),o=!n&&!r&&La(e),i=!n&&!r&&!o&&Xa(e),a=n||r||o||i,s=a?At(e.length,me):[],u=s.length;for(var c in e)!t&&!Ee.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ai(c,u))||s.push(c);return s}function Un(e){var t=e.length;return t?e[Fr(0,t-1)]:void 0}function Mn(e,t){return Si(yo(e),Gn(t,0,e.length))}function zn(e){return Si(yo(e))}function Bn(e,t,n){(void 0===n||Aa(e[t],n))&&(void 0!==n||t in e)||Jn(e,t,n)}function qn(e,t,n){var r=e[t];Ee.call(e,t)&&Aa(r,n)&&(void 0!==n||t in e)||Jn(e,t,n)}function Wn(e,t){for(var n=e.length;n--;)if(Aa(e[n][0],t))return n;return-1}function Vn(e,t,n,r){return er(e,(function(e,o,i){t(r,e,n(e),i)})),r}function Hn(e,t){return e&&mo(t,bs(t),e)}function Jn(e,t,n){"__proto__"==t&&Kt?Kt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Kn(e,t){for(var n=-1,o=t.length,i=r(o),a=null==e;++n<o;)i[n]=a?void 0:hs(e,t[n]);return i}function Gn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Zn(e,t,n,r,o,i){var a,s=1&t,u=2&t,l=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!Ba(e))return e;var d=Ta(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return yo(e,a)}else{var S=ni(e),D=S==h||S==v;if(La(e))return lo(e,s);if(S==m||S==c||D&&!o){if(a=u||D?{}:oi(e),!s)return u?function(e,t){return mo(e,ti(e),t)}(e,function(e,t){return e&&mo(t,ws(t),e)}(a,e)):function(e,t){return mo(e,ei(e),t)}(e,Hn(a,e))}else{if(!Me[S])return o?e:{};a=function(e,t,n){var r,o=e.constructor;switch(t){case j:return fo(e);case f:case p:return new o(+e);case E:return function(e,t){var n=t?fo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case O:case k:case A:case P:case I:case N:case"[object Uint8ClampedArray]":case T:case C:return po(e,n);case g:return new o;case y:case _:return new o(e);case b:return function(e){var t=new e.constructor(e.source,oe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case w:return new o;case x:return r=e,On?ge(On.call(r)):{}}}(e,S,s)}}i||(i=new $n);var F=i.get(e);if(F)return F;i.set(e,a),Ka(e)?e.forEach((function(r){a.add(Zn(r,t,n,r,e,i))})):Wa(e)&&e.forEach((function(r,o){a.set(o,Zn(r,t,n,o,e,i))}));var L=d?void 0:(l?u?Ho:Vo:u?ws:bs)(e);return at(L||e,(function(r,o){L&&(r=e[o=r]),qn(a,o,Zn(r,t,n,o,e,i))})),a}function Xn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ge(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Yn(e,t,n){if("function"!=typeof e)throw new be(a);return bi((function(){e.apply(void 0,n)}),t)}function Qn(e,t,n,r){var o=-1,i=lt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=pt(t,Pt(n))),r?(i=ft,a=!1):t.length>=200&&(i=Nt,a=!1,t=new Ln(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}An.templateSettings={escape:z,evaluate:B,interpolate:q,variable:"",imports:{_:An}},An.prototype=In.prototype,An.prototype.constructor=An,Nn.prototype=Pn(In.prototype),Nn.prototype.constructor=Nn,Tn.prototype=Pn(In.prototype),Tn.prototype.constructor=Tn,Cn.prototype.clear=function(){this.__data__=yn?yn(null):{},this.size=0},Cn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Cn.prototype.get=function(e){var t=this.__data__;if(yn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ee.call(t,e)?t[e]:void 0},Cn.prototype.has=function(e){var t=this.__data__;return yn?void 0!==t[e]:Ee.call(t,e)},Cn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yn&&void 0===t?"__lodash_hash_undefined__":t,this},Dn.prototype.clear=function(){this.__data__=[],this.size=0},Dn.prototype.delete=function(e){var t=this.__data__,n=Wn(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Dn.prototype.get=function(e){var t=this.__data__,n=Wn(t,e);return n<0?void 0:t[n][1]},Dn.prototype.has=function(e){return Wn(this.__data__,e)>-1},Dn.prototype.set=function(e,t){var n=this.__data__,r=Wn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Cn,map:new(dn||Dn),string:new Cn}},Fn.prototype.delete=function(e){var t=Xo(this,e).delete(e);return this.size-=t?1:0,t},Fn.prototype.get=function(e){return Xo(this,e).get(e)},Fn.prototype.has=function(e){return Xo(this,e).has(e)},Fn.prototype.set=function(e,t){var n=Xo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.clear=function(){this.__data__=new Dn,this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$n.prototype.get=function(e){return this.__data__.get(e)},$n.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Dn){var r=n.__data__;if(!dn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(e,t),this.size=n.size,this};var er=_o(ur),tr=_o(cr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function rr(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!Za(a):n(a,s)))var s=a,u=i}return u}function or(e,t){var n=[];return er(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function ir(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=ii),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?ir(s,t-1,n,r,o):dt(o,s):r||(o[o.length]=s)}return o}var ar=xo(),sr=xo(!0);function ur(e,t){return e&&ar(e,t,bs)}function cr(e,t){return e&&sr(e,t,bs)}function lr(e,t){return ct(t,(function(t){return Ua(e[t])}))}function fr(e,t){for(var n=0,r=(t=ao(t,e)).length;null!=e&&n<r;)e=e[Ei(t[n++])];return n&&n==r?e:void 0}function pr(e,t,n){var r=t(e);return Ta(e)?r:dt(r,n(e))}function dr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Jt&&Jt in ge(e)?function(e){var t=Ee.call(e,Jt),n=e[Jt];try{e[Jt]=void 0;var r=!0}catch(e){}var o=Ae.call(e);return r&&(t?e[Jt]=n:delete e[Jt]),o}(e):function(e){return Ae.call(e)}(e)}function hr(e,t){return e>t}function vr(e,t){return null!=e&&Ee.call(e,t)}function gr(e,t){return null!=e&&t in ge(e)}function yr(e,t,n){for(var o=n?ft:lt,i=e[0].length,a=e.length,s=a,u=r(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=pt(f,Pt(t))),c=sn(f.length,c),u[s]=!n&&(t||i>=120&&f.length>=120)?new Ln(s&&f):void 0}f=e[0];var p=-1,d=u[0];e:for(;++p<i&&l.length<c;){var h=f[p],v=t?t(h):h;if(h=n||0!==h?h:0,!(d?Nt(d,v):o(l,v,n))){for(s=a;--s;){var g=u[s];if(!(g?Nt(g,v):o(e[s],v,n)))continue e}d&&d.push(v),l.push(h)}}return l}function mr(e,t,n){var r=null==(e=vi(e,t=ao(t,e)))?e:e[Ei(Ri(t))];return null==r?void 0:ot(r,e,n)}function br(e){return qa(e)&&dr(e)==c}function wr(e,t,n,r,o){return e===t||(null==e||null==t||!qa(e)&&!qa(t)?e!=e&&t!=t:function(e,t,n,r,o,i){var a=Ta(e),s=Ta(t),u=a?l:ni(e),h=s?l:ni(t),v=(u=u==c?m:u)==m,S=(h=h==c?m:h)==m,O=u==h;if(O&&La(e)){if(!La(t))return!1;a=!0,v=!1}if(O&&!v)return i||(i=new $n),a||Xa(e)?qo(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!i(new We(e),new We(t)));case f:case p:case y:return Aa(+e,+t);case d:return e.name==t.name&&e.message==t.message;case b:case _:return e==t+"";case g:var s=Ut;case w:var u=1&r;if(s||(s=Bt),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=qo(s(e),s(t),r,o,i,a);return a.delete(e),l;case x:if(On)return On.call(e)==On.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var k=v&&Ee.call(e,"__wrapped__"),A=S&&Ee.call(t,"__wrapped__");if(k||A){var P=k?e.value():e,I=A?t.value():t;return i||(i=new $n),o(P,I,n,r,i)}}return!!O&&(i||(i=new $n),function(e,t,n,r,o,i){var a=1&n,s=Vo(e),u=s.length;if(u!=Vo(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Ee.call(t,l)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var p=!0;i.set(e,t),i.set(t,e);for(var d=a;++c<u;){var h=e[l=s[c]],v=t[l];if(r)var g=a?r(v,h,l,t,e,i):r(h,v,l,e,t,i);if(!(void 0===g?h===v||o(h,v,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var y=e.constructor,m=t.constructor;y!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m)&&(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}(e,t,n,r,wr,o))}function _r(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=ge(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=n[o])[0],c=e[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var f=new $n;if(r)var p=r(c,l,u,e,t,f);if(!(void 0===p?wr(l,c,3,r,f):p))return!1}}return!0}function xr(e){return!(!Ba(e)||(t=e,ke&&ke in t))&&(Ua(e)?Ce:se).test(Oi(e));var t}function Sr(e){return"function"==typeof e?e:null==e?Vs:"object"==i(e)?Ta(e)?Ar(e[0],e[1]):kr(e):eu(e)}function jr(e){if(!fi(e))return on(e);var t=[];for(var n in ge(e))Ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Er(e,t){return e<t}function Or(e,t){var n=-1,o=Da(e)?r(e.length):[];return er(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function kr(e){var t=Yo(e);return 1==t.length&&t[0][2]?di(t[0][0],t[0][1]):function(n){return n===e||_r(n,e,t)}}function Ar(e,t){return ui(e)&&pi(t)?di(Ei(e),t):function(n){var r=hs(n,e);return void 0===r&&r===t?vs(n,e):wr(t,r,3)}}function Pr(e,t,n,r,o){e!==t&&ar(t,(function(i,a){if(o||(o=new $n),Ba(i))!function(e,t,n,r,o,i,a){var s=yi(e,n),u=yi(t,n),c=a.get(u);if(c)Bn(e,n,c);else{var l=i?i(s,u,n+"",e,t,a):void 0,f=void 0===l;if(f){var p=Ta(u),d=!p&&La(u),h=!p&&!d&&Xa(u);l=u,p||d||h?Ta(s)?l=s:Fa(s)?l=yo(s):d?(f=!1,l=lo(u,!0)):h?(f=!1,l=po(u,!0)):l=[]:Ha(u)||Na(u)?(l=s,Na(s)?l=is(s):Ba(s)&&!Ua(s)||(l=oi(u))):f=!1}f&&(a.set(u,l),o(l,u,r,i,a),a.delete(u)),Bn(e,n,l)}}(e,t,a,n,Pr,r,o);else{var s=r?r(yi(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),Bn(e,a,s)}}),ws)}function Ir(e,t){var n=e.length;if(n)return ai(t+=t<0?n:0,n)?e[t]:void 0}function Nr(e,t,n){var r=-1;return t=pt(t.length?t:[Vs],Pt(Zo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Or(e,(function(e,n,o){return{criteria:pt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=ho(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Tr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=fr(e,a);n(s,a)&&Mr(i,ao(a,e),s)}return i}function Cr(e,t,n,r){var o=r?_t:wt,i=-1,a=t.length,s=e;for(e===t&&(t=yo(t)),n&&(s=pt(e,Pt(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&Xe.call(s,u,1),Xe.call(e,u,1);return e}function Dr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ai(o)?Xe.call(e,o,1):Yr(e,o)}}return e}function Fr(e,t){return e+Qt(ln()*(t-e+1))}function Lr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function $r(e,t){return wi(hi(e,t,Vs),e+"")}function Rr(e){return Un(As(e))}function Ur(e,t){var n=As(e);return Si(n,Gn(t,0,n.length))}function Mr(e,t,n,r){if(!Ba(e))return e;for(var o=-1,i=(t=ao(t,e)).length,a=i-1,s=e;null!=s&&++o<i;){var u=Ei(t[o]),c=n;if(o!=a){var l=s[u];void 0===(c=r?r(l,u,s):void 0)&&(c=Ba(l)?l:ai(t[o+1])?[]:{})}qn(s,u,c),s=s[u]}return e}var zr=mn?function(e,t){return mn.set(e,t),e}:Vs,Br=Kt?function(e,t){return Kt(e,"toString",{configurable:!0,enumerable:!1,value:Bs(t),writable:!0})}:Vs;function qr(e){return Si(As(e))}function Wr(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function Vr(e,t){var n;return er(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function Hr(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Za(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Jr(e,t,Vs,n)}function Jr(e,t,n,r){t=n(t);for(var o=0,i=null==e?0:e.length,a=t!=t,s=null===t,u=Za(t),c=void 0===t;o<i;){var l=Qt((o+i)/2),f=n(e[l]),p=void 0!==f,d=null===f,h=f==f,v=Za(f);if(a)var g=r||h;else g=c?h&&(r||p):s?h&&p&&(r||!d):u?h&&p&&!d&&(r||!v):!d&&!v&&(r?f<=t:f<t);g?o=l+1:i=l}return sn(i,4294967294)}function Kr(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Aa(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function Gr(e){return"number"==typeof e?e:Za(e)?NaN:+e}function Zr(e){if("string"==typeof e)return e;if(Ta(e))return pt(e,Zr)+"";if(Za(e))return kn?kn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Xr(e,t,n){var r=-1,o=lt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=ft;else if(i>=200){var c=t?null:$o(e);if(c)return Bt(c);a=!1,o=Nt,u=new Ln}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function Yr(e,t){return null==(e=vi(e,t=ao(t,e)))||delete e[Ei(Ri(t))]}function Qr(e,t,n,r){return Mr(e,t,n(fr(e,t)),r)}function eo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Wr(e,r?0:i,r?i+1:o):Wr(e,r?i+1:0,r?o:i)}function to(e,t){var n=e;return n instanceof Tn&&(n=n.value()),ht(t,(function(e,t){return t.func.apply(t.thisArg,dt([e],t.args))}),n)}function no(e,t,n){var o=e.length;if(o<2)return o?Xr(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=Qn(a[i]||s,e[u],t,n));return Xr(ir(a,1),t,n)}function ro(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:void 0;n(a,e[r],s)}return a}function oo(e){return Fa(e)?e:[]}function io(e){return"function"==typeof e?e:Vs}function ao(e,t){return Ta(e)?e:ui(e,t)?[e]:ji(as(e))}var so=$r;function uo(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Wr(e,t,n)}var co=Gt||function(e){return He.clearTimeout(e)};function lo(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function fo(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function po(e,t){var n=t?fo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ho(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Za(e),a=void 0!==t,s=null===t,u=t==t,c=Za(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!o)return 1;if(!r&&!i&&!c&&e<t||c&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!u)return-1}return 0}function vo(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=an(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function go(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=an(a-u,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||i<a)&&(p[h+n[s]]=e[i++]);return p}function yo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function mo(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),o?Jn(n,s,u):qn(n,s,u)}return n}function bo(e,t){return function(n,r){var o=Ta(n)?it:Vn,i=t?t():{};return o(n,e,Zo(r,2),i)}}function wo(e){return $r((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&si(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=ge(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t}))}function _o(e,t){return function(n,r){if(null==n)return n;if(!Da(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=ge(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function xo(e){return function(t,n,r){for(var o=-1,i=ge(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function So(e){return function(t){var n=Rt(t=as(t))?Wt(t):void 0,r=n?n[0]:t.charAt(0),o=n?uo(n,1).join(""):t.slice(1);return r[e]()+o}}function jo(e){return function(t){return ht(Us(Ns(t).replace(Ne,"")),e,"")}}function Eo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Pn(e.prototype),r=e.apply(n,t);return Ba(r)?r:n}}function Oo(e){return function(t,n,r){var o=ge(t);if(!Da(t)){var i=Zo(n,3);t=bs(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}function ko(e){return Wo((function(t){var n=t.length,r=n,o=Nn.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new be(a);if(o&&!s&&"wrapper"==Ko(i))var s=new Nn([],!0)}for(r=s?r:n;++r<n;){var u=Ko(i=t[r]),c="wrapper"==u?Jo(i):void 0;s=c&&ci(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Ko(c[0])].apply(s,c[3]):1==i.length&&ci(i)?s[u]():s.thru(i)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Ta(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Ao(e,t,n,o,i,a,s,u,c,l){var f=128&t,p=1&t,d=2&t,h=24&t,v=512&t,g=d?void 0:Eo(e);return function y(){for(var m=arguments.length,b=r(m),w=m;w--;)b[w]=arguments[w];if(h)var _=Go(y),x=Dt(b,_);if(o&&(b=vo(b,o,i,h)),a&&(b=go(b,a,s,h)),m-=x,h&&m<l){var S=zt(b,_);return Fo(e,t,Ao,y.placeholder,n,b,S,u,c,l-m)}var j=p?n:this,E=d?j[e]:e;return m=b.length,u?b=gi(b,u):v&&m>1&&b.reverse(),f&&c<m&&(b.length=c),this&&this!==He&&this instanceof y&&(E=g||Eo(E)),E.apply(j,b)}}function Po(e,t){return function(n,r){return function(e,t,n,r){return ur(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Io(e,t){return function(n,r){var o;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Zr(n),r=Zr(r)):(n=Gr(n),r=Gr(r)),o=e(n,r)}return o}}function No(e){return Wo((function(t){return t=pt(t,Pt(Zo())),$r((function(n){var r=this;return e(t,(function(e){return ot(e,r,n)}))}))}))}function To(e,t){var n=(t=void 0===t?" ":Zr(t)).length;if(n<2)return n?Lr(t,e):t;var r=Lr(t,Yt(e/qt(t)));return Rt(t)?uo(Wt(r),0,e).join(""):r.slice(0,e)}function Co(e){return function(t,n,o){return o&&"number"!=typeof o&&si(t,n,o)&&(n=o=void 0),t=ts(t),void 0===n?(n=t,t=0):n=ts(n),function(e,t,n,o){for(var i=-1,a=an(Yt((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,o=void 0===o?t<n?1:-1:ts(o),e)}}function Do(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=os(t),n=os(n)),e(t,n)}}function Fo(e,t,n,r,o,i,a,s,u,c){var l=8&t;t|=l?32:64,4&(t&=~(l?64:32))||(t&=-4);var f=[e,t,o,l?i:void 0,l?a:void 0,l?void 0:i,l?void 0:a,s,u,c],p=n.apply(void 0,f);return ci(e)&&mi(p,f),p.placeholder=r,_i(p,e,t)}function Lo(e){var t=ve[e];return function(e,n){if(e=os(e),(n=null==n?0:sn(ns(n),292))&&nn(e)){var r=(as(e)+"e").split("e");return+((r=(as(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var $o=vn&&1/Bt(new vn([,-0]))[1]==1/0?function(e){return new vn(e)}:Zs;function Ro(e){return function(t){var n=ni(t);return n==g?Ut(t):n==w?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Uo(e,t,n,o,i,u,c,l){var f=2&t;if(!f&&"function"!=typeof e)throw new be(a);var p=o?o.length:0;if(p||(t&=-97,o=i=void 0),c=void 0===c?c:an(ns(c),0),l=void 0===l?l:ns(l),p-=i?i.length:0,64&t){var d=o,h=i;o=i=void 0}var v=f?void 0:Jo(e),g=[e,t,n,o,i,d,h,u,c,l];if(v&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?vo(c,u,t[4]):u,e[4]=c?zt(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?go(c,u,t[6]):u,e[6]=c?zt(e[5],s):t[6]),(u=t[7])&&(e[7]=u),128&r&&(e[8]=null==e[8]?t[8]:sn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(g,v),e=g[0],t=g[1],n=g[2],o=g[3],i=g[4],!(l=g[9]=void 0===g[9]?f?0:e.length:an(g[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)y=8==t||16==t?function(e,t,n){var o=Eo(e);return function i(){for(var a=arguments.length,s=r(a),u=a,c=Go(i);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:zt(s,c);if((a-=l.length)<n)return Fo(e,t,Ao,i.placeholder,void 0,s,l,void 0,void 0,n-a);var f=this&&this!==He&&this instanceof i?o:e;return ot(f,this,s)}}(e,t,l):32!=t&&33!=t||i.length?Ao.apply(void 0,g):function(e,t,n,o){var i=1&t,a=Eo(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==He&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return ot(p,i?n:this,f)}}(e,t,n,o);else var y=function(e,t,n){var r=1&t,o=Eo(e);return function t(){var i=this&&this!==He&&this instanceof t?o:e;return i.apply(r?n:this,arguments)}}(e,t,n);return _i((v?zr:mi)(y,g),e,t)}function Mo(e,t,n,r){return void 0===e||Aa(e,xe[n])&&!Ee.call(r,n)?t:e}function zo(e,t,n,r,o,i){return Ba(e)&&Ba(t)&&(i.set(t,e),Pr(e,t,void 0,zo,i),i.delete(t)),e}function Bo(e){return Ha(e)?void 0:e}function qo(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var l=-1,f=!0,p=2&n?new Ln:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var d=e[l],h=t[l];if(r)var v=a?r(h,d,l,t,e,i):r(d,h,l,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!gt(t,(function(e,t){if(!Nt(p,t)&&(d===e||o(d,e,n,r,i)))return p.push(t)}))){f=!1;break}}else if(d!==h&&!o(d,h,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function Wo(e){return wi(hi(e,void 0,Ci),e+"")}function Vo(e){return pr(e,bs,ei)}function Ho(e){return pr(e,ws,ti)}var Jo=mn?function(e){return mn.get(e)}:Zs;function Ko(e){for(var t=e.name+"",n=bn[t],r=Ee.call(bn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Go(e){return(Ee.call(An,"placeholder")?An:e).placeholder}function Zo(){var e=An.iteratee||Hs;return e=e===Hs?Sr:e,arguments.length?e(arguments[0],arguments[1]):e}function Xo(e,t){var n,r,o=e.__data__;return("string"==(r=i(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Yo(e){for(var t=bs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,pi(o)]}return t}function Qo(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return xr(n)?n:void 0}var ei=en?function(e){return null==e?[]:(e=ge(e),ct(en(e),(function(t){return Ze.call(e,t)})))}:ru,ti=en?function(e){for(var t=[];e;)dt(t,ei(e)),e=Je(e);return t}:ru,ni=dr;function ri(e,t,n){for(var r=-1,o=(t=ao(t,e)).length,i=!1;++r<o;){var a=Ei(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&za(o)&&ai(a,o)&&(Ta(e)||Na(e))}function oi(e){return"function"!=typeof e.constructor||fi(e)?{}:Pn(Je(e))}function ii(e){return Ta(e)||Na(e)||!!(yt&&e&&e[yt])}function ai(e,t){var n=i(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&e>-1&&e%1==0&&e<t}function si(e,t,n){if(!Ba(n))return!1;var r=i(t);return!!("number"==r?Da(n)&&ai(t,n.length):"string"==r&&t in n)&&Aa(n[t],e)}function ui(e,t){if(Ta(e))return!1;var n=i(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Za(e))||V.test(e)||!W.test(e)||null!=t&&e in ge(t)}function ci(e){var t=Ko(e),n=An[t];if("function"!=typeof n||!(t in Tn.prototype))return!1;if(e===n)return!0;var r=Jo(n);return!!r&&e===r[0]}(pn&&ni(new pn(new ArrayBuffer(1)))!=E||dn&&ni(new dn)!=g||hn&&"[object Promise]"!=ni(hn.resolve())||vn&&ni(new vn)!=w||gn&&ni(new gn)!=S)&&(ni=function(e){var t=dr(e),n=t==m?e.constructor:void 0,r=n?Oi(n):"";if(r)switch(r){case wn:return E;case _n:return g;case xn:return"[object Promise]";case Sn:return w;case jn:return S}return t});var li=Se?Ua:ou;function fi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function pi(e){return e==e&&!Ba(e)}function di(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in ge(n))}}function hi(e,t,n){return t=an(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=an(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),ot(e,this,u)}}function vi(e,t){return t.length<2?e:fr(e,Wr(t,0,-1))}function gi(e,t){for(var n=e.length,r=sn(t.length,n),o=yo(e);r--;){var i=t[r];e[r]=ai(i,n)?o[i]:void 0}return e}function yi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var mi=xi(zr),bi=Xt||function(e,t){return He.setTimeout(e,t)},wi=xi(Br);function _i(e,t,n){var r=t+"";return wi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return at(u,(function(n){var r="_."+n[0];t&n[1]&&!lt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Q);return t?t[1].split(ee):[]}(r),n)))}function xi(e){var t=0,n=0;return function(){var r=un(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Si(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Fr(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}var ji=function(e){var t=xa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(H,(function(e,n,r,o){t.push(r?o.replace(ne,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}();function Ei(e){if("string"==typeof e||Za(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Oi(e){if(null!=e){try{return je.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ki(e){if(e instanceof Tn)return e.clone();var t=new Nn(e.__wrapped__,e.__chain__);return t.__actions__=yo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ai=$r((function(e,t){return Fa(e)?Qn(e,ir(t,1,Fa,!0)):[]})),Pi=$r((function(e,t){var n=Ri(t);return Fa(n)&&(n=void 0),Fa(e)?Qn(e,ir(t,1,Fa,!0),Zo(n,2)):[]})),Ii=$r((function(e,t){var n=Ri(t);return Fa(n)&&(n=void 0),Fa(e)?Qn(e,ir(t,1,Fa,!0),void 0,n):[]}));function Ni(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ns(n);return o<0&&(o=an(r+o,0)),bt(e,Zo(t,3),o)}function Ti(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=ns(n),o=n<0?an(r+o,0):sn(o,r-1)),bt(e,Zo(t,3),o,!0)}function Ci(e){return null!=e&&e.length?ir(e,1):[]}function Di(e){return e&&e.length?e[0]:void 0}var Fi=$r((function(e){var t=pt(e,oo);return t.length&&t[0]===e[0]?yr(t):[]})),Li=$r((function(e){var t=Ri(e),n=pt(e,oo);return t===Ri(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?yr(n,Zo(t,2)):[]})),$i=$r((function(e){var t=Ri(e),n=pt(e,oo);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?yr(n,void 0,t):[]}));function Ri(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ui=$r(Mi);function Mi(e,t){return e&&e.length&&t&&t.length?Cr(e,t):e}var zi=Wo((function(e,t){var n=null==e?0:e.length,r=Kn(e,t);return Dr(e,pt(t,(function(e){return ai(e,n)?+e:e})).sort(ho)),r}));function Bi(e){return null==e?e:fn.call(e)}var qi=$r((function(e){return Xr(ir(e,1,Fa,!0))})),Wi=$r((function(e){var t=Ri(e);return Fa(t)&&(t=void 0),Xr(ir(e,1,Fa,!0),Zo(t,2))})),Vi=$r((function(e){var t=Ri(e);return t="function"==typeof t?t:void 0,Xr(ir(e,1,Fa,!0),void 0,t)}));function Hi(e){if(!e||!e.length)return[];var t=0;return e=ct(e,(function(e){if(Fa(e))return t=an(e.length,t),!0})),At(t,(function(t){return pt(e,jt(t))}))}function Ji(e,t){if(!e||!e.length)return[];var n=Hi(e);return null==t?n:pt(n,(function(e){return ot(t,void 0,e)}))}var Ki=$r((function(e,t){return Fa(e)?Qn(e,t):[]})),Gi=$r((function(e){return no(ct(e,Fa))})),Zi=$r((function(e){var t=Ri(e);return Fa(t)&&(t=void 0),no(ct(e,Fa),Zo(t,2))})),Xi=$r((function(e){var t=Ri(e);return t="function"==typeof t?t:void 0,no(ct(e,Fa),void 0,t)})),Yi=$r(Hi),Qi=$r((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ji(e,n)}));function ea(e){var t=An(e);return t.__chain__=!0,t}function ta(e,t){return t(e)}var na=Wo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Kn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Tn&&ai(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ta,args:[o],thisArg:void 0}),new Nn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)})),ra=bo((function(e,t,n){Ee.call(e,n)?++e[n]:Jn(e,n,1)})),oa=Oo(Ni),ia=Oo(Ti);function aa(e,t){return(Ta(e)?at:er)(e,Zo(t,3))}function sa(e,t){return(Ta(e)?st:tr)(e,Zo(t,3))}var ua=bo((function(e,t,n){Ee.call(e,n)?e[n].push(t):Jn(e,n,[t])})),ca=$r((function(e,t,n){var o=-1,i="function"==typeof t,a=Da(e)?r(e.length):[];return er(e,(function(e){a[++o]=i?ot(t,e,n):mr(e,t,n)})),a})),la=bo((function(e,t,n){Jn(e,n,t)}));function fa(e,t){return(Ta(e)?pt:Or)(e,Zo(t,3))}var pa=bo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),da=$r((function(e,t){if(null==e)return[];var n=t.length;return n>1&&si(e,t[0],t[1])?t=[]:n>2&&si(t[0],t[1],t[2])&&(t=[t[0]]),Nr(e,ir(t,1),[])})),ha=Zt||function(){return He.Date.now()};function va(e,t,n){return t=n?void 0:t,Uo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ga(e,t){var n;if("function"!=typeof t)throw new be(a);return e=ns(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ya=$r((function(e,t,n){var r=1;if(n.length){var o=zt(n,Go(ya));r|=32}return Uo(e,r,t,n,o)})),ma=$r((function(e,t,n){var r=3;if(n.length){var o=zt(n,Go(ma));r|=32}return Uo(t,r,e,n,o)}));function ba(e,t,n){var r,o,i,s,u,c,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new be(a);function h(t){var n=r,i=o;return r=o=void 0,l=t,s=e.apply(i,n)}function v(e){return l=e,u=bi(y,t),f?h(e):s}function g(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-l>=i}function y(){var e=ha();if(g(e))return m(e);u=bi(y,function(e){var n=t-(e-c);return p?sn(n,i-(e-l)):n}(e))}function m(e){return u=void 0,d&&r?h(e):(r=o=void 0,s)}function b(){var e=ha(),n=g(e);if(r=arguments,o=this,c=e,n){if(void 0===u)return v(c);if(p)return co(u),u=bi(y,t),h(c)}return void 0===u&&(u=bi(y,t)),s}return t=os(t)||0,Ba(n)&&(f=!!n.leading,i=(p="maxWait"in n)?an(os(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==u&&co(u),l=0,r=c=o=u=void 0},b.flush=function(){return void 0===u?s:m(ha())},b}var wa=$r((function(e,t){return Yn(e,1,t)})),_a=$r((function(e,t,n){return Yn(e,os(t)||0,n)}));function xa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(a);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(xa.Cache||Fn),n}function Sa(e){if("function"!=typeof e)throw new be(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}xa.Cache=Fn;var ja=so((function(e,t){var n=(t=1==t.length&&Ta(t[0])?pt(t[0],Pt(Zo())):pt(ir(t,1),Pt(Zo()))).length;return $r((function(r){for(var o=-1,i=sn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return ot(e,this,r)}))})),Ea=$r((function(e,t){return Uo(e,32,void 0,t,zt(t,Go(Ea)))})),Oa=$r((function(e,t){return Uo(e,64,void 0,t,zt(t,Go(Oa)))})),ka=Wo((function(e,t){return Uo(e,256,void 0,void 0,void 0,t)}));function Aa(e,t){return e===t||e!=e&&t!=t}var Pa=Do(hr),Ia=Do((function(e,t){return e>=t})),Na=br(function(){return arguments}())?br:function(e){return qa(e)&&Ee.call(e,"callee")&&!Ze.call(e,"callee")},Ta=r.isArray,Ca=Ye?Pt(Ye):function(e){return qa(e)&&dr(e)==j};function Da(e){return null!=e&&za(e.length)&&!Ua(e)}function Fa(e){return qa(e)&&Da(e)}var La=tn||ou,$a=Qe?Pt(Qe):function(e){return qa(e)&&dr(e)==p};function Ra(e){if(!qa(e))return!1;var t=dr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ha(e)}function Ua(e){if(!Ba(e))return!1;var t=dr(e);return t==h||t==v||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ma(e){return"number"==typeof e&&e==ns(e)}function za(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ba(e){var t=i(e);return null!=e&&("object"==t||"function"==t)}function qa(e){return null!=e&&"object"==i(e)}var Wa=et?Pt(et):function(e){return qa(e)&&ni(e)==g};function Va(e){return"number"==typeof e||qa(e)&&dr(e)==y}function Ha(e){if(!qa(e)||dr(e)!=m)return!1;var t=Je(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)==Pe}var Ja=tt?Pt(tt):function(e){return qa(e)&&dr(e)==b},Ka=nt?Pt(nt):function(e){return qa(e)&&ni(e)==w};function Ga(e){return"string"==typeof e||!Ta(e)&&qa(e)&&dr(e)==_}function Za(e){return"symbol"==i(e)||qa(e)&&dr(e)==x}var Xa=rt?Pt(rt):function(e){return qa(e)&&za(e.length)&&!!Ue[dr(e)]},Ya=Do(Er),Qa=Do((function(e,t){return e<=t}));function es(e){if(!e)return[];if(Da(e))return Ga(e)?Wt(e):yo(e);if(Et&&e[Et])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Et]());var t=ni(e);return(t==g?Ut:t==w?Bt:As)(e)}function ts(e){return e?(e=os(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ns(e){var t=ts(e),n=t%1;return t==t?n?t-n:t:0}function rs(e){return e?Gn(ns(e),0,4294967295):0}function os(e){if("number"==typeof e)return e;if(Za(e))return NaN;if(Ba(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ba(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(G,"");var n=ae.test(e);return n||ue.test(e)?qe(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function is(e){return mo(e,ws(e))}function as(e){return null==e?"":Zr(e)}var ss=wo((function(e,t){if(fi(t)||Da(t))mo(t,bs(t),e);else for(var n in t)Ee.call(t,n)&&qn(e,n,t[n])})),us=wo((function(e,t){mo(t,ws(t),e)})),cs=wo((function(e,t,n,r){mo(t,ws(t),e,r)})),ls=wo((function(e,t,n,r){mo(t,bs(t),e,r)})),fs=Wo(Kn),ps=$r((function(e,t){e=ge(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&si(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=ws(i),s=-1,u=a.length;++s<u;){var c=a[s],l=e[c];(void 0===l||Aa(l,xe[c])&&!Ee.call(e,c))&&(e[c]=i[c])}return e})),ds=$r((function(e){return e.push(void 0,zo),ot(xs,void 0,e)}));function hs(e,t,n){var r=null==e?void 0:fr(e,t);return void 0===r?n:r}function vs(e,t){return null!=e&&ri(e,t,gr)}var gs=Po((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ae.call(t)),e[t]=n}),Bs(Vs)),ys=Po((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ae.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),Zo),ms=$r(mr);function bs(e){return Da(e)?Rn(e):jr(e)}function ws(e){return Da(e)?Rn(e,!0):function(e){if(!Ba(e))return function(e){var t=[];if(null!=e)for(var n in ge(e))t.push(n);return t}(e);var t=fi(e),n=[];for(var r in e)("constructor"!=r||!t&&Ee.call(e,r))&&n.push(r);return n}(e)}var _s=wo((function(e,t,n){Pr(e,t,n)})),xs=wo((function(e,t,n,r){Pr(e,t,n,r)})),Ss=Wo((function(e,t){var n={};if(null==e)return n;var r=!1;t=pt(t,(function(t){return t=ao(t,e),r||(r=t.length>1),t})),mo(e,Ho(e),n),r&&(n=Zn(n,7,Bo));for(var o=t.length;o--;)Yr(n,t[o]);return n})),js=Wo((function(e,t){return null==e?{}:function(e,t){return Tr(e,t,(function(t,n){return vs(e,n)}))}(e,t)}));function Es(e,t){if(null==e)return{};var n=pt(Ho(e),(function(e){return[e]}));return t=Zo(t),Tr(e,n,(function(e,n){return t(e,n[0])}))}var Os=Ro(bs),ks=Ro(ws);function As(e){return null==e?[]:It(e,bs(e))}var Ps=jo((function(e,t,n){return t=t.toLowerCase(),e+(n?Is(t):t)}));function Is(e){return Rs(as(e).toLowerCase())}function Ns(e){return(e=as(e))&&e.replace(le,Ft).replace(Te,"")}var Ts=jo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Cs=jo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ds=So("toLowerCase"),Fs=jo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ls=jo((function(e,t,n){return e+(n?" ":"")+Rs(t)})),$s=jo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Rs=So("toUpperCase");function Us(e,t,n){return e=as(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(De)||[]}(e):function(e){return e.match(te)||[]}(e):e.match(t)||[]}var Ms=$r((function(e,t){try{return ot(e,void 0,t)}catch(e){return Ra(e)?e:new de(e)}})),zs=Wo((function(e,t){return at(t,(function(t){t=Ei(t),Jn(e,t,ya(e[t],e))})),e}));function Bs(e){return function(){return e}}var qs=ko(),Ws=ko(!0);function Vs(e){return e}function Hs(e){return Sr("function"==typeof e?e:Zn(e,1))}var Js=$r((function(e,t){return function(n){return mr(n,e,t)}})),Ks=$r((function(e,t){return function(n){return mr(e,n,t)}}));function Gs(e,t,n){var r=bs(t),o=lr(t,r);null!=n||Ba(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=lr(t,bs(t)));var i=!(Ba(n)&&"chain"in n&&!n.chain),a=Ua(e);return at(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=yo(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,dt([this.value()],arguments))})})),e}function Zs(){}var Xs=No(pt),Ys=No(ut),Qs=No(gt);function eu(e){return ui(e)?jt(Ei(e)):function(e){return function(t){return fr(t,e)}}(e)}var tu=Co(),nu=Co(!0);function ru(){return[]}function ou(){return!1}var iu,au=Io((function(e,t){return e+t}),0),su=Lo("ceil"),uu=Io((function(e,t){return e/t}),1),cu=Lo("floor"),lu=Io((function(e,t){return e*t}),1),fu=Lo("round"),pu=Io((function(e,t){return e-t}),0);return An.after=function(e,t){if("function"!=typeof t)throw new be(a);return e=ns(e),function(){if(--e<1)return t.apply(this,arguments)}},An.ary=va,An.assign=ss,An.assignIn=us,An.assignInWith=cs,An.assignWith=ls,An.at=fs,An.before=ga,An.bind=ya,An.bindAll=zs,An.bindKey=ma,An.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ta(e)?e:[e]},An.chain=ea,An.chunk=function(e,t,n){t=(n?si(e,t,n):void 0===t)?1:an(ns(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=r(Yt(o/t));i<o;)s[a++]=Wr(e,i,i+=t);return s},An.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},An.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return dt(Ta(n)?yo(n):[n],ir(t,1))},An.cond=function(e){var t=null==e?0:e.length,n=Zo();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new be(a);return[n(e[0]),e[1]]})):[],$r((function(n){for(var r=-1;++r<t;){var o=e[r];if(ot(o[0],this,n))return ot(o[1],this,n)}}))},An.conforms=function(e){return function(e){var t=bs(e);return function(n){return Xn(n,e,t)}}(Zn(e,1))},An.constant=Bs,An.countBy=ra,An.create=function(e,t){var n=Pn(e);return null==t?n:Hn(n,t)},An.curry=function e(t,n,r){var o=Uo(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},An.curryRight=function e(t,n,r){var o=Uo(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},An.debounce=ba,An.defaults=ps,An.defaultsDeep=ds,An.defer=wa,An.delay=_a,An.difference=Ai,An.differenceBy=Pi,An.differenceWith=Ii,An.drop=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,(t=n||void 0===t?1:ns(t))<0?0:t,r):[]},An.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,0,(t=r-(t=n||void 0===t?1:ns(t)))<0?0:t):[]},An.dropRightWhile=function(e,t){return e&&e.length?eo(e,Zo(t,3),!0,!0):[]},An.dropWhile=function(e,t){return e&&e.length?eo(e,Zo(t,3),!0):[]},An.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&si(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ns(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:ns(r))<0&&(r+=o),r=n>r?0:rs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},An.filter=function(e,t){return(Ta(e)?ct:or)(e,Zo(t,3))},An.flatMap=function(e,t){return ir(fa(e,t),1)},An.flatMapDeep=function(e,t){return ir(fa(e,t),1/0)},An.flatMapDepth=function(e,t,n){return n=void 0===n?1:ns(n),ir(fa(e,t),n)},An.flatten=Ci,An.flattenDeep=function(e){return null!=e&&e.length?ir(e,1/0):[]},An.flattenDepth=function(e,t){return null!=e&&e.length?ir(e,t=void 0===t?1:ns(t)):[]},An.flip=function(e){return Uo(e,512)},An.flow=qs,An.flowRight=Ws,An.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},An.functions=function(e){return null==e?[]:lr(e,bs(e))},An.functionsIn=function(e){return null==e?[]:lr(e,ws(e))},An.groupBy=ua,An.initial=function(e){return null!=e&&e.length?Wr(e,0,-1):[]},An.intersection=Fi,An.intersectionBy=Li,An.intersectionWith=$i,An.invert=gs,An.invertBy=ys,An.invokeMap=ca,An.iteratee=Hs,An.keyBy=la,An.keys=bs,An.keysIn=ws,An.map=fa,An.mapKeys=function(e,t){var n={};return t=Zo(t,3),ur(e,(function(e,r,o){Jn(n,t(e,r,o),e)})),n},An.mapValues=function(e,t){var n={};return t=Zo(t,3),ur(e,(function(e,r,o){Jn(n,r,t(e,r,o))})),n},An.matches=function(e){return kr(Zn(e,1))},An.matchesProperty=function(e,t){return Ar(e,Zn(t,1))},An.memoize=xa,An.merge=_s,An.mergeWith=xs,An.method=Js,An.methodOf=Ks,An.mixin=Gs,An.negate=Sa,An.nthArg=function(e){return e=ns(e),$r((function(t){return Ir(t,e)}))},An.omit=Ss,An.omitBy=function(e,t){return Es(e,Sa(Zo(t)))},An.once=function(e){return ga(2,e)},An.orderBy=function(e,t,n,r){return null==e?[]:(Ta(t)||(t=null==t?[]:[t]),Ta(n=r?void 0:n)||(n=null==n?[]:[n]),Nr(e,t,n))},An.over=Xs,An.overArgs=ja,An.overEvery=Ys,An.overSome=Qs,An.partial=Ea,An.partialRight=Oa,An.partition=pa,An.pick=js,An.pickBy=Es,An.property=eu,An.propertyOf=function(e){return function(t){return null==e?void 0:fr(e,t)}},An.pull=Ui,An.pullAll=Mi,An.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Cr(e,t,Zo(n,2)):e},An.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Cr(e,t,void 0,n):e},An.pullAt=zi,An.range=tu,An.rangeRight=nu,An.rearg=ka,An.reject=function(e,t){return(Ta(e)?ct:or)(e,Sa(Zo(t,3)))},An.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Zo(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Dr(e,o),n},An.rest=function(e,t){if("function"!=typeof e)throw new be(a);return $r(e,t=void 0===t?t:ns(t))},An.reverse=Bi,An.sampleSize=function(e,t,n){return t=(n?si(e,t,n):void 0===t)?1:ns(t),(Ta(e)?Mn:Ur)(e,t)},An.set=function(e,t,n){return null==e?e:Mr(e,t,n)},An.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Mr(e,t,n,r)},An.shuffle=function(e){return(Ta(e)?zn:qr)(e)},An.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&si(e,t,n)?(t=0,n=r):(t=null==t?0:ns(t),n=void 0===n?r:ns(n)),Wr(e,t,n)):[]},An.sortBy=da,An.sortedUniq=function(e){return e&&e.length?Kr(e):[]},An.sortedUniqBy=function(e,t){return e&&e.length?Kr(e,Zo(t,2)):[]},An.split=function(e,t,n){return n&&"number"!=typeof n&&si(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=as(e))&&("string"==typeof t||null!=t&&!Ja(t))&&!(t=Zr(t))&&Rt(e)?uo(Wt(e),0,n):e.split(t,n):[]},An.spread=function(e,t){if("function"!=typeof e)throw new be(a);return t=null==t?0:an(ns(t),0),$r((function(n){var r=n[t],o=uo(n,0,t);return r&&dt(o,r),ot(e,this,o)}))},An.tail=function(e){var t=null==e?0:e.length;return t?Wr(e,1,t):[]},An.take=function(e,t,n){return e&&e.length?Wr(e,0,(t=n||void 0===t?1:ns(t))<0?0:t):[]},An.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,(t=r-(t=n||void 0===t?1:ns(t)))<0?0:t,r):[]},An.takeRightWhile=function(e,t){return e&&e.length?eo(e,Zo(t,3),!1,!0):[]},An.takeWhile=function(e,t){return e&&e.length?eo(e,Zo(t,3)):[]},An.tap=function(e,t){return t(e),e},An.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new be(a);return Ba(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ba(e,t,{leading:r,maxWait:t,trailing:o})},An.thru=ta,An.toArray=es,An.toPairs=Os,An.toPairsIn=ks,An.toPath=function(e){return Ta(e)?pt(e,Ei):Za(e)?[e]:yo(ji(as(e)))},An.toPlainObject=is,An.transform=function(e,t,n){var r=Ta(e),o=r||La(e)||Xa(e);if(t=Zo(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ba(e)&&Ua(i)?Pn(Je(e)):{}}return(o?at:ur)(e,(function(e,r,o){return t(n,e,r,o)})),n},An.unary=function(e){return va(e,1)},An.union=qi,An.unionBy=Wi,An.unionWith=Vi,An.uniq=function(e){return e&&e.length?Xr(e):[]},An.uniqBy=function(e,t){return e&&e.length?Xr(e,Zo(t,2)):[]},An.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Xr(e,void 0,t):[]},An.unset=function(e,t){return null==e||Yr(e,t)},An.unzip=Hi,An.unzipWith=Ji,An.update=function(e,t,n){return null==e?e:Qr(e,t,io(n))},An.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Qr(e,t,io(n),r)},An.values=As,An.valuesIn=function(e){return null==e?[]:It(e,ws(e))},An.without=Ki,An.words=Us,An.wrap=function(e,t){return Ea(io(t),e)},An.xor=Gi,An.xorBy=Zi,An.xorWith=Xi,An.zip=Yi,An.zipObject=function(e,t){return ro(e||[],t||[],qn)},An.zipObjectDeep=function(e,t){return ro(e||[],t||[],Mr)},An.zipWith=Qi,An.entries=Os,An.entriesIn=ks,An.extend=us,An.extendWith=cs,Gs(An,An),An.add=au,An.attempt=Ms,An.camelCase=Ps,An.capitalize=Is,An.ceil=su,An.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=os(n))==n?n:0),void 0!==t&&(t=(t=os(t))==t?t:0),Gn(os(e),t,n)},An.clone=function(e){return Zn(e,4)},An.cloneDeep=function(e){return Zn(e,5)},An.cloneDeepWith=function(e,t){return Zn(e,5,t="function"==typeof t?t:void 0)},An.cloneWith=function(e,t){return Zn(e,4,t="function"==typeof t?t:void 0)},An.conformsTo=function(e,t){return null==t||Xn(e,t,bs(t))},An.deburr=Ns,An.defaultTo=function(e,t){return null==e||e!=e?t:e},An.divide=uu,An.endsWith=function(e,t,n){e=as(e),t=Zr(t);var r=e.length,o=n=void 0===n?r:Gn(ns(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},An.eq=Aa,An.escape=function(e){return(e=as(e))&&M.test(e)?e.replace(R,Lt):e},An.escapeRegExp=function(e){return(e=as(e))&&K.test(e)?e.replace(J,"\\$&"):e},An.every=function(e,t,n){var r=Ta(e)?ut:nr;return n&&si(e,t,n)&&(t=void 0),r(e,Zo(t,3))},An.find=oa,An.findIndex=Ni,An.findKey=function(e,t){return mt(e,Zo(t,3),ur)},An.findLast=ia,An.findLastIndex=Ti,An.findLastKey=function(e,t){return mt(e,Zo(t,3),cr)},An.floor=cu,An.forEach=aa,An.forEachRight=sa,An.forIn=function(e,t){return null==e?e:ar(e,Zo(t,3),ws)},An.forInRight=function(e,t){return null==e?e:sr(e,Zo(t,3),ws)},An.forOwn=function(e,t){return e&&ur(e,Zo(t,3))},An.forOwnRight=function(e,t){return e&&cr(e,Zo(t,3))},An.get=hs,An.gt=Pa,An.gte=Ia,An.has=function(e,t){return null!=e&&ri(e,t,vr)},An.hasIn=vs,An.head=Di,An.identity=Vs,An.includes=function(e,t,n,r){e=Da(e)?e:As(e),n=n&&!r?ns(n):0;var o=e.length;return n<0&&(n=an(o+n,0)),Ga(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&wt(e,t,n)>-1},An.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ns(n);return o<0&&(o=an(r+o,0)),wt(e,t,o)},An.inRange=function(e,t,n){return t=ts(t),void 0===n?(n=t,t=0):n=ts(n),function(e,t,n){return e>=sn(t,n)&&e<an(t,n)}(e=os(e),t,n)},An.invoke=ms,An.isArguments=Na,An.isArray=Ta,An.isArrayBuffer=Ca,An.isArrayLike=Da,An.isArrayLikeObject=Fa,An.isBoolean=function(e){return!0===e||!1===e||qa(e)&&dr(e)==f},An.isBuffer=La,An.isDate=$a,An.isElement=function(e){return qa(e)&&1===e.nodeType&&!Ha(e)},An.isEmpty=function(e){if(null==e)return!0;if(Da(e)&&(Ta(e)||"string"==typeof e||"function"==typeof e.splice||La(e)||Xa(e)||Na(e)))return!e.length;var t=ni(e);if(t==g||t==w)return!e.size;if(fi(e))return!jr(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0},An.isEqual=function(e,t){return wr(e,t)},An.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?wr(e,t,void 0,n):!!r},An.isError=Ra,An.isFinite=function(e){return"number"==typeof e&&nn(e)},An.isFunction=Ua,An.isInteger=Ma,An.isLength=za,An.isMap=Wa,An.isMatch=function(e,t){return e===t||_r(e,t,Yo(t))},An.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,_r(e,t,Yo(t),n)},An.isNaN=function(e){return Va(e)&&e!=+e},An.isNative=function(e){if(li(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(e)},An.isNil=function(e){return null==e},An.isNull=function(e){return null===e},An.isNumber=Va,An.isObject=Ba,An.isObjectLike=qa,An.isPlainObject=Ha,An.isRegExp=Ja,An.isSafeInteger=function(e){return Ma(e)&&e>=-9007199254740991&&e<=9007199254740991},An.isSet=Ka,An.isString=Ga,An.isSymbol=Za,An.isTypedArray=Xa,An.isUndefined=function(e){return void 0===e},An.isWeakMap=function(e){return qa(e)&&ni(e)==S},An.isWeakSet=function(e){return qa(e)&&"[object WeakSet]"==dr(e)},An.join=function(e,t){return null==e?"":rn.call(e,t)},An.kebabCase=Ts,An.last=Ri,An.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=ns(n))<0?an(r+o,0):sn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):bt(e,xt,o,!0)},An.lowerCase=Cs,An.lowerFirst=Ds,An.lt=Ya,An.lte=Qa,An.max=function(e){return e&&e.length?rr(e,Vs,hr):void 0},An.maxBy=function(e,t){return e&&e.length?rr(e,Zo(t,2),hr):void 0},An.mean=function(e){return St(e,Vs)},An.meanBy=function(e,t){return St(e,Zo(t,2))},An.min=function(e){return e&&e.length?rr(e,Vs,Er):void 0},An.minBy=function(e,t){return e&&e.length?rr(e,Zo(t,2),Er):void 0},An.stubArray=ru,An.stubFalse=ou,An.stubObject=function(){return{}},An.stubString=function(){return""},An.stubTrue=function(){return!0},An.multiply=lu,An.nth=function(e,t){return e&&e.length?Ir(e,ns(t)):void 0},An.noConflict=function(){return He._===this&&(He._=Ie),this},An.noop=Zs,An.now=ha,An.pad=function(e,t,n){e=as(e);var r=(t=ns(t))?qt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return To(Qt(o),n)+e+To(Yt(o),n)},An.padEnd=function(e,t,n){e=as(e);var r=(t=ns(t))?qt(e):0;return t&&r<t?e+To(t-r,n):e},An.padStart=function(e,t,n){e=as(e);var r=(t=ns(t))?qt(e):0;return t&&r<t?To(t-r,n)+e:e},An.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),cn(as(e).replace(Z,""),t||0)},An.random=function(e,t,n){if(n&&"boolean"!=typeof n&&si(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ts(e),void 0===t?(t=e,e=0):t=ts(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=ln();return sn(e+o*(t-e+Be("1e-"+((o+"").length-1))),t)}return Fr(e,t)},An.reduce=function(e,t,n){var r=Ta(e)?ht:Ot,o=arguments.length<3;return r(e,Zo(t,4),n,o,er)},An.reduceRight=function(e,t,n){var r=Ta(e)?vt:Ot,o=arguments.length<3;return r(e,Zo(t,4),n,o,tr)},An.repeat=function(e,t,n){return t=(n?si(e,t,n):void 0===t)?1:ns(t),Lr(as(e),t)},An.replace=function(){var e=arguments,t=as(e[0]);return e.length<3?t:t.replace(e[1],e[2])},An.result=function(e,t,n){var r=-1,o=(t=ao(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Ei(t[r])];void 0===i&&(r=o,i=n),e=Ua(i)?i.call(e):i}return e},An.round=fu,An.runInContext=e,An.sample=function(e){return(Ta(e)?Un:Rr)(e)},An.size=function(e){if(null==e)return 0;if(Da(e))return Ga(e)?qt(e):e.length;var t=ni(e);return t==g||t==w?e.size:jr(e).length},An.snakeCase=Fs,An.some=function(e,t,n){var r=Ta(e)?gt:Vr;return n&&si(e,t,n)&&(t=void 0),r(e,Zo(t,3))},An.sortedIndex=function(e,t){return Hr(e,t)},An.sortedIndexBy=function(e,t,n){return Jr(e,t,Zo(n,2))},An.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Hr(e,t);if(r<n&&Aa(e[r],t))return r}return-1},An.sortedLastIndex=function(e,t){return Hr(e,t,!0)},An.sortedLastIndexBy=function(e,t,n){return Jr(e,t,Zo(n,2),!0)},An.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Hr(e,t,!0)-1;if(Aa(e[n],t))return n}return-1},An.startCase=Ls,An.startsWith=function(e,t,n){return e=as(e),n=null==n?0:Gn(ns(n),0,e.length),t=Zr(t),e.slice(n,n+t.length)==t},An.subtract=pu,An.sum=function(e){return e&&e.length?kt(e,Vs):0},An.sumBy=function(e,t){return e&&e.length?kt(e,Zo(t,2)):0},An.template=function(e,t,n){var r=An.templateSettings;n&&si(e,t,n)&&(t=void 0),e=as(e),t=cs({},t,r,Mo);var o,i,a=cs({},t.imports,r.imports,Mo),s=bs(a),u=It(a,s),c=0,l=t.interpolate||fe,f="__p += '",p=ye((t.escape||fe).source+"|"+l.source+"|"+(l===q?re:fe).source+"|"+(t.evaluate||fe).source+"|$","g"),d="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Re+"]")+"\n";e.replace(p,(function(t,n,r,a,s,u){return r||(r=a),f+=e.slice(c,u).replace(pe,$t),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(i=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var h=Ee.call(t,"variable")&&t.variable;h||(f="with (obj) {\n"+f+"\n}\n"),f=(i?f.replace(D,""):f).replace(F,"$1").replace(L,"$1;"),f="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Ms((function(){return he(s,d+"return "+f).apply(void 0,u)}));if(v.source=f,Ra(v))throw v;return v},An.times=function(e,t){if((e=ns(e))<1||e>9007199254740991)return[];var n=4294967295,r=sn(e,4294967295);e-=4294967295;for(var o=At(r,t=Zo(t));++n<e;)t(n);return o},An.toFinite=ts,An.toInteger=ns,An.toLength=rs,An.toLower=function(e){return as(e).toLowerCase()},An.toNumber=os,An.toSafeInteger=function(e){return e?Gn(ns(e),-9007199254740991,9007199254740991):0===e?e:0},An.toString=as,An.toUpper=function(e){return as(e).toUpperCase()},An.trim=function(e,t,n){if((e=as(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Zr(t)))return e;var r=Wt(e),o=Wt(t);return uo(r,Tt(r,o),Ct(r,o)+1).join("")},An.trimEnd=function(e,t,n){if((e=as(e))&&(n||void 0===t))return e.replace(X,"");if(!e||!(t=Zr(t)))return e;var r=Wt(e);return uo(r,0,Ct(r,Wt(t))+1).join("")},An.trimStart=function(e,t,n){if((e=as(e))&&(n||void 0===t))return e.replace(Z,"");if(!e||!(t=Zr(t)))return e;var r=Wt(e);return uo(r,Tt(r,Wt(t))).join("")},An.truncate=function(e,t){var n=30,r="...";if(Ba(t)){var o="separator"in t?t.separator:o;n="length"in t?ns(t.length):n,r="omission"in t?Zr(t.omission):r}var i=(e=as(e)).length;if(Rt(e)){var a=Wt(e);i=a.length}if(n>=i)return e;var s=n-qt(r);if(s<1)return r;var u=a?uo(a,0,s).join(""):e.slice(0,s);if(void 0===o)return u+r;if(a&&(s+=u.length-s),Ja(o)){if(e.slice(s).search(o)){var c,l=u;for(o.global||(o=ye(o.source,as(oe.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var f=c.index;u=u.slice(0,void 0===f?s:f)}}else if(e.indexOf(Zr(o),s)!=s){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+r},An.unescape=function(e){return(e=as(e))&&U.test(e)?e.replace($,Vt):e},An.uniqueId=function(e){var t=++Oe;return as(e)+t},An.upperCase=$s,An.upperFirst=Rs,An.each=aa,An.eachRight=sa,An.first=Di,Gs(An,(iu={},ur(An,(function(e,t){Ee.call(An.prototype,t)||(iu[t]=e)})),iu),{chain:!1}),An.VERSION="4.17.15",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){An[e].placeholder=An})),at(["drop","take"],(function(e,t){Tn.prototype[e]=function(n){n=void 0===n?1:an(ns(n),0);var r=this.__filtered__&&!t?new Tn(this):this.clone();return r.__filtered__?r.__takeCount__=sn(n,r.__takeCount__):r.__views__.push({size:sn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Tn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Tn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Zo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Tn.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Tn.prototype[e]=function(){return this.__filtered__?new Tn(this):this[n](1)}})),Tn.prototype.compact=function(){return this.filter(Vs)},Tn.prototype.find=function(e){return this.filter(e).head()},Tn.prototype.findLast=function(e){return this.reverse().find(e)},Tn.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new Tn(this):this.map((function(n){return mr(n,e,t)}))})),Tn.prototype.reject=function(e){return this.filter(Sa(Zo(e)))},Tn.prototype.slice=function(e,t){e=ns(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Tn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ns(t))<0?n.dropRight(-t):n.take(t-e)),n)},Tn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Tn.prototype.toArray=function(){return this.take(4294967295)},ur(Tn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=An[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(An.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Tn,u=a[0],c=s||Ta(t),l=function(e){var t=o.apply(An,dt([e],a));return r&&f?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,p=!!this.__actions__.length,d=i&&!f,h=s&&!p;if(!i&&c){t=h?t:new Tn(this);var v=e.apply(t,a);return v.__actions__.push({func:ta,args:[l],thisArg:void 0}),new Nn(v,f)}return d&&h?e.apply(this,a):(v=this.thru(l),d?r?v.value()[0]:v.value():v)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=we[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);An.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ta(o)?o:[],e)}return this[n]((function(n){return t.apply(Ta(n)?n:[],e)}))}})),ur(Tn.prototype,(function(e,t){var n=An[t];if(n){var r=n.name+"";Ee.call(bn,r)||(bn[r]=[]),bn[r].push({name:t,func:n})}})),bn[Ao(void 0,2).name]=[{name:"wrapper",func:void 0}],Tn.prototype.clone=function(){var e=new Tn(this.__wrapped__);return e.__actions__=yo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yo(this.__views__),e},Tn.prototype.reverse=function(){if(this.__filtered__){var e=new Tn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Tn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ta(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=sn(t,e+a);break;case"takeRight":e=an(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=sn(u,this.__takeCount__);if(!n||!r&&o==u&&d==u)return to(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var v=-1,g=e[c+=t];++v<f;){var y=l[v],m=y.iteratee,b=y.type,w=m(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[p++]=g}return h},An.prototype.at=na,An.prototype.chain=function(){return ea(this)},An.prototype.commit=function(){return new Nn(this.value(),this.__chain__)},An.prototype.next=function(){void 0===this.__values__&&(this.__values__=es(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},An.prototype.plant=function(e){for(var t,n=this;n instanceof In;){var r=ki(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},An.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Tn){var t=e;return this.__actions__.length&&(t=new Tn(this)),(t=t.reverse()).__actions__.push({func:ta,args:[Bi],thisArg:void 0}),new Nn(t,this.__chain__)}return this.thru(Bi)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return to(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,Et&&(An.prototype[Et]=function(){return this}),An}();"object"==i(n(46))&&n(46)?(He._=Ht,void 0===(o=function(){return Ht}.call(t,n,t,r))||(r.exports=o)):Ke?((Ke.exports=Ht)._=Ht,Je._=Ht):He._=Ht}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(e){return r(e,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),a=n(118),s=n(124),u=n(127),c=n(128),l=n(129),f=n(130),p=n(59),d=n(131),h=n(10),v=n(135),g=n(136),y=n(141),m=n(0),b=n(12),w=n(142),_=n(5),x=n(144),S=n(6),j={};j["[object Arguments]"]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j["[object Object]"]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j["[object Function]"]=j["[object WeakMap]"]=!1,e.exports=function e(t,n,E,O,k,A){var P,I=1&n,N=2&n,T=4&n;if(E&&(P=k?E(t,O,k,A):E(t)),void 0!==P)return P;if(!_(t))return t;var C=m(t);if(C){if(P=v(t),!I)return c(t,P)}else{var D=h(t),F="[object Function]"==D||"[object GeneratorFunction]"==D;if(b(t))return u(t,I);if("[object Object]"==D||"[object Arguments]"==D||F&&!k){if(P=N||F?{}:y(t),!I)return N?f(t,s(P,t)):l(t,a(P,t))}else{if(!j[D])return k?t:{};P=g(t,D,I)}}A||(A=new r);var L=A.get(t);if(L)return L;A.set(t,P),x(t)?t.forEach((function(r){P.add(e(r,n,E,r,t,A))})):w(t)&&t.forEach((function(r,o){P.set(o,e(r,n,E,o,t,A))}));var $=T?N?d:p:N?keysIn:S,R=C?void 0:$(t);return o(R||t,(function(r,o){R&&(r=t[o=r]),i(P,o,e(r,n,E,o,t,A))})),P}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},function(e,t,n){var r=n(16);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(16);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(16);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),a=n(48),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:s).test(a(e))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),a=n(111),s=n(112);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(18);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(18),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(18),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(18);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(19);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){function n(e){return(n="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)}e.exports=function(e){var t=n(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(19);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(19);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(19);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(20),o=n(6);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(8),o=n(3);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(8),o=n(34),i=n(3),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(54)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(20),o=n(55);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(5),o=n(23),i=n(126),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){function r(e){return(r="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)}var o=n(2),i="object"==r(t)&&t&&!t.nodeType&&t,a=i&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===i?o.Buffer:void 0,u=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(14)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(20),o=n(38);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(20),o=n(58);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(60),o=n(58),i=n(55);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(4)(n(2),"DataView");e.exports=r},function(e,t,n){var r=n(4)(n(2),"Promise");e.exports=r},function(e,t,n){var r=n(4)(n(2),"WeakMap");e.exports=r},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(41),o=n(137),i=n(138),a=n(139),s=n(140);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(41);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(9),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(41);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(63),o=n(40),i=n(23);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(143),o=n(35),i=n(36),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(10),o=n(3);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(145),o=n(35),i=n(36),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(10),o=n(3);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){e.exports=n(147)},function(e,t,n){var r=n(33),o=n(24),i=n(151),a=n(0);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},function(e,t,n){var r=n(149)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}},function(e,t,n){var r=n(7);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}},function(e,t,n){var r=n(25);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(56),o=n(153),i=n(26),a=n(0);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){var r=n(24);e.exports=function(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}},function(e,t,n){var r=n(155),o=n(163),i=n(71);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(29),o=n(66);e.exports=function(e,t,n,i){var a=n.length,s=a,u=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=n[a])[0],f=e[l],p=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(i)var h=i(f,p,l,e,t,d);if(!(void 0===h?o(p,f,3,i,d):h))return!1}}return!0}},function(e,t,n){var r=n(29),o=n(67),i=n(160),a=n(162),s=n(10),u=n(0),c=n(12),l=n(22),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,v){var g=u(e),y=u(t),m=g?"[object Array]":s(e),b=y?"[object Array]":s(t),w=(m="[object Arguments]"==m?f:m)==f,_=(b="[object Arguments]"==b?f:b)==f,x=m==b;if(x&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(x&&!w)return v||(v=new r),g||l(e)?o(e,t,n,d,h,v):i(e,t,m,n,d,h,v);if(!(1&n)){var S=w&&p.call(e,"__wrapped__"),j=_&&p.call(t,"__wrapped__");if(S||j){var E=S?e.value():e,O=j?t.value():t;return v||(v=new r),h(E,O,n,d,v)}}return!!x&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(9),o=n(62),i=n(30),a=n(67),s=n(161),u=n(42),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=u),e.size!=t.size&&!h)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var g=a(d(e),d(t),r,c,f,p);return p.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(59),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:o.call(t,p)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var h=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var g=e[p=c[f]],y=t[p];if(i)var m=u?i(y,g,p,t,e,s):i(g,y,p,e,t,s);if(!(void 0===m?g===y||a(g,y,n,i,s):m)){h=!1;break}v||(v="constructor"==p)}if(h&&!v){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(h=!1)}return s.delete(e),s.delete(t),h}},function(e,t,n){var r=n(70),o=n(6);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(66),o=n(165),i=n(171),a=n(43),s=n(70),u=n(71),c=n(27);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(72);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(167),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(168);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(32);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(170);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(9),o=n(45),i=n(0),a=n(44),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(172),o=n(74);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(75),o=n(174),i=n(43),a=n(27);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t,n){var r=n(72);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(176),o=n(74);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t,n){var r=n(37),o=n(10),i=n(21),a=n(0),s=n(7),u=n(12),c=n(23),l=n(22),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,n){var r=n(45),o=n(26),i=n(180),a=n(0);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r=n(24),o=n(7);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},function(e,t,n){var r=n(182),o=n(24),i=n(26),a=n(183),s=n(0);e.exports=function(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}},function(e,t){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},function(e,t){e.exports=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}},function(e,t,n){var r=n(37),o=n(10),i=n(7),a=n(185),s=n(186);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},function(e,t,n){var r=n(8),o=n(0),i=n(3);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(187),o=n(188),i=n(189);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){var r=n(75)("length");e.exports=r},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){var n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")?",u="[\\ufe0e\\ufe0f]?"+s+"(?:\\u200d(?:"+[o,i,a].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",c="(?:"+[o+n+"?",n,i,a,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(r+"(?="+r+")|"+c+u,"g");e.exports=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}},function(e,t,n){var r=n(33),o=n(63),i=n(65),a=n(26),s=n(40),u=n(0),c=n(12),l=n(17),f=n(5),p=n(22);e.exports=function(e,t,n){var d=u(e),h=d||c(e)||p(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=h?d?new v:[]:f(e)&&l(v)?o(s(e)):{}}return(h?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}},function(e,t,n){var r=n(192),o=n(194),i=n(200),a=n(209),s=o((function(e){return i(r(e,1,a,!0))}));e.exports=s},function(e,t,n){var r=n(39),o=n(193);e.exports=function e(t,n,i,a,s){var u=-1,c=t.length;for(i||(i=o),s||(s=[]);++u<c;){var l=t[u];n>0&&i(l)?n>1?e(l,n-1,i,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(e,t,n){var r=n(9),o=n(21),i=n(0),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(u),r(e,this,c)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(198),o=n(199)(r);e.exports=o},function(e,t,n){var r=n(64),o=n(51),i=n(25),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),a=n(69),s=n(207),u=n(42);e.exports=function(e,t,n){var c=-1,l=o,f=e.length,p=!0,d=[],h=d;if(n)p=!1,l=i;else if(f>=200){var v=t?null:s(e);if(v)return u(v);p=!1,l=a,h=new r}else h=t?[]:d;e:for(;++c<f;){var g=e[c],y=t?t(g):g;if(g=n||0!==g?g:0,p&&y==y){for(var m=h.length;m--;)if(h[m]===y)continue e;t&&h.push(y),d.push(g)}else l(h,y,n)||(h!==d&&h.push(y),d.push(g))}return d}},function(e,t,n){var r=n(202);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(61),o=n(208),i=n(42),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(7),o=n(3);e.exports=function(e){return o(e)&&r(e)}},function(e,t,n){var r=n(211),o=n(6);e.exports=function(e){return null==e?[]:r(e,o(e))}},function(e,t,n){var r=n(45);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t){e.exports="2.1.8"},function(e,t,n){var r=n(1),o=n(28);function i(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function a(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},function(e,t,n){e.exports={components:n(215),dijkstra:n(76),dijkstraAll:n(216),findCycles:n(217),floydWarshall:n(218),isAcyclic:n(219),postorder:n(220),preorder:n(221),prim:n(222),tarjan:n(78),topsort:n(79)}},function(e,t,n){var r=n(1);e.exports=function(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}},function(e,t,n){var r=n(76),o=n(1);e.exports=function(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}},function(e,t,n){var r=n(1),o=n(78);e.exports=function(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},function(e,t,n){var r=n(1);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)}))}))})),r}(e,t||o,n||function(t){return e.outEdges(t)})};var o=r.constant(1)},function(e,t,n){var r=n(79);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},function(e,t,n){var r=n(80);e.exports=function(e,t){return r(e,t,"post")}},function(e,t,n){var r=n(80);e.exports=function(e,t){return r(e,t,"pre")}},function(e,t,n){var r=n(1),o=n(28),i=n(77);e.exports=function(e,t){var n,a=new o,s={},u=new i;function c(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(s[r]=n,u.decrease(r,i))}}if(0===e.nodeCount())return a;r.each(e.nodes(),(function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),u.decrease(e.nodes()[0],0);for(var l=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(n).forEach(c)}return a}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return(o?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}var c=[];for(u=s;u<o.length;u++)c.push("..");return(c=c.concat(i.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(13))},function(e,t,n){function r(e){return(r="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)}var o={file:n(225),http:n(81),https:n(81)},i="object"===("undefined"==typeof window?"undefined":r(window))||"function"==typeof importScripts?o.http:o.file;"undefined"==typeof Promise&&n(83),e.exports.load=function(e,t){var n=Promise.resolve();return void 0===t&&(t={}),(n=n.then((function(){if(void 0===e)throw new TypeError("location is required");if("string"!=typeof e)throw new TypeError("location must be a string");if(void 0!==t){if("object"!==r(t))throw new TypeError("options must be an object");if(void 0!==t.processContent&&"function"!=typeof t.processContent)throw new TypeError("options.processContent must be a function")}}))).then((function(){return new Promise((function(n,r){(function(e){var t=function(e){return void 0!==e&&(e=-1===e.indexOf("://")?"":e.split("://")[0]),e}(e),n=o[t];if(void 0===n){if(""!==t)throw new Error("Unsupported scheme: "+t);n=i}return n})(e).load(e,t||{},(function(e,t){e?r(e):n(t)}))}))})).then((function(n){return t.processContent?new Promise((function(o,i){"object"!==r(n)&&(n={text:n}),n.location=e,t.processContent(n,(function(e,t){e?i(e):o(t)}))})):"object"===r(n)?n.text:n}))}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw r;e(r)}},function(e,t,n){function r(e){return(r="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)}var o;"undefined"!=typeof window?o=window:"undefined"!=typeof self?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),a=n(228),s=n(82),u=n(229),c=n(231);function l(){}var f=t=e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=m,f.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&"file:"==o.location.protocol&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function d(e){if(!s(e))return e;var t=[];for(var n in e)h(t,n,e[n]);return t.join("&")}function h(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach((function(n){h(e,t,n)}));else if(s(n))for(var r in n)h(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function v(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;i<a;++i)-1==(n=(t=o[i]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function g(e){return/[\/+]json($|[^-\w])/.test(e)}function y(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,n,r,o,i=e.split(/\r?\n/),a={},s=0,u=i.length;s<u;++s)-1!==(t=(n=i[s]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),o=p(n.slice(t+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function m(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new y(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function b(e,t,n){var r=f("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}f.serializeObject=d,f.parseString=v,f.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},f.serialize={"application/x-www-form-urlencoded":d,"application/json":JSON.stringify},f.parse={"application/x-www-form-urlencoded":v,"application/json":JSON.parse},u(y.prototype),y.prototype._parseBody=function(e){var t=f.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&g(this.type)&&(t=f.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},y.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},f.Response=y,i(m.prototype),a(m.prototype),m.prototype.type=function(e){return this.set("Content-Type",f.types[e]||e),this},m.prototype.accept=function(e){return this.set("Accept",f.types[e]||e),this},m.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===r(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,o)},m.prototype.query=function(e){return"string"!=typeof e&&(e=d(e)),e&&this._query.push(e),this},m.prototype.attach=function(e,t,n){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},m.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},m.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},m.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},m.prototype.buffer=m.prototype.ca=m.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},m.prototype.pipe=m.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},m.prototype._isHost=function(e){return e&&"object"===r(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},m.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||l,this._finalizeQueryString(),this._end()},m.prototype._end=function(){var e=this,t=this.xhr=f.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||f.serialize[o?o.split(";")[0]:""];!i&&g(o)&&(i=f.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},f.agent=function(){return new c},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){c.prototype[e.toLowerCase()]=function(t,n){var r=new f.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),c.prototype.del=c.prototype.delete,f.get=function(e,t,n){var r=f("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.head=function(e,t,n){var r=f("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},f.options=function(e,t,n){var r=f("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.del=b,f.delete=b,f.patch=function(e,t,n){var r=f("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.post=function(e,t,n){var r=f("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},f.put=function(e,t,n){var r=f("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){function r(e){return(r="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)}var o=n(82);function i(e){if(e)return function(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}(e)}e.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},i.prototype.parse=function(e){return this._parser=e,this},i.prototype.responseType=function(e){return this._responseType=e,this},i.prototype.serialize=function(e){return this._serializer=e,this},i.prototype.timeout=function(e){if(!e||"object"!==r(e))return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},i.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~a.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){n.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},i.prototype.catch=function(e){return this.then(void 0,e)},i.prototype.use=function(e){return e(this),this},i.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},i.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},i.prototype.get=function(e){return this._header[e.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(e,t){if(o(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},i.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},i.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},i.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},i.prototype.redirects=function(e){return this._maxRedirects=e,this},i.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(e){var t=o(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&o(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},i.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},i.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(e,t,n){var r=n(230);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=r.type(t);var n=r.params(t);for(var o in n)this[o]=n[o];this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t,n){t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}})),n.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,t.arguments)}))},e.exports=n},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(233),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(e,t){!function(e,n){if(!e.setImmediate){var r,o,i,a,s,u=1,c={},l=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return c[u]=o,r(u),u++},p.clearImmediate=d}function d(e){delete c[e]}function h(e){if(l)setTimeout(h,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,p,d,h,v=e[l].replace(s,"%20"),g=v.indexOf(n);g>=0?(f=v.substr(0,g),p=v.substr(g+1)):(f=v,p=""),d=decodeURIComponent(f),h=decodeURIComponent(p),r(a,d)?o(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r="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)}var o=function(e){switch(r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,u){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===r(e)?a(s(e),(function(r){var s=encodeURIComponent(o(r))+n;return i(e[r])?a(e[r],(function(e){return s+encodeURIComponent(o(e))})).join(t):s+encodeURIComponent(o(e[r]))})).join(t):u?encodeURIComponent(o(u))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){e.exports=function(e){var t=/^\\\\\?\\/.test(e),n=/[^\u0000-\u0080]+/.test(e);return t||n?e:e.replace(/\\/g,"/")}},function(e,t,n){var r,o,i,a;function s(e){return(s="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)}
14
+ /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */a=function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,o=1;o<r;++o)t[o]=t[o].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function i(e){var r=t("[0-9]","[A-Fa-f]"),o=n(n("%[EFef]"+r+"%"+r+r+"%"+r+r)+"|"+n("%[89A-Fa-f]"+r+"%"+r+r)+"|"+n("%"+r+r)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",a=t("[\\:\\/\\?\\#\\[\\]\\@]",i),s=e?"[\\uE000-\\uF8FF]":"[]",u=t("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");n("[A-Za-z]"+t("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),n(n(o+"|"+t(u,i,"[\\:]"))+"*");var c=n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("0?[1-9][0-9]")+"|0?0?[0-9]"),l=n(c+"\\."+c+"\\."+c+"\\."+c),f=n(r+"{1,4}"),p=n(n(f+"\\:"+f)+"|"+l),d=n(n(f+"\\:")+"{6}"+p),h=n("\\:\\:"+n(f+"\\:")+"{5}"+p),v=n(n(f)+"?\\:\\:"+n(f+"\\:")+"{4}"+p),g=n(n(n(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+n(f+"\\:")+"{3}"+p),y=n(n(n(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+n(f+"\\:")+"{2}"+p),m=n(n(n(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+p),b=n(n(n(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+p),w=n(n(n(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),_=n(n(n(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),x=n([d,h,v,g,y,m,b,w,_].join("|")),S=n(n(u+"|"+o)+"+");n("[vV]"+r+"+\\."+t(u,i,"[\\:]")+"+"),n(n(o+"|"+t(u,i))+"*");var j=n(o+"|"+t(u,i,"[\\:\\@]"));return n(n(o+"|"+t(u,i,"[\\@]"))+"+"),n(n(j+"|"+t("[\\/\\?]",s))+"*"),{NOT_SCHEME:new RegExp(t("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,i),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,i),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,i),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,i),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,i),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,a),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+l+")$"),IPV6ADDRESS:new RegExp("^\\[?("+x+")"+n(n("\\%25|\\%(?!"+r+"{2})")+"("+S+")")+"?\\]?$")}}var a=i(!1),s=i(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=/^xn--/,f=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,v=String.fromCharCode;function g(e){throw new RangeError(d[e])}function y(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var o=function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}((e=e.replace(p,".")).split("."),t).join(".");return r+o}var m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},b=function(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))},w=function(e){return y(e,(function(e){return f.test(e)?"xn--"+function(e){var t=[],n=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}(e)).length,r=128,o=0,i=72,a=!0,s=!1,u=void 0;try{for(var l,f=e[Symbol.iterator]();!(a=(l=f.next()).done);a=!0){var p=l.value;p<128&&t.push(v(p))}}catch(e){s=!0,u=e}finally{try{!a&&f.return&&f.return()}finally{if(s)throw u}}var d=t.length,y=d;for(d&&t.push("-");y<n;){var w=c,_=!0,x=!1,S=void 0;try{for(var j,E=e[Symbol.iterator]();!(_=(j=E.next()).done);_=!0){var O=j.value;O>=r&&O<w&&(w=O)}}catch(e){x=!0,S=e}finally{try{!_&&E.return&&E.return()}finally{if(x)throw S}}var k=y+1;w-r>h((c-o)/k)&&g("overflow"),o+=(w-r)*k,r=w;var A=!0,P=!1,I=void 0;try{for(var N,T=e[Symbol.iterator]();!(A=(N=T.next()).done);A=!0){var C=N.value;if(C<r&&++o>c&&g("overflow"),C==r){for(var D=o,F=36;;F+=36){var L=F<=i?1:F>=i+26?26:F-i;if(D<L)break;var $=D-L,R=36-L;t.push(v(m(L+$%R,0))),D=h($/R)}t.push(v(m(D,0))),i=b(o,k,y==d),o=0,++y}}}catch(e){P=!0,I=e}finally{try{!A&&T.return&&T.return()}finally{if(P)throw I}}++o,++r}return t.join("")}(e):e}))},_=function(e){return y(e,(function(e){return l.test(e)?function(e){var t,n=[],r=e.length,o=0,i=128,a=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var u=0;u<s;++u)e.charCodeAt(u)>=128&&g("not-basic"),n.push(e.charCodeAt(u));for(var l=s>0?s+1:0;l<r;){for(var f=o,p=1,d=36;;d+=36){l>=r&&g("invalid-input");var v=(t=e.charCodeAt(l++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(v>=36||v>h((c-o)/p))&&g("overflow"),o+=v*p;var y=d<=a?1:d>=a+26?26:d-a;if(v<y)break;var m=36-y;p>h(c/m)&&g("overflow"),p*=m}var w=n.length+1;a=b(o-f,w,0==f),h(o/w)>c-i&&g("overflow"),i+=h(o/w),o%=w,n.splice(o++,0,i)}return String.fromCodePoint.apply(String,n)}(e.slice(4).toLowerCase()):e}))},x={};function S(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function j(e){for(var t="",n=0,r=e.length;n<r;){var o=parseInt(e.substr(n+1,2),16);if(o<128)t+=String.fromCharCode(o),n+=3;else if(o>=194&&o<224){if(r-n>=6){var i=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&o)<<6|63&i)}else t+=e.substr(n,6);n+=6}else if(o>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function E(e,t){function n(e){var n=j(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,S).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,S).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,S).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,S).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,S).replace(t.PCT_ENCODED,o)),e}function O(e){return e.replace(/^0*(.*)/,"$1")||"0"}function k(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(O).join("."):e}function A(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),o=r[1],i=r[2];if(o){for(var a=o.toLowerCase().split("::").reverse(),s=u(a,2),c=s[0],l=s[1],f=l?l.split(":").map(O):[],p=c.split(":").map(O),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,v=p.length-h,g=Array(h),y=0;y<h;++y)g[y]=f[y]||p[v+y]||"";d&&(g[h-1]=k(g[h-1],t));var m=g.reduce((function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=g.slice(0,m.index),_=g.slice(m.index+m.length);b=w.join(":")+"::"+_.join(":")}else b=g.join(":");return i&&(b+="%"+i),b}return e}var P=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,I=void 0==="".match(/(){0}/)[1];function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?s:a;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(P);if(o){I?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||void 0,n.userinfo=-1!==e.indexOf("@")?o[3]:void 0,n.host=-1!==e.indexOf("//")?o[4]:void 0,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:void 0,n.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),n.host&&(n.host=A(k(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var i=x[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||i&&i.unicodeSupport)E(n,r);else{if(n.host&&(t.domainHost||i&&i.domainHost))try{n.host=w(n.host.replace(r.PCT_ENCODED,j).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}E(n,a)}i&&i.parse&&i.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function T(e,t){var n=!1!==t.iri?s:a,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(A(k(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"==typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}var C=/^\.\.?\//,D=/^\/\.(\/|$)/,F=/^\/\.\.(\/|$)/,L=/^\/?(?:.|\n)*?(?=\/|$)/;function $(e){for(var t=[];e.length;)if(e.match(C))e=e.replace(C,"");else if(e.match(D))e=e.replace(D,"/");else if(e.match(F))e=e.replace(F,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(L);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?s:a,r=[],o=x[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?_(e.host):w(e.host.replace(n.PCT_ENCODED,j).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}E(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var i=T(e,t);if(void 0!==i&&("suffix"!==t.reference&&r.push("//"),r.push(i),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||o&&o.absolutePath||(u=$(u)),void 0===i&&(u=u.replace(/^\/\//,"/%2F")),r.push(u)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function U(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],o={};return r||(e=N(R(e,n),n),t=N(R(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=$(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=$(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=$(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=$(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function M(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:a.PCT_ENCODED,j)}var z={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},B={scheme:"https",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize},q={},W="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",V="[0-9A-Fa-f]",H=n(n("%[EFef][0-9A-Fa-f]%"+V+V+"%"+V+V)+"|"+n("%[89A-Fa-f][0-9A-Fa-f]%"+V+V)+"|"+n("%"+V+V)),J=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),K=new RegExp(W,"g"),G=new RegExp(H,"g"),Z=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',J),"g"),X=new RegExp(t("[^]",W,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Y=X;function Q(e){var t=j(e);return t.match(K)?t:e}var ee={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var o=!1,i={},a=n.query.split("&"),s=0,u=a.length;s<u;++s){var c=a[s].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)r.push(l[f]);break;case"subject":n.subject=M(c[1],t);break;case"body":n.body=M(c[1],t);break;default:o=!0,i[M(c[0],t)]=M(c[1],t)}}o&&(n.headers=i)}n.query=void 0;for(var d=0,h=r.length;d<h;++d){var v=r[d].split("@");if(v[0]=M(v[0]),t.unicodeSupport)v[1]=M(v[1],t).toLowerCase();else try{v[1]=w(M(v[1],t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}r[d]=v.join("@")}return n},serialize:function(e,t){var n,r=e,i=null!=(n=e.to)?n instanceof Array?n:"number"!=typeof n.length||n.split||n.setInterval||n.call?[n]:Array.prototype.slice.call(n):[];if(i){for(var a=0,s=i.length;a<s;++a){var u=String(i[a]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(G,Q).replace(G,o).replace(Z,S),f=u.slice(c+1);try{f=t.iri?_(f):w(M(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}i[a]=l+"@"+f}r.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==q[h]&&d.push(h.replace(G,Q).replace(G,o).replace(X,S)+"="+p[h].replace(G,Q).replace(G,o).replace(Y,S));return d.length&&(r.query=d.join("&")),r}},te=/^([^\:]+)\:(.*)/,ne={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(te),r=e;if(n){var o=t.scheme||r.scheme||"urn",i=n[1].toLowerCase(),a=n[2],s=o+":"+(t.nid||i),u=x[s];r.nid=i,r.nss=a,r.path=void 0,u&&(r=u.parse(r,t))}else r.error=r.error||"URN can not be parsed.";return r},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",r=e.nid,o=n+":"+(t.nid||r),i=x[o];i&&(e=i.serialize(e,t));var a=e,s=e.nss;return a.path=(r||t.nid)+":"+s,a}},re=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,oe={scheme:"urn:uuid",parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,t.tolerant||n.uuid&&n.uuid.match(re)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};x[z.scheme]=z,x[B.scheme]=B,x[ee.scheme]=ee,x[ne.scheme]=ne,x[oe.scheme]=oe,e.SCHEMES=x,e.pctEncChar=S,e.pctDecChars=j,e.parse=N,e.removeDotSegments=$,e.serialize=R,e.resolveComponents=U,e.resolve=function(e,t,n){var r=function(e,t){var n={scheme:"null"};if(t)for(var r in t)n[r]=t[r];return n}(0,n);return R(U(N(e,r),N(t,r),r,!0),r)},e.normalize=function(e,t){return"string"==typeof e?e=R(N(e,t),t):"object"===r(e)&&(e=N(R(e,t),t)),e},e.equal=function(e,t,n){return"string"==typeof e?e=R(N(e,n),n):"object"===r(e)&&(e=R(e,n)),"string"==typeof t?t=R(N(t,n),n):"object"===r(t)&&(t=R(t,n)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?s.ESCAPE:a.ESCAPE,S)},e.unescapeComponent=M,Object.defineProperty(e,"__esModule",{value:!0})},"object"===s(t)&&void 0!==e?a(t):(o=[t],void 0===(i="function"==typeof(r=a)?r.apply(t,o):r)||(e.exports=i))}]);class ht{constructor({langData:e}){this.langData=e}localeFromLangData(e){return this.langData["localization-strings"][e]}getLanguageFromCode(e){return this.localeFromLangData(e).languages[e]}getFieldNameFromPluginNameAndLocales({pluginName:e,locales:n,workI18n:r,targetLanguage:o,applicableFieldI18N:i,meta:a,metaApplicableField:s}){return r(["plugins",e,"fieldname"],t(t(t({},a),s),{},{applicableField:i,targetLanguage:o?this.getLanguageFromCode(o):""}),{throwOnExtraSuppliedFormatters:!1})}getLanguageInfo({$p:e}){const t=this.langData.languages,n=e=>!!t.some((({code:t})=>t===e))&&e,r=e.get("lang",!0),o=navigator.languages.filter(n),i=o.length?o:[n(navigator.language)||"en-US"];return{lang:[...(r||i[0]).split("."),...i],langs:t,languageParam:r,fallbackLanguages:i}}}const vt=function(e,t,n,r){let o;return n="string"==typeof n?[n]:n,e.some((e=>{const i=[...n];let a=t["localization-strings"][e];for(;a&&i.length;)a=a[i.shift()];return o=r||"string"==typeof a?a:void 0,o})),o},gt=async(e,t,n)=>{const r=new URL(n||window.location.href.replace(/(index\.html)?#.*$/,""));return r.search="",r.pathname=e,r.hash=t?"#/"+t:"",(await dt.resolveRefsAt(r.toString(),{loaderOptions:{processContent(e,t){t(void 0,JSON.parse(e.text||e.body.toString()))}}})).resolved},yt=function({field:e,schemaItems:t,metadataObj:n,getFieldAliasOrName:r,lang:o}){const i=t.findIndex((t=>t.title===e)),a=t[i],s=n.fields[e],u={aliases:null,fieldValueAliasMap:null,rawFieldValueAliasMap:null,fieldName:r(e),fieldSchema:a,fieldSchemaIndex:i,preferAlias:s.prefer_alias,lang:s.lang};let c=s&&s["fieldvalue-aliases"];return c&&(c.localeKey&&(c=vt(o,n,c.localeKey.split("/"),!0)),u.rawFieldValueAliasMap=JSON.parse(JSON.stringify(c)),u.aliases=[],a.enum&&a.enum.length?a.enum.forEach((t=>{u.aliases.push(vt(o,n,["fieldvalue",e,t],!0)),t in c&&"string"==typeof c[t]&&u.aliases.push(...c[t])})):Object.entries(c).forEach((([e,t])=>{Array.isArray(t)||(t=Object.values(t)),u.aliases.push(...t.filter((e=>t.every((t=>t===e||!t.toLowerCase().startsWith(e.toLowerCase()))))).map((t=>t+" ("+e+")")))})),u.fieldValueAliasMap=JSON.parse(JSON.stringify(c))),u},mt=function({metadataObj:e,schemaItems:t,getFieldAliasOrName:n,lang:r,callback:o}){e.table.browse_fields.forEach(((i,a)=>{"string"==typeof i&&(i={set:[i]}),i.name||(i.name=i.set.join(","));const s=i.name,u=i.set,{presort:c}=i,l=u.map((o=>yt({lang:r,field:o,schemaItems:t,metadataObj:e,getFieldAliasOrName:n})));o({setName:s,browseFields:l,i:a,presort:c})}))};class bt{constructor({metadataObj:e}){this.metadataObj=e}getFieldLang(e){const{metadataObj:t}=this,n=t&&t.fields;return n&&n[e]&&n[e].lang}getFieldMatchesLocale({namespace:e,preferredLocale:t,schemaItems:n,pluginsForWork:r}){const{metadataObj:o}=this;return i=>{const a=(({namespace:e,preferredLocale:t})=>{const n=localStorage.getItem(e+"-langCodes"),r=n&&JSON.parse(n)||[t],o=[];return r.forEach((e=>{const t=e.replace(/-.*$/,"");t===e?o.push(e):o.push(e,t)})),o})({namespace:e,preferredLocale:t});if(r.isPluginField({namespace:e,field:i})){let[,,n]=r.getPluginFieldParts({namespace:e,field:i});return"{locale}"===n&&(n=t),!n||a.includes(n)}const s=this.getFieldLang(i),u=o&&o["localization-strings"];return u&&Object.keys(u).some((e=>{const t=u[e]&&u[e].fieldvalue;return t&&t[i]}))||s&&a.includes(s)||n.some((e=>e.title===i&&"string"!==e.type))}}}const wt=e=>e.replace(/\^/g,"^^").replace(/-/g,"^0"),_t=e=>e?e.replace(/(\^+)0/g,((e,t)=>t.length%2?t.slice(1)+"-":e)).replace(/\^\^/g,"^"):e;class xt{constructor({pluginsInWork:e,pluginFieldMappings:t,pluginObjects:n}){this.pluginsInWork=e,this.pluginFieldMappings=t,this.pluginObjects=n}getPluginObject(e){const t=this.pluginsInWork.findIndex((([t])=>t===e));return this.pluginObjects[t]}iterateMappings(e){this.pluginFieldMappings.forEach((({placement:t,"applicable-fields":n},r)=>{const[o,{onByDefault:i,lang:a,meta:s}]=this.pluginsInWork[r],u=this.getPluginObject(o);e({plugin:u,placement:t,applicableFields:n,pluginName:o,pluginLang:a,onByDefaultDefault:i,meta:s})}))}processTargetLanguages(e,t){return!!e&&(Object.entries(e).forEach((([e,{targetLanguage:n,onByDefault:r,meta:o}])=>{Array.isArray(n)?n.forEach((n=>{t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:o})})):t({applicableField:e,targetLanguage:n,onByDefault:r,metaApplicableField:o})})),!0)}isPluginField({namespace:e,field:t}){return t.startsWith(`${e}-plugin-`)}getPluginFieldParts({namespace:e,field:t}){let n,r,o;return(t=t.replace(`${e}-plugin-`,"")).includes("-")?[n,r,o]=t.split("-"):n=t,[n,r,o].map(_t)}}const St=function(e,t,n){const r=(e.baseDirectory||"")+(t.baseDirectory||"")+"/",o=(e.schemaBaseDirectory||"")+(t.schemaBaseDirectory||"")+"/",i=(e.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return{file:r+n.file.$ref,schemaFile:n.schemaFile?o+n.schemaFile:"",metadataFile:n.metadataFile?i+n.metadataFile:""}},jt=async function({lang:e,fallbackLanguages:t,work:n,files:r,allowPlugins:o,basePath:i,languages:a,preferredLocale:s}){const u=await h(r),c=u["localization-strings"],l=await ye({messageStyle:"plainNested",locales:e,defaultLocales:t,localeStringFinder({locales:e,defaultLocales:t}){const n=[...e,...t].find((e=>e in c));return{locale:n,strings:{head:{},body:c[n]}}}});let f;const p=u.groups.find((e=>(f=e.files.find((t=>n===l(["workNames",e.id,t.name]))),Boolean(f)))),d=u.groups.map((e=>({name:l(e.name.localeKey),workNames:e.files.map((t=>l(["workNames",e.id,t.name]))),shortcuts:e.files.map((e=>e.shortcut))}))),v=St(u,p,f),{file:g}=v;let{schemaFile:y,metadataFile:m}=v,b="",w="";y||(y=g,b="schema"),m||(m=g,w="metadata");let _,x,S,j,E=[];if(o){const e=u["plugin-field-mapping"][p.id][f.name];e&&(S=Object.keys(e),x=Object.entries(u.plugins).filter((([e])=>S.includes(e))),E=x.map((([t])=>e[t])),j=x.map((([,e])=>e.path)),_=x)}const O=await gt(m,w,i),k=function(t){const n=O.fields&&O.fields[t];let r,o;return n&&(o=n.alias),o?"string"==typeof o?r=o:(o=o.localeKey,r=vt(e,O,o.split("/"))):(r=n.name,"object"==typeof r&&(r=r.localeKey,r=vt(e,O,r.split("/")))),r},A=E,P="undefined"==typeof process?location.href.slice(0,location.href.lastIndexOf("/")+1):process.cwd()+"/",[I,N]=await Promise.all([gt(y,b,i),_?Promise.all(j.map((e=>import(P+e)))):null]),T=new xt({pluginsInWork:x,pluginFieldMappings:A,pluginObjects:N}),C=I.items.items,D=C.map((({title:e})=>({field:e,fieldAliasOrName:k(e)||e}))),F=new bt({metadataObj:O});if(a&&T){console.log("pluginsForWork",T);const{lang:e,namespace:t}=this;T.iterateMappings((({plugin:n,pluginName:r,pluginLang:o,onByDefaultDefault:i,placement:u,applicableFields:c,meta:f})=>{const p=({applicableField:n,targetLanguage:c,onByDefault:p,metaApplicableField:d}={})=>{const h=T.getPluginObject(r)||{},v=F.getFieldLang(n);h.getTargetLanguage&&(c=h.getTargetLanguage({applicableField:n,targetLanguage:c,pluginLang:o,applicableFieldLang:v}));const g=(({pluginName:e,applicableField:t,targetLanguage:n})=>wt(e)+(t?"-"+wt(t):"-")+(n?"-"+wt(n):""))({pluginName:r,applicableField:n,targetLanguage:c||o||v});"{locale}"===c&&(c=s);const y=vt(e,O,["fieldnames",n]),m=h.getFieldAliasOrName?h.getFieldAliasOrName({locales:e,workI18n:l,targetLanguage:c,applicableField:n,applicableFieldI18N:y,meta:f,metaApplicableField:d,targetLanguageI18N:a.getLanguageFromCode(c)}):a.getFieldNameFromPluginNameAndLocales({pluginName:r,locales:e,workI18n:l,targetLanguage:c,applicableFieldI18N:y,meta:f,metaApplicableField:d});D.splice("end"===u?Number.POSITIVE_INFINITY:u,0,{field:`${t}-plugin-${g}`,fieldAliasOrName:m,onByDefault:"boolean"==typeof p?p:i||!1,applicableField:n,metaApplicableField:d,fieldLang:c})};T.processTargetLanguages(c,p)||p()}))}return{fileData:f,workI18n:l,getFieldAliasOrName:k,metadataObj:O,schemaObj:I,schemaItems:C,fieldInfo:D,pluginsForWork:T,groupsToWorks:d,metadata:F}},Et=({r:e,logger:t})=>{e.addEventListener("updatefound",(t=>{console.log("update found",t);const n=e.installing;n.addEventListener("statechange",(async()=>{const{state:e}=n;switch(e){case"installing":console.log("Installing new worker");break;case"installed":console.log("Installation status",e),await pt.alert("\nA new version of this offlinable app has been downloaded.\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you should close this tab\nand any other old tabs for this site in order to be able to\nbegin using the new version.\n");break;case"redundant":console.log("Installation status",e),await pt.alert("\nThere was an error during installation (to allow offline/speeded\ncache use).\n\nIf you have work to complete in this tab, you can dismiss\nthis dialog now and continue working with the old version.\n\nHowever, when you are finished, you may wish to close this tab\nand any other old tabs for this site in order to try again\nfor offline installation.\n");break;case"activating":console.log("Activating new worker");break;case"activated":console.log("Activated new worker");break;default:throw new Error(`Unknown worker update state: ${e}`)}}))}))},Ot=async({r:e,logger:t})=>new Promise((async(n,r)=>{navigator.serviceWorker.addEventListener("message",(({data:n})=>{const{message:r,type:o,name:i,errorType:a}=n;switch(console.log("msg1",r,e),o){case"log":return void t.addLogEntry({text:r});case"beginInstall":return void t.addLogEntry({text:"Install: Begun..."});case"finishedInstall":return void t.addLogEntry({text:"Install: Finished..."});case"beginActivate":return t.addLogEntry({text:"Activate: Caching finished"}),void t.addLogEntry({text:"Activate: Begin database resources storage..."});case"finishedActivate":return t.addLogEntry({text:"Activate: Finished..."}),void location.reload();case"error":t.addLogEntry({text:r+("dbError"===a?`Database error ${i}`:"")+"; trying again..."});break;default:console.error("Unexpected type",o)}}));const o=e.installing||e.waiting||e.active;o&&"redundant"===o.state?(await pt.alert('\nThere was likely an error installing. Click "ok" to try again.\n(Error code: Service worker is redundant)\n'),location.reload()):e.installing?console.log("INSTALLING"):e.waiting&&await pt.alert("\nAn update is in progress. After finishing any work\nyou have in them, please close this and any other existing tabs\nrunning this web application and then open the site again.\nPlease note it may take some time to install and may not show\nany indication it is installing.\n",{ok:!1})})),kt=e=>e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):"";var At={main({langs:e,languages:t,followParams:n,$p:r}){nt("form",{class:"focus",id:"languageSelectionContainer",$on:{submit(e){e.preventDefault()}}},[["select",{name:"lang",size:e.length,$on:{click({target:{parentNode:{selectedOptions:e}}}){n("#languageSelectionContainer",(()=>{r.set("lang",e[0].value,!0)}))}}},e.map((({code:e})=>["option",{value:e},[t.getLanguageFromCode(e)]]))]],Me("#main")),history.state&&"object"==typeof history.state&&Ne(document.querySelector("#languageSelectionContainer"),history.state)}};const Pt=["aqua","black","blue","fuchsia","gray","green","lime","maroon","navy","olive","purple","red","silver","teal","white","yellow"],It=["Helvetica, sans-serif","Verdana, sans-serif","Gill Sans, sans-serif","Avantgarde, sans-serif","Helvetica Narrow, sans-serif","sans-serif","Times, serif","Times New Roman, serif","Palatino, serif","Bookman, serif","New Century Schoolbook, serif","serif","Andale Mono, monospace","Courier New, monospace","Courier, monospace","Lucidatypewriter, monospace","Fixed, monospace","monospace","Comic Sans, Comic Sans MS, cursive","Zapf Chancery, cursive","Coronetscript, cursive","Florence, cursive","Parkavenue, cursive","cursive","Impact, fantasy","Arnoldboecklin, fantasy","Oldtown, fantasy","Blippo, fantasy","Brushstroke, fantasy","fantasy"],Nt=at.repeat(2),Tt=at.repeat(3),Ct=()=>({form:Me("form#browse"),random:Me("#rand")||{},checkboxes:ze("input[type=checkbox]")});var Dt={bdo:({fallbackDirection:e,message:t})=>["div",{style:"display: inline; direction: "+e},[t]],columnsTable:({lDirectional:e,fieldInfo:t,$p:n,lElement:r,lIndexedParam:o,l:i,metadataObj:a,preferredLocale:s,schemaItems:u,fieldMatchesLocale:c})=>["table",{border:"1",cellpadding:"5",align:"center"},[["tr",[["th",[e("fieldno")]],["th",{align:"left",width:"20"},[e("field_enabled")]],["th",[e("field_title")]],["th",[e("fieldinterlin")]],["th",[e("fieldcss")]]]],...t.map(((e,a)=>{const s=a+1,u="checked"+s,c="field"+s,l=n.get(c);return["tr",[["td",[String(s)]],r("check-columns-to-browse","td","title",{},[r("yes","input","value",{class:"fieldSelector",id:u,name:o("checked")+s,checked:n.get(u)!==i("no")&&(n.has(u)||!1!==e.onByDefault),type:"checkbox"})]),r("check-sequence","td","title",{},[["select",{name:o("field")+s,id:c,size:"1"},t.map((({field:e,fieldAliasOrName:t},r)=>["option",{dataset:{name:e},value:t,selected:l&&l===t||r===a&&!n.has(c)},[t]]))]]),["td",[r("interlinear-tips","input","title",{name:o("interlin")+s,value:n.get("interlin"+s)})]],["td",[["input",{name:o("css")+s,value:n.get("css"+s)}]]]]]})),["tr",[["td",{colspan:3},[r("check_all","input","value",{type:"button",$on:{click(){ze(".fieldSelector").forEach((e=>{e.checked=!0}))}}}),r("uncheck_all","input","value",{type:"button",$on:{click(){ze(".fieldSelector").forEach((e=>{e.checked=!1}))}}}),r("checkmark_locale_fields_only","input","value",{type:"button",$on:{click(){t.forEach((({field:e},t)=>{const n=t+1,r=Me("#field"+n).selectedOptions[0].dataset.name;Me("#checked"+n).checked=c(r)}))}}})]]]]]],advancedFormatting:({lDirectional:e,lParam:t,l:n,lOption:r,lElement:o,$p:i,hideFormattingSection:a})=>["td",{id:"advancedformatting",style:{display:a?"none":"block"}},[["h3",[e("advancedformatting")]],["label",[e("textcolor"),Nt,["select",{name:t("colorName")},Pt.map(((e,t)=>{const o={value:n(["param_values","colors",e]),selected:null};return(i.get("colorName")===n(["param_values","colors",e])||1===t&&!i.has("colorName"))&&(o.selected="selected"),r(["param_values","colors",e],o)}))]]],["label",[at,e("or_entercolor"),Nt,["input",{name:t("color"),type:"text",value:i.get("color")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("backgroundcolor"),Nt,["select",{name:t("bgcolorName")},Pt.map(((e,t)=>{const o={value:n(["param_values","colors",e]),selected:null};return(i.get("bgcolorName")===n(["param_values","colors",e])||14===t&&!i.has("bgcolorName"))&&(o.selected="selected"),r(["param_values","colors",e],o)}))]]],["label",[at,e("or_entercolor"),Nt,["input",{name:t("bgcolor"),type:"text",value:i.get("bgcolor")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("text_font"),Nt,["select",{name:t("fontSeq"),dir:"ltr"},It.map(((e,t)=>{const n={value:e,selected:null};return(i.get("fontSeq")===e||7===t&&!i.has("fontSeq"))&&(n.selected="selected"),["option",n,[e]]}))]]],["br"],["br"],["label",[e("font_style"),Nt,["select",{name:t("fontstyle")},["italic","normal","oblique"].map(((e,t)=>{const o={value:n(["param_values","fontstyle",e]),selected:null};return(i.get("fontstyle")===n(["param_values","fontstyle",e])||1===t&&!i.has("fontstyle"))&&(o.selected="selected"),r(["param_values","fontstyle",e],o)}))]]],["br"],["div",[e("font_variant"),Tt,["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","normal"]),checked:i.get("fontvariant")!==e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","normal"]),at]],["label",[["input",{name:t("fontvariant"),type:"radio",value:n(["param_values","fontvariant","small-caps"]),checked:i.get("fontvariant")===e(["param_values","fontvariant","small-caps"])}],e(["param_values","fontvariant","small-caps"]),at]]]],["br"],["label",[e("font_weight")," (normal, bold, 100-900, etc.):",Nt,["input",{name:t("fontweight"),type:"text",value:i.has("fontweight")?i.get("fontweight"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("font_size")," (14pt, 14px, small, 75%, etc.):",Nt,["input",{name:t("fontsize"),type:"text",value:i.get("fontsize"),size:"7",maxlength:"12"}]]],["br"],["label",{dir:"ltr"},[e("font_stretch"),at,["select",{name:t("fontstretch")},["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"].map((t=>{const n={value:e(["param_values","font-stretch",t]),selected:null};return(i.get("fontstretch")===t||!i.has("fontstretch")&&"normal"===t)&&(n.selected="selected"),["option",n,[e(["param_values","font-stretch",t])]]}))]]],["br"],["br"],["label",[e("letter_spacing")," (normal, .9em, -.05cm): ",["input",{name:t("letterspacing"),type:"text",value:i.has("letterspacing")?i.get("letterspacing"):"normal",size:"7",maxlength:"12"}]]],["br"],["label",[e("line_height")," (normal, 1.5, 22px, 150%): ",["input",{name:t("lineheight"),type:"text",value:i.has("lineheight")?i.get("lineheight"):"normal",size:"7",maxlength:"12"}]]],["br"],["br"],o("tableformatting_tips","h3","title",{},[e("tableformatting")]),["div",[e("header_wstyles"),Nt,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("header"),type:"radio",value:r,checked:i.get("header")===r||!i.has("header")&&1===o}],e(n),o===a.length-1?"":Tt]]))]],["div",[e("footer_wstyles"),Nt,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("footer"),type:"radio",value:r,checked:i.get("footer")===r||!i.has("footer")&&2===o}],e(n),o===a.length-1?"":Tt]]))]],["label",[["input",{name:t("headerfooterfixed"),type:"checkbox",value:n("yes"),checked:i.get("headerfooterfixed")===n("yes")}],Nt,e("headerfooterfixed-wishtoscroll")]],["br"],["div",[e("caption_wstyles"),Nt,...[["yes",e(["param_values","y"])],["no",e(["param_values","n"])],["none",e(["param_values","0"])]].map((([n,r],o,a)=>["label",[["input",{name:t("caption"),type:"radio",value:r,checked:i.get("caption")===r||!i.has("caption")&&2===o}],e(n),o===a.length-1?"":Tt]]))]],["br"],["div",[e("table_wborder"),Nt,["label",[["input",{name:t("border"),type:"radio",value:"1",checked:"0"!==i.get("border")}],e("yes"),Tt]],["label",[["input",{name:t("border"),type:"radio",value:"0",checked:"0"===i.get("border")}],e("no")]]]],["div",[e("interlin_repeat_field_names"),Nt,["label",[["input",{name:t("interlintitle"),type:"radio",value:"1",checked:"0"!==i.get("interlintitle")}],e("yes"),Tt]],["label",[["input",{name:t("interlintitle"),type:"radio",value:"0",checked:"0"===i.get("interlintitle")}],e("no")]]]],["label",[e("interlintitle_css"),Nt,["input",{name:t("interlintitle_css"),type:"text",value:i.get("interlintitle_css")||"",size:"12"}]]],["br"],["br"],o("pageformatting_tips","h3","title",{},[e("pageformatting")]),["label",[e("page_css"),Nt,["textarea",{name:t("pagecss"),title:n("page_css_tips"),value:i.get("pagecss")}]]],["br"],o("outputmode_tips","label","title",{},[e("outputmode"),Nt,["select",{name:t("outputmode")},["table","div"].map((e=>{const t={value:e,selected:null};return i.get("outputmode")===e&&(t.selected="selected"),r(["param_values","outputmode",e],t)}))]])]],addRandomFormFields({lParam:e,lDirectional:n,l:r,lElement:o,$p:i,serializeParamsAsURL:a,content:s}){[[["td",{colspan:12,align:"center"},[["br"],n("or"),["br"],["br"]]]],[["td",{colspan:12,align:"center"},[["label",[n("rnd"),Tt,["input",{id:"rand",name:e("rand"),type:"checkbox",value:r("yes"),checked:i.get("rand")===r("yes")}]]],Tt,["label",[n("verses-context"),at,["input",{name:e("context"),type:"number",min:1,size:4,value:i.get("context")}]]],Tt,o("view-random-URL","input","value",{type:"button",$on:{click(){const e=a(t(t({},Ct()),{},{type:"randomResult"}));Me("#randomURL").value=e}}}),["input",{id:"randomURL",type:"text"}]]]]].forEach((e=>{e&&e.length&&s.push(["tr",e])}))},getPreferences:({languageParam:e,workI18n:t,paramsSetter:n,replaceHash:r,getFieldAliasOrNames:o,work:i,langs:a,languageI18n:s,l:u,localizeParamNames:c,namespace:l,hideFormattingSection:f,groups:p,preferencesPlugin:d})=>["div",{style:{textAlign:"left"},id:"preferences",hidden:"true"},[["div",{style:"margin-top: 10px;"},[["label",[u("localizeParamNames"),["input",{id:"localizeParamNames",type:"checkbox",checked:c,$on:{change({target:{checked:e}}){localStorage.setItem(l+"-localizeParamNames",e)}}}]]]]],["div",[["label",[u("Hide formatting section"),["input",{id:"hideFormattingSection",type:"checkbox",checked:f,$on:{change({target:{checked:e}}){Me("#advancedformatting").style.display=e?"none":"block",localStorage.setItem(l+"-hideFormattingSection",e)}}}]]]]],["div",[["label",{for:"prefLangs"},[u("Preferred language(s)")]],["br"],["select",{id:"prefLangs",multiple:"multiple",size:a.length,$on:{change({target:{selectedOptions:e}}){localStorage.setItem(l+"-langCodes",JSON.stringify([...e].map((e=>e.value))))}}},a.map((e=>{let t=localStorage.getItem(l+"-langCodes");t=t&&JSON.parse(t);const n={value:e.code,selected:null};return t&&t.includes(e.code)&&(n.selected="selected"),["option",n,[s(e.code)]]}))]]],d?d({$:Me,l:u,jml:nt,paramsSetter:n,getDataForSerializingParamsAsURL:Ct,work:i,replaceHash:r,getFieldAliasOrNames:o}):""]],addBrowseFields({browseFields:e,fieldInfo:t,lDirectional:n,i:r,lIndexedParam:o,$p:i,content:a}){const s=i.get("work");[r>0?[["td",{colspan:12,align:"center"},[["br"],n("or"),["br"],["br"]]]]:"",[...(()=>{const t=t=>e.reduce(((e,{fieldName:n,aliases:a,fieldSchema:{minimum:u,maximum:c}},l)=>{const f=s+"-"+o(t)+(r+1)+"-"+(l+1),p=f;return e["#"].push(["td",[["label",{for:f},[n]]]],["td",[a?["datalist",{id:"dl-"+p},a.map((e=>["option",[e]]))]:"",a?["input",{name:f,id:p,class:"browseField",list:"dl-"+p,value:i.get(f,!0),$on:"start"===t?{change(e){ze("input.browseField").forEach((t=>{t.id.includes(r+1+"-"+(l+1))&&(t.value=e.target.value)}))}}:void 0}]:["input",{name:f,id:p,type:"number",min:u,max:c,value:i.get(f,!0)}],Tt]]),e}),{"#":[]});return[t("start"),["td",[["b",[n("to")]],Tt]],t("end")]})(),["td",[e.length>1?n("versesendingdataoptional"):""]]],[["td",{colspan:4*e.length+2+1,align:"center"},[["table",[["tr",[e.reduce(((e,{fieldName:t,aliases:n,fieldSchema:{minimum:a,maximum:u}},c)=>{const l=s+"-"+o("anchor")+(r+1)+"-"+(c+1),f=l;return e["#"].push(["td",[["label",{for:l},[t]]]],["td",[n?["datalist",{id:"dl-"+f},n.map((e=>["option",[e]]))]:"",n?["input",{name:l,id:f,class:"browseField",list:"dl-"+f,value:i.get(l,!0)}]:["input",{name:l,id:f,type:"number",min:a,max:u,value:i.get(l,!0)}],Nt]]),e}),{"#":[["td",{style:"font-weight: bold; vertical-align: bottom;"},[n("anchored-at")+Tt]]]}),["td",[["label",[n("field")+Nt,["select",{name:o("anchorfield")+(r+1),size:"1"},t.map((({fieldAliasOrName:e})=>i.get(o("anchorfield")+(r+1),!0)===e?["option",{selected:!0},[e]]:["option",[e]]))]]]]]]]]]]]]].forEach((e=>{e&&e.length&&a.push(["tr",e])}))},main({workI18n:e,languageParam:n,l:r,namespace:o,heading:i,fallbackDirection:a,languageI18n:s,langs:u,fieldInfo:c,localizeParamNames:l,serializeParamsAsURL:f,paramsSetter:p,replaceHash:d,getFieldAliasOrNames:h,hideFormattingSection:v,$p:g,metadataObj:y,lParam:m,lElement:b,lDirectional:w,lIndexedParam:_,fieldMatchesLocale:x,preferredLocale:S,schemaItems:j,content:E,groups:O,preferencesPlugin:k}){const A=g.get("work"),P=({type:e})=>f(t(t({},Ct()),{},{type:e}));nt("div",{class:"focus"},[["div",{style:"float: left;"},[["button",{$on:{click(){const e=Me("#preferences");e.hidden=!e.hidden}}},[r("Preferences")]],Lt.workDisplay.getPreferences({languageParam:n,workI18n:e,paramsSetter:p,replaceHash:d,getFieldAliasOrNames:h,work:A,langs:u,languageI18n:s,l:r,localizeParamNames:l,namespace:o,groups:O,hideFormattingSection:v,preferencesPlugin:k})]],["h2",[i]],["br"],["form",{id:"browse",$custom:{$submit(){const e=P({type:"saveSettings"}).replace(/^[^#]*#/,"");console.log("history thisParams",e),history.replaceState(e,document.title,location.href);const t=P({type:"result"});location.href=t}},$on:{keydown({key:e,target:t}){"Enter"===e&&"textarea"!==t.localName.toLowerCase()&&this.$submit()},submit(e){e.preventDefault(),this.$submit()}},name:m("browse")},[["table",{align:"center"},E],["br"],["div",{style:"margin-left: 20px"},[["br"],["br"],["table",{border:"1",align:"center",cellpadding:"5"},[["tr",{valign:"top"},[["td",[Lt.workDisplay.columnsTable({lDirectional:w,fieldInfo:c,$p:g,lElement:b,lIndexedParam:_,l:r,metadataObj:y,preferredLocale:S,schemaItems:j,fieldMatchesLocale:x}),b("save-settings-URL","input","value",{type:"button",$on:{click(){const e=P({type:"saveSettings"});Me("#settings-URL").value=e}}}),["input",{id:"settings-URL"}],["br"],["button",{$on:{async click(e){e.preventDefault();const n=p(t(t({},Ct()),{},{workName:A,type:"startEndResult"})),r=d(n)+`&work=${A}&${A}-startEnd1=%s`;try{await navigator.clipboard.writeText(r)}catch(e){}}}},[r("Copy_shortcut_URL")]]]],Lt.workDisplay.advancedFormatting({lDirectional:w,lParam:m,l:r,lOption:(e,t)=>["option",t,[r(e)]],lElement:b,$p:g,hideFormattingSection:v})]]]]]],["p",{align:"center"},[b("submitgo","input","value",{type:"submit"})]]]]],Me("#main"))}},Ft={caption:({heading:e,ranges:t})=>e+" "+t,startSeparator:({l:e})=>e("colon"),innerBrowseFieldSeparator:({l:e})=>e("comma-space"),ranges:({l:e,startRange:t,endVals:n,rangeNames:r})=>t+"-"+n.join(Lt.resultsDisplayServerOrClient.startSeparator({l:e}))+" ("+r+")",fieldValueAlias:({key:e,value:t})=>t+" ("+e+")",interlinearSegment:({lang:e,dir:t,html:n})=>`<span${e?` lang="${e}"`:""}${t?` dir="${t}"`:""}>${n}</span>`,interlinearTitle:({l:e,val:t})=>`<span class="interlintitle">${t}</span>${e("colon-space")}`,styles({$p:e,$pRaw:t,$pRawEsc:n,$pEscArbitrary:r,escapeQuotedCSS:o,escapeCSS:i,tableWithFixedHeaderAndFooter:a,checkedFieldIndexes:s,hasCaption:u}){const c=e.has("color",!0)&&"#"!==e.get("color",!0)?r("color"):n("colorName"),l=e.has("bgcolor",!0)&&"#"!==e.get("bgcolor",!0)?r("bgcolor"):n("bgcolorName"),f=1+(0+(u?2:0)),p=f+1+"em",d=`100% - ${p} - 2em - 0.5em`;return["style",[(a?`\nhtml, body, #main, #main > div {\n height: 100%; /* Needed to ensure descendent heights retain 100%; could be avoided if didn't want percent on table height */\n overflow-y: hidden; /* Not sure why we're getting extra here, but... */\n}\n.anchor-table-header {\n background-color: ${l||"white"}; /* Header background (not just for div text inside header, but for whole header area) */\n overflow-x: hidden; /* Not sure why we're getting extra here, but... */\n position: relative; /* Ensures we are still flowing, but provides anchor for absolutely positioned thead below (absolute positioning positions relative to nearest non-static ancestor; clear demo at https://www.w3schools.com/cssref/playit.asp?filename=playcss_position&preval=fixed ) */\n padding-top: ${p}; /* Provides space for the header (and caption) (the one that is absolutely positioned below relative to here) */\n height: 100%; /* Percent of the whole screen taken by the table */\n}\n.anchor-table-body {\n overflow-y: auto; /* Provides scrollbars when text fills up beyond the height */\n height: ${`calc(${d})`}; /* If < 100%, the header anchor background color will seep below table */\n}\n\n.caption, .thead .th, .tfoot .th {\n line-height: 0; /* th div will have own line-height; reducing here avoids fattening it by an inner div */\n color: transparent; /* Hides the non-div duplicated header text */\n white-space: nowrap; /* Ensures column header text uses up full width without overlap (esp. wrap no longer seems to work); this must be applied outside of the div */\n border: none; /* We don't want a border for this invisible section */\n}\ndiv.inner-caption, .thead .th div.th-inner, .tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n position: absolute; /* Puts relative to nearest non-static ancestor (our relative header anchor) */\n color: initial; /* Header must have an explicit color or it will get transparent container color */\n line-height: normal; /* Revert ancestor line height of 0 */\n}\n.thead .th div.th-inner {\n top: ${f}em; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\ndiv.inner-caption {\n top: 1em;\n}\n.tfoot .th div.th-inner { /* divs are used as th is supposedly problematic */\n top: ${`calc(${d} + 0.5em)`}; /* Ensures our header stays fixed at top outside of normal flow of table */\n}\n.zupa div.zupa1 {\n margin: 0 auto !important;\n width: 0 !important;\n}\n.zupa div.th-inner, .zupa div.inner-caption {\n width: 100%;\n margin-left: -50%;\n text-align: center;\n}\n`:"")+("y"===t("caption")?a?".caption div.inner-caption, ":".caption, ":"")+("y"===t("header")?a?"":".thead .th, ":"")+("y"===t("footer")?a?"":".tfoot .th, ":"")+".tbody td"+` {\n vertical-align: top;\n font-style: ${n("fontstyle")};\n font-variant: ${n("fontvariant")};\n font-weight: ${r("fontweight")};\n ${r("fontsize")?`font-size: ${r("fontsize")};`:""}\n font-family: ${r("fontSeq")};\n\n font-stretch: ${n("fontstretch")};\n letter-spacing: ${r("letterspacing")};\n line-height: ${r("lineheight")};\n ${c?`color: ${i(c)};`:""}\n ${l?`background-color: ${i(l)};`:""}\n}\n${i(r("pagecss")||"")}\n`+s.map(((e,n)=>("y"===t("header")?a?`.thead .th:nth-child(${n+1}) div.th-inner, `:`.thead .th:nth-child(${n+1}), `:"")+("y"===t("footer")?a?`.tfoot .th:nth-child(${n+1}) div.th-inner, `:`.tfoot .th:nth-child(${n+1}), `:"")+`.tbody td:nth-child(${n+1}) `+`{\n ${r("css"+(e+1))}\n}\n`)).join("")+(r("interlintitle_css")?`\n/* http://salzerdesign.com/test/fixedTable.html */\n.interlintitle {\n ${i(r("interlintitle_css"))}\n}\n`:"")+(l?`\nbody {\n background-color: ${l};\n}\n`:"")]]},main({tableData:e,$p:n,$pRaw:r,$pRawEsc:o,$pEscArbitrary:i,escapeQuotedCSS:a,escapeCSS:s,escapeHTML:u,l:c,localizedFieldNames:l,fieldLangs:f,fieldDirs:p,caption:d,hasCaption:h,showInterlinTitles:v,determineEnd:g,getCanonicalID:y,canonicalBrowseFieldSetName:m,getCellValue:b,checkedAndInterlinearFieldInfo:w,interlinearSeparator:_="<br /><br />"}){const x={table:[["table",{class:"table",border:r("border")||"0"}],["tr",{class:"tr"}],["td"],["th",{class:"th"}],["caption",{class:"caption"}],["thead",{class:"thead"}],["tbody",{class:"tbody"}],["tfoot",{class:"tfoot"}]],div:[["div",{class:"table",style:"display: table;"}],["div",{class:"tr",style:"display: table-row;"}],["div",{class:"td",style:"display: table-cell;"}],["div",{class:"th",style:"display: table-cell;"}],["div",{class:"caption",style:"display: table-caption;"}],["div",{class:"thead",style:"display: table-header-group;"}],["div",{class:"tbody",style:"display: table-row-group;"}],["div",{class:"tfoot",style:"display: table-footer-group;"}]],"json-array":"json","json-object":"json"},S=n.get("outputmode",!0);switch(S){case"json-object":case"json-array":throw new Error("JSON object support is currently not available")}const j=x[Object.prototype.hasOwnProperty.call(x,S)?S:"table"],[E,O,k,A,P,I,N,T]=j,[C,D,F]=w,L="yes"===r("headerfooterfixed"),$=(e,t)=>((e=JSON.parse(JSON.stringify(e))).push(t),e),R=([e,n],r)=>[e,t(t({},n),r)],U={start:!1,end:!1},M=[],{showEmptyInterlinear:z,showTitleOnSingleInterlinear:B}=this,q=(e,t)=>{if(!z&&(t||([...(e=(new DOMParser).parseFromString(e,"text/html").body).querySelectorAll("br")].forEach((e=>{e.remove()})),e=e.innerHTML),!e.trim()))return!0};return e.some(((e,t)=>{const n=g({tr:e,foundState:U});if("boolean"==typeof n)return n;const r=y({tr:e});return M.push($(R(O,{dataset:{row:n,"canonical-type":m,"canonical-id":r}}),D.map(((n,r)=>{const o=F[r],i=o,{tdVal:a,htmlEscaped:s}=b({tr:e,idx:n}),u=i&&o.map((t=>{const{tdVal:n,htmlEscaped:r}=b({tr:e,idx:t});console.log("showEmptyInterlinear",z,r);return q(n,r)?"":i?Lt.resultsDisplayServerOrClient.interlinearSegment({lang:f[t],dir:p[t],html:(v?Lt.resultsDisplayServerOrClient.interlinearTitle({l:c,val:l[t]}):"")+n}):n})).filter((e=>""!==e));return R(k,{id:"row"+(t+1)+"col"+(r+1),lang:f[n],dir:p[n],dataset:{col:l[n]},innerHTML:(i&&!q(a,s)&&(B||u.length)?Lt.resultsDisplayServerOrClient.interlinearSegment({lang:f[n],html:(v?Lt.resultsDisplayServerOrClient.interlinearTitle({l:c,val:l[n]}):"")+a}):a)+(o&&u.length?_+u.join(_):"")})})))),!1})),["div",[Lt.resultsDisplayServerOrClient.styles({$p:n,$pRaw:r,$pRawEsc:o,$pEscArbitrary:i,escapeQuotedCSS:a,escapeCSS:s,tableWithFixedHeaderAndFooter:L,checkedFieldIndexes:D,hasCaption:h}),(W=[$(E,[d?$(P,[d,L?["div",{class:"zupa1"},[["div",{class:"inner-caption"},[["span",[d]]]]]]:""]):"","0"!==r("header")?$(I,[$(O,C.map(((e,t)=>{const n=F[t];return e=u(e)+(n?c("comma-space")+n.map((e=>l[e])).join(c("comma-space")):""),$(A,[e,L?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",r("footer")&&"0"!==r("footer")?$(T,[$(O,C.map(((e,t)=>{const n=F[t];return e=u(e)+(n?c("comma-space")+n.map((e=>l[e])).join(c("comma-space")):""),$(A,[e,L?["div",{class:"zupa1"},[["div",{class:"th-inner"},[["span",[e]]]]]]:""])})))]):"",$(N,M)])],L?["div",{class:"table-responsive anchor-table-header zupa"},[["div",{class:"table-responsive anchor-table-body"},W]]]:["div",{class:"table-responsive"},W])]];var W}};const Lt={languageSelect:At,workSelect:({groups:e,workI18n:t,getNextAlias:n,$p:r,followParams:o})=>{const i=nt("form",{id:"workSelect",class:"focus",$on:{submit(e){e.preventDefault()}}},e.map(((e,i)=>["div",[i>0?["br","br","br"]:"",["div",[t(e.directions.localeKey)]],["br"],["select",{class:"file",name:"work"+i,dataset:{name:e.name.localeKey},$on:{change({target:{value:e}}){o("#workSelect",(()=>{r.set("work",e)}))}}},[["option",{value:""},["--"]],...e.files.map((({name:r})=>["option",{value:t(["workNames",e.id,r])},[n()]]))]]]])),Me("#main"));return history.state&&"object"==typeof history.state&&Ne(document.querySelector("#workSelect"),history.state),i},workDisplay:Dt,resultsDisplayServerOrClient:Ft,resultsDisplayClient:{anchorRowCol:({anchorRowCol:e})=>Me("#"+e),anchors:({escapedRow:e,escapedCol:t})=>Me('tr[data-row="'+e+'"]'+(t?'> td[data-col="'+t+'"]':"")),main(...e){let t;try{t=Lt.resultsDisplayServerOrClient.main(...e)}catch(e){"JSON support is currently not available"===e.message?pt.alert(e.message):console.error(e)}nt(...t,Me("#main"))}},defaultBody(){for(;it.hasChildNodes();)it.firstChild.remove();return nt("div",{id:"main",role:"main"},it)},permissions:{versionChange(){Me("#versionChange").showModal()},addLogEntry({text:e}){const t=Me("#installationLogContainer");try{t.showModal();Me("#dialogContainer").hidden=!1}catch(e){}Me("#installationLog").append(e+"\n")},exitDialogs(){const e=Me("#dialogContainer");e&&(e.hidden=!0)},dbError({type:e,escapedErrorMessage:t}){e&&nt("span",[e," ",t],Me("#dbError")),Me("#dbError").showModal()},errorRegistering(e){e&&nt("span",[e],Me("#errorRegistering")),Me("#errorRegistering").showModal()},browserNotGrantingPersistence(){Me("#browserNotGrantingPersistence").showModal()},main({siteI18n:e,ok:t,refuse:n,close:r,closeBrowserNotGranting:o}){const i=nt("dialog",{style:"text-align: center; height: 100%",id:"installationLogContainer",class:"focus"},[["p",[e("wait-installing")]],["div",{style:"height: 80%; overflow: auto;"},[["pre",{id:"installationLog"},[]]]]]);let a="";t&&(a=nt("dialog",{id:"willRequestStoragePermissions",$on:{close:r}},[["section",[e("will-request-storage-permissions")]],["br"],["div",{class:"focus"},[["button",{$on:{click:t}},[e("OK")]],["br"],["br"],["button",{$on:{click:n}},[e("refuse-request-storage-permissions")]]]]]));const s=nt("dialog",{id:"errorRegistering"},[["section",[e("errorRegistering")]]]);let u="";o&&(u=nt("dialog",{id:"browserNotGrantingPersistence"},[["section",[e("browser-not-granting-persistence")]],["br"],["div",{class:"focus"},[["button",{$on:{click:o}},[e("OK")]]]]]));const c=nt("dialog",{id:"versionChange"},[["section",[e("versionChange")]]]),l=nt("dialog",{id:"dbError"},[["section",[e("dbError")]]]);return nt("div",{id:"dialogContainer",style:"height: 100%"},[i,a,u,s,c,l],Me("#main")),[i,a,u,s,c,l]}}};function $t(e,t){if(t||!this.localizeParamNames)return e;const n=/\d+(-\d+)?$/,r=e.match(n);return r?this.l10n(["params","indexed",e.replace(n,"")])+r[0]:this.l10n(["params",e])}class Rt{constructor({l10n:e,params:t}={}){this.l10n=e,t||(t=location.hash.slice(1)),"string"==typeof t&&(t=new URLSearchParams(t)),this.params=t}get(e,t){return this.params.get($t.call(this,e,t))}getAll(e,t){return this.params.getAll($t.call(this,e,t))}has(e,t){return this.params.has($t.call(this,e,t))}delete(e,t){return this.params.delete($t.call(this,e,t))}set(e,t,n){return this.params.set($t.call(this,e,n),t)}append(e,t,n){return this.params.append($t.call(this,e,n),t)}toString(){return this.params.toString()}}const Ut=e=>location.href.replace(/#.*$/,"")+"#"+e.toString(),Mt=function({l:e,lParam:t,$p:n}){return function({form:r,random:o={checked:!1},checkboxes:i,type:a,fieldAliasOrNames:s=[],workName:u}){const c=new URLSearchParams(n.params),l=ke(r,{hash:!0,empty:!0});function f(){let e=1,t=1;for(;c.has(`${u}-start${e}-${t}`,!0);){for(;c.has(`${u}-start${e}-${t}`,!0);)c.delete(`${u}-start${e}-${t}`,!0),c.delete(`${u}-end${e}-${t}`,!0),c.delete(`${u}-anchor${e}-${t}`,!0),t++;t=1,e++}}switch(Object.keys(l).forEach((e=>{c.set(e,l[e])})),c.delete(t("rand")),c.set(t("rand"),o.checked?e("yes"):e("no")),i.forEach((t=>{c.delete(t.name),t.name&&c.set(t.name,t.checked?e("yes"):e("no"))})),a){case"saveSettings":c.delete(t("rand"));break;case"shortcutResult":{c.delete(t("rand"));let n=1;for(;c.has(`anchorfield${n}`,!0);)c.delete(`anchorfield${n}`,!0),n++;for(f(),n=1;c.has(`field${n}`,!0);)c.delete(`field${n}`,!0),c.delete(`checked${n}`,!0),c.delete(`interlin${n}`,!0),c.delete(`css${n}`,!0),n++;s.forEach(((t,n)=>{c.set(`field${n+1}`,t,!0),c.set(`checked${n+1}`,e("yes"),!0),c.set(`interlin${n+1}`,""),c.set(`css${n+1}`,"")})),c.delete("work",!0)}case"startEndResult":case"randomResult":case"result":"startEndResult"===a&&f(),("randomResult"===a||o.checked)&&(c.delete(t("rand")),c.set(t("rand"),e("yes"))),c.set(t("result"),e("yes"));break;default:console.error("Unexpected type",a)}return c}},zt=["workI18n","fileData","metadataObj"];var Bt,qt=Bt={_regexEscape:/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g,_regexParseLocale:/^([a-zA-Z]*)([_\-a-zA-Z]*)$/,_escapeRegExpPattern:function(e){return"string"!=typeof e?e:e.replace(Bt._regexEscape,"\\$1")},_toLowerCase:function(e,t){return"string"!=typeof e?t&&e:e.toLowerCase()},_toUpperCase:function(e,t){return"string"!=typeof e?t&&e:e.toUpperCase()},_trim:function(e,t,n){var r,o=[],i=function(e){o.push("^"+e+"+|"+e+"+$")};if("boolean"==typeof t&&(n=t,t=null),"string"!=typeof e)return n&&e;if(Array.isArray(t)&&t.map((function(e){var t=Bt._escapeRegExpPattern(e);i(t)})),"string"==typeof t){var a=Bt._escapeRegExpPattern(t);i(a)}t||i("\\s");var s="("+o.join("|")+")";for(r=new RegExp(s,"g");e.match(r);)e=e.replace(r,"");return e},_parseLocale:function(e){var t,n=Bt._regexParseLocale.exec(e);if(e&&n)return n[2]=Bt._trim(n[2],["-","_"]),{lang:Bt._toLowerCase(n[1]),countryCode:t=Bt._toUpperCase(n[2])||t}},isRtlLang:function(e){var t=Bt._parseLocale(e);if(t)return Bt._BIDI_RTL_LANGS.indexOf(t.lang)>=0},getLangDir:function(e){return Bt.isRtlLang(e)?"rtl":"ltr"}};Object.defineProperty(Bt,"_BIDI_RTL_LANGS",{value:["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],writable:!1,enumerable:!0,configurable:!1});var Wt={isRtlLang:qt.isRtlLang,getLangDir:qt.getLangDir};const{getLangDir:Vt}=Wt,Ht=/^.* \((.*?)\)$/,Jt=e=>"string"==typeof e?e.replace(Ht,"$1"):e,Kt=async function({l:e,lang:t,fallbackLanguages:n,locales:r,$p:o,skipIndexedDB:i,noIndexedDB:a,prefI18n:s,files:u,allowPlugins:c,langData:l,basePath:f="",dynamicBasePath:p=""}){const d=new ht({langData:l}),h=({schemaItems:e,fieldInfo:n,metadataObj:r,getFieldAliasOrName:o,usePreferAlias:i})=>n.map((({field:n,plugin:a})=>{if(a)return;const{preferAlias:s,fieldValueAliasMap:u}=yt({field:n,schemaItems:e,metadataObj:r,getFieldAliasOrName:o,lang:t});return i?u?(Object.entries(u).forEach((([e,t])=>{Array.isArray(t)?u[e]=t.map((t=>Lt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t}))):t&&"object"==typeof t?"string"==typeof s?u[e]=Lt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t[s]}):Object.entries(t).forEach((([t,n])=>{u[e][t]=Lt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:n})})):u[e]=Lt.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t})})),!1!==s?u:void 0):void 0:!1!==s?u:void 0})),v=(e,t)=>{let n;const i=o.get(e,!0);return function e(t){return Array.isArray(t)?t.some(e):Object.values(t).some(((r,o)=>"string"!=typeof r?e(r):r===i&&(n=Object.keys(t)[o],!0)))}(r),n||t||console.log("Bad param/value",e,"::",i),n},g=kt,{fileData:y,workI18n:m,getFieldAliasOrName:b,schemaObj:w,metadataObj:_,pluginsForWork:x}=await jt({files:u||this.files,allowPlugins:"boolean"==typeof c?c:this.allowPlugins,lang:t,fallbackLanguages:n,work:o.get("work"),basePath:f});console.log("pluginsForWork",x);const S=vt(t,_,"heading"),j=w.items.items,E=[],O=[],k=[];mt({metadataObj:_,schemaItems:j,getFieldAliasOrName:b,lang:t,callback({setName:e,browseFields:t,presort:n}){E.push(e),O.push(n),k.push(t)}});const A=j.map((({title:e,format:t})=>({field:e,fieldAliasOrName:b(e)||e,escapeColumn:"html"!==t,fieldLang:_.fields[e].lang}))),[P]=t,I=new bt({metadataObj:_});if(x){console.log("pluginsForWork",x);const{lang:e}=this;x.iterateMappings((({plugin:t,pluginName:n,pluginLang:r,onByDefaultDefault:o,placement:i,applicableFields:a,meta:s})=>{i="end"===i?Number.POSITIVE_INFINITY:i;const u=({applicableField:t,targetLanguage:a,onByDefault:u,metaApplicableField:c}={})=>{const l=x.getPluginObject(n)||{},f=I.getFieldLang(t);l.getTargetLanguage&&(a=l.getTargetLanguage({applicableField:t,targetLanguage:a,pluginLang:r,applicableFieldLang:f})),"{locale}"===a&&(a=P);const p=vt(e,_,["fieldnames",t]),h=l.getFieldAliasOrName?l.getFieldAliasOrName({locales:e,workI18n:m,targetLanguage:a,applicableField:t,applicableFieldI18N:p,meta:s,metaApplicableField:c,targetLanguageI18N:d.getLanguageFromCode(a)}):d.getFieldNameFromPluginNameAndLocales({pluginName:n,locales:e,workI18n:m,targetLanguage:a,applicableFieldI18N:p,meta:s,metaApplicableField:c});A.splice(i,0,{plugin:l,meta:s,placement:i,fieldAliasOrName:h,escapeColumn:!1!==l.escapeColumn,onByDefault:"boolean"==typeof u?u:o||!1,applicableField:t,metaApplicableField:c,fieldLang:a})};x.processTargetLanguages(a,u)||u()}))}const N=A.map((e=>e.fieldAliasOrName)),T=A.map((e=>e.escapeColumn)),C=A.map((({fieldLang:e})=>e!==P?e:null)),D=h({schemaItems:j,fieldInfo:A,metadataObj:_,getFieldAliasOrName:b,usePreferAlias:!1}),F=h({schemaItems:j,fieldInfo:A,metadataObj:_,getFieldAliasOrName:b,usePreferAlias:!0}),L=o.localizeParamNames=o.has("i18n",!0)?"1"===o.get("i18n",!0):"true"===s||"false"!==s&&this.localizeParamNames,$=L?t=>e(["params",t]):e=>e,R=L?t=>e(["params","indexed",t]):e=>e,U=L?(e,t="")=>o.get($(e)+t,!0):(e,t="")=>o.get(e+t,!0),M=L?(e,t="")=>o.get(o.get("work")+"-"+R(e)+t,!0):(e,t="")=>o.get(o.get("work")+"-"+e+t,!0),z=k.findIndex(((e,t)=>M("startEnd",t+1)));if(-1!==z){const e="-",t=":",n=(M("startEnd",z+1)||"").trim(),[r,i]=n.split(e);if(void 0!==i){const e=r.split(t),n=i.split(t),a=e.length-n.length;a>0?n.unshift(...e.slice(0,a)):a<0&&e.push(...Array.from({length:-a}).fill("1")),console.log("startPartVals",e),console.log("endPartVals",n),e.forEach(((e,t)=>{const r=n[t];o.set(`${o.get("work")}-start${z+1}-${t+1}`,e,!0),o.set(`${o.get("work")}-end${z+1}-${t+1}`,r,!0)}))}}const B=k.findIndex(((e,t)=>M("start",t+1+"-1"))),q=k[B],W=E[B],V=q.map((e=>e.fieldName)),H=k[0],J=E[0],K=H.map((e=>e.fieldName)),G=q.map((e=>e.fieldSchema.type)),Z=e=>V.map(((t,n)=>o.get(o.get("work")+"-"+e+(B+1)+"-"+(n+1),!0))),X=Z("start"),Y=Z("end"),[Q,ee]=(({starts:t,ends:n,applicableBrowseFieldNames:r,heading:o})=>{let i;const a="0"!==v("caption");if(a){const a=Lt.resultsDisplayServerOrClient.startSeparator({l:e}),s=Lt.resultsDisplayServerOrClient.innerBrowseFieldSeparator({l:e}),u=(()=>{const o=[],i=t.reduce(((e,t,r)=>{const i=e+t;return t===n[r]?i+(r>0?s:" "):(o.push(n[r]),i+a)}),"").slice(0,-a.length),u=r.join(s);return kt(Lt.resultsDisplayServerOrClient.ranges({l:e,startRange:i,endVals:o,rangeNames:u}))})();i=Lt.resultsDisplayServerOrClient.caption({heading:o,ranges:u})}return[a,i]})({starts:X,ends:Y,applicableBrowseFieldNames:V,heading:S}),te="1"===v("interlintitle");console.log("rand","yes"===U("rand"));const ne=(e,t)=>{let n;if(/^\d+$/.test(e)||Ht.test(e))n=Jt(e);else{const{rawFieldValueAliasMap:r}=q[t];let o;if(r){const t=Object.entries(r);Array.isArray(t[0][1])?t.some((([t,n])=>!!n.includes(e)&&(o=t,!0))):t.some((([t,n])=>!!Object.values(n).includes(e)&&(o=t,!0)))}n=void 0===o?e:o}return"integer"===G[t]?Number.parseInt(n):n},re=y.name,oe=X.map(ne),ie=Y.map(ne);let ae,se=!1;if(i||a){const e=O[B];if(this.noDynamic)({resolved:{data:ae}}=await dt.resolveRefs(y.file)),(({presort:e,tableData:t,applicableBrowseFieldNames:n,localizedFieldNames:r})=>{e&&t.sort(((e,t)=>{let o;return n.some((n=>{const i=r.indexOf(n),a=e[i]<t[i],s=e[i]>t[i];return o=s?1:-1,a||s})),o}))})({presort:e,tableData:ae,applicableBrowseFieldNames:V,localizedFieldNames:N});else{const e=`${p}textbrowser?${o.toString()}`;ae=await(await fetch(e)).json(),se=!0}}else ae=await new Promise(((e,t)=>{const n=this.namespace+"-textbrowser-cache-data";indexedDB.open(n).onsuccess=({target:{result:t}})=>{const n="files-to-cache-"+re;t.transaction(n).objectStore(n).index("browseFields-"+W).getAll(IDBKeyRange.bound(oe,ie)).onsuccess=({target:{result:t}})=>{const n=t.map((e=>e.value));e(n)}}}));!se&&x&&(A.forEach((({plugin:e,placement:t},n)=>{e&&ae.forEach(((e,n)=>{e.splice(t,0,null)}))})),A.forEach((({plugin:e,applicableField:t,fieldLang:n,meta:r,metaApplicableField:i},a)=>{if(!e)return;const s=A.findIndex((({field:e})=>e===t));ae.forEach(((u,c)=>{const l=u[s];u[a]=e.getCellData&&e.getCellData({tr:u,tableData:ae,i:c,j:a,applicableField:t,fieldInfo:A,applicableFieldIdx:s,applicableFieldText:l,fieldLang:n,getLangDir:Vt,meta:r,metaApplicableField:i,$p:o,thisObj:this})||l})),console.log("applicableFieldIdx",s)})));const ue=Vt(P),ce=C.map((e=>{if(!e)return null;const t=Vt(e);return t!==ue?t:null})),le={tableData:ae,$p:o,$pRaw:v,$pRawEsc:e=>kt(v(e)),$pEscArbitrary:e=>kt(o.get(e,!0)),escapeQuotedCSS:e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),escapeCSS:g,escapeHTML:kt,l:e,localizedFieldNames:N,fieldLangs:C,fieldDirs:ce,caption:ee,hasCaption:Q,showInterlinTitles:te,determineEnd:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,applicableBrowseFieldNames:r,startsRaw:o,endsRaw:i})=>({tr:a,foundState:s})=>{const u=[],c=r.map((r=>{const o=n.indexOf(r);return void 0!==e[o]&&null!==e[o]?u.push(t[o][a[o]]):u.push(a[o]),a[o]}));if(!s.start){if(o.some(((e,t)=>e!==c[t])))return!1;s.start=!0}if(i.every(((e,t)=>e===c[t])))s.end=!0;else if(s.end)return!0;return u.join("-")})({applicableBrowseFieldNames:V,fieldValueAliasMap:D,fieldValueAliasMapPreferred:F,localizedFieldNames:N,startsRaw:oe,endsRaw:ie}),canonicalBrowseFieldSetName:J,getCanonicalID:(({fieldValueAliasMap:e,fieldValueAliasMapPreferred:t,localizedFieldNames:n,canonicalBrowseFieldNames:r})=>({tr:o,foundState:i})=>r.map((r=>{const i=n.indexOf(r);return void 0!==e[i]&&null!==e[i]?t[i][o[i]]:o[i]})).join("-"))({canonicalBrowseFieldNames:K,fieldValueAliasMap:D,fieldValueAliasMapPreferred:F,localizedFieldNames:N}),getCellValue:(({fieldValueAliasMapPreferred:t,escapeColumnIndexes:n})=>({tr:r,idx:o})=>{let i=void 0!==t[o]?t[o][r[o]]:r[o];return i&&"object"==typeof i&&(i=Object.values(i)),Array.isArray(i)&&(i=i.join(e("comma-space"))),!n[o]&&this.trustFormatHTML||"string"!=typeof i?{tdVal:i}:{tdVal:kt(i),htmlEscaped:!0}})({fieldValueAliasMapPreferred:F,escapeColumnIndexes:T,escapeHTML:kt}),checkedAndInterlinearFieldInfo:(({localizedFieldNames:t})=>{let n,r,i=1,a=[];do{n=o.get("field"+i,!0),r=o.get("checked"+i,!0),i++,!n||r!==e("yes")&&null!==r||a.push(n)}while(n);a=a.filter((e=>t.includes(e)));const s=a.map((e=>t.indexOf(e))),u=s.map(((e,t)=>{const n=o.get("interlin"+(e+1),!0);return n&&n.split(/\s*,\s*/).map((e=>Number.parseInt(e)-1)).filter((e=>!Number.isNaN(e)))}));return[a,s,u]})({localizedFieldNames:N}),interlinearSeparator:this.interlinearSeparator};return{fieldInfo:A,$p:o,applicableBrowseFieldSet:q,fieldValueAliasMapPreferred:F,workI18n:m,lIndexedParam:R,lParamRaw:U,browseFieldSets:k,lang:t,metadataObj:_,fileData:y,templateArgs:le}};async function Gt(){try{Lt.permissions.addLogEntry({text:"Worker registration: Beginning..."});if(!await navigator.storage.persist())return void Lt.permissions.browserNotGrantingPersistence();await(async({serviceWorkerPath:e,logger:t})=>{let n;console.log("--ready to register service worker",e);try{n=await navigator.serviceWorker.register(e,{type:"module"})}catch(t){return console.log("serviceWorkerPath",e),void await pt.alert("\nThere was an error during registration (for offline ability).\nPlease refresh the page if you wish to reattempt.\n")}return t.addLogEntry({text:"Worker registration: Complete"}),Ot({r:n,logger:t})})({serviceWorkerPath:this.serviceWorkerPath,logger:Lt.permissions})}catch(e){if(console.log("err",e),e&&"object"==typeof e){const{errorType:t}=e;if("versionChange"===t)return void Lt.permissions.versionChange()}Lt.permissions.errorRegistering(kt(e&&e.message))}}async function Zt(e,t){return await new Promise(((e,n)=>{const[,r,o]=Lt.permissions.main({l:t,ok:async()=>{const e=await Notification.requestPermission();r.close(e)},refuse:()=>{r.close()},close:async()=>{try{if(!r.returnValue)return void function(){localStorage.setItem(this.namespace+"-refused","true")}()}catch(e){console.log("err",e),Lt.permissions.errorRegistering(kt(e&&e.message))}switch(r.returnValue){case"denied":case"default":return void e();case"granted":if(navigator.serviceWorker.controller)return void e();await Gt.call(this);break;default:console.error("Unexpected returnValue",r.returnValue)}},closeBrowserNotGranting:()=>{o.close()}});r.showModal()}))}class Xt{constructor(e){const t=new URL("node_modules/textbrowser/resources/index.js",location);this.site=e.site||"site.json";const n=e.stylesheets||["@builtin"],r=n.indexOf("@builtin");var o,i;-1!==r&&n.splice(r,1,new URL("index.css",t).href),this.stylesheets=n,i=e,(o=this).userJSON=i.userJSON||"resources/user.json",o.languages=i.languages||new URL("../appdata/languages.json",new URL("node_modules/textbrowser/resources/index.js",location)).href,o.serviceWorkerPath=i.serviceWorkerPath||`sw.js?pathToUserJSON=${encodeURIComponent(o.userJSON)}&stylesheets=${encodeURIComponent(JSON.stringify(o.stylesheets||[]))}`,o.files=i.files||"files.json",o.namespace=i.namespace||"textbrowser",this.allowPlugins=e.allowPlugins,this.dynamicBasePath=e.dynamicBasePath,this.trustFormatHTML=e.trustFormatHTML,this.requestPersistentStorage=e.requestPersistentStorage,this.localizeParamNames=void 0===e.localizeParamNames||e.localizeParamNames,this.hideFormattingSection=Boolean(e.hideFormattingSection),this.preferencesPlugin=e.preferencesPlugin,this.interlinearSeparator=e.interlinearSeparator,this.showEmptyInterlinear=e.showEmptyInterlinear,this.showTitleOnSingleInterlinear=e.showTitleOnSingleInterlinear,this.noDynamic=e.noDynamic,this.skipIndexedDB=e.skipIndexedDB}async init(){return this._stylesheetElements=await me(this.stylesheets),this.displayLanguages()}async displayLanguages(){try{const[e,t]=await h([this.languages,this.site]);this.langData=e,this.siteData=t;const n=this.paramChange();return window.addEventListener("hashchange",(()=>this.paramChange())),n}catch(e){console.log("err",e),pt.alert(e)}}getWorkData(e){try{return jt.call(this,t(t({},e),{},{files:this.files,allowPlugins:this.allowPlugins}))}catch(e){console.log("err",e),pt.alert("catch:"+e)}}getDirectionForLanguageCode(e){const t=this.langData.languages,n=t.find((t=>t.code===e));return n&&n.direction||t.find((t=>t.code.startsWith(e+"-")))}getFieldNameAndValueAliases(e){return yt(t(t({},e),{},{lang:this.lang}))}getBrowseFieldData(e){return mt(t(t({},e),{},{lang:this.lang}))}async paramChange(){Lt.defaultBody();const e=this.$p="string"==typeof history.state?new Rt({params:history.state}):new Rt,t=(t,n)=>{const r=document.querySelector(t),o=location.href.replace(/#.*$/,"")+"#"+e.toString();history.replaceState(ke(r,{hash:!0,empty:!0}),document.title,o),n(),location.hash="#"+e.toString()},n=new ht({langData:this.langData}),{lang:r,langs:o,languageParam:i,fallbackLanguages:a}=n.getLanguageInfo({$p:e});this.lang=r;const[s]=r,u=this.getDirectionForLanguageCode(s);document.documentElement.lang=s,document.dir=u;const c=this.siteData["localization-strings"],l=await ye({messageStyle:"plainNested",locales:r,defaultLocales:a,localeStringFinder({locales:e,defaultLocales:t}){const n=[...e,...t].find((e=>e in c));return{locale:n,strings:{head:{},body:c[n]}}}});document.title=l("browser-title");const f=localStorage.getItem(this.namespace+"-refused"),p=await navigator.storage.persisted(),d=await navigator.serviceWorker.getRegistration(this.serviceWorkerPath),v=e.get("result"),g=async()=>{if(v)return;!(f||navigator.serviceWorker.controller&&p)&&(p?(Lt.permissions.main({siteI18n:l}),await Gt.call(this)):await Zt.call(this,o,l),Lt.permissions.exitDialogs())};if(d){const e=d.installing||d.waiting||d.active;if(!e)return console.error("Unexpected error: worker registration received without a worker."),void await g();Lt.permissions.main({siteI18n:l});setInterval((()=>{d.update()}),36e5),console.log("worker.state",e.state);const t=async()=>{try{return Ot({r:d,langs:o,languages:this.languages,logger:Lt.permissions})}catch(e){return console.log("err",e),pt.alert("\n There was an unexpected error activating the new version;\n please save any unfinished work, close this tab, and try\n opening this site again.\n\n Please contact a service administrator if the problem\n persists (Error type: worker activation).\n ")}};switch(e.state){case"installing":t(),Et({r:d,logger:{addLogEntry(e){console.log(e)}}});break;case"installed":await t();break;case"activating":return await pt.alert("\n Please wait for a short while as we work to update to a new version.\n "),t(),void navigator.serviceWorker.onmessage({data:"finishActivate"});case"activated":Et({r:d,logger:{addLogEntry(e){console.log(e)}}});break;case"redundant":return void await t();default:console.log("Unexpected worker.state",e.state)}}else await g();if(Lt.permissions.exitDialogs(),!i)return document.title=l("languages-title"),void Lt.languageSelect.main({langs:o,languages:n,followParams:t,$p:e});const y=await async function({$p:e,lang:t,langs:n,langData:r,fallbackLanguages:o,basePath:i=""}){const a=await ye({messageStyle:"plainNested",locales:t,defaultLocales:o,localeResolver:(e,t)=>i+r.localeFileBasePath+n.find((e=>e.code===t)).locale.$ref});return e.l10n||(e.l10n=a),a}({$p:e,lang:r,langs:o,langData:this.langData,fallbackLanguages:a});if((()=>{this.l10n=y,e.l10n=y;return e.get("work")?!v&&(this.workDisplay({l:y,lang:r,preferredLocale:s,fallbackLanguages:a,languageParam:i,$p:e,languages:n,preferencesPlugin:this.preferencesPlugin}),!0):(async function({files:e,lang:t,fallbackLanguages:n,$p:r,followParams:o}){try{const i=await h(e),a=i["localization-strings"],s=await h(i.groups.reduce(((e,t)=>{const n=(i.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return t.files.reduce(((e,t)=>[...e,n+t.metadataFile]),e)}),[])),u=await ye({messageStyle:"plainNested",locales:t,defaultLocales:n,localeStringFinder({locales:e,defaultLocales:t}){const n=[...e,...t].find((e=>e in a));return{locale:n,strings:{head:{},body:a[n]}}}});document.title=u("browserfile-workselect");const c=s[Symbol.iterator](),l=()=>{const e=c.next().value;return vt(t,e,"alias")};Lt.workSelect({groups:i.groups,workI18n:u,getNextAlias:l,$p:r,followParams:o})}catch(e){console.log("Error",e),pt.alert(e)}}({files:this.files,lang:r,fallbackLanguages:a,$p:e,followParams:t}),!0)})())return;return await(async()=>{const t=f||!navigator.serviceWorker.controller;return await this.resultsDisplayClient({langData:this.langData,l:y,lang:r,fallbackLanguages:a,locales:y.strings,$p:e,basePath:"",noIndexedDB:t,dynamicBasePath:this.dynamicBasePath,files:this.files,allowPlugins:this.allowPlugins})})()}}Xt.prototype.workDisplay=async function({l:e,languageParam:n,lang:o,preferredLocale:i,languages:a,fallbackLanguages:s,$p:u}){const{preferencesPlugin:c}=this,l=this.langData.languages,f=this.getDirectionForLanguageCode(s[0]),p=localStorage.getItem(this.namespace+"-localizeParamNames"),d=u.localizeParamNames=u.has("i18n",!0)?"1"===u.get("i18n",!0):"true"===p||"false"!==p&&this.localizeParamNames,v=localStorage.getItem(this.namespace+"-hideFormattingSection"),g=u.has("formatting",!0)?"0"===u.get("formatting",!0):"true"===v||"false"!==v&&this.hideFormattingSection;try{const p=await this.getWorkData({lang:o,fallbackLanguages:s,preferredLocale:i,languages:a,work:u.get("work")}),{workI18n:v,fileData:y,metadataObj:m}=p,b=r(p,zt);document.title=v("browserfile-workdisplay",{work:y?vt(o,m,"alias"):""}),await async function({workI18n:t,metadataObj:r,getFieldAliasOrName:p,schemaObj:v,schemaItems:y,fieldInfo:m,metadata:b,pluginsForWork:w,groupsToWorks:_}){const x=d?t=>e(["params",t]):e=>e,S=d?t=>e(["params","indexed",t]):e=>e,j=(t,n)=>e(t,n),E=b.getFieldMatchesLocale({namespace:this.namespace,preferredLocale:i,schemaItems:y,pluginsForWork:w}),O=[];this.getBrowseFieldData({metadataObj:r,schemaItems:y,getFieldAliasOrName:p,callback({browseFields:e,i:t}){Lt.workDisplay.addBrowseFields({browseFields:e,fieldInfo:m,lDirectional:j,i:t,lIndexedParam:S,$p:u,content:O})}});const k=function(...e){const t=Mt(...e);return function(...e){const n=t(...e);return Ut(n)}}({l:e,lParam:x,$p:u}),A=Mt({l:e,lParam:x,$p:u}),{groups:P}=await h(this.files),I=vt(o,r,"heading"),N=(()=>{const e=Promise.all(_.map((async({name:e,workNames:t,shortcuts:n})=>({groupName:e,worksToFields:await Promise.all(t.map((async(e,t)=>({workName:e,shortcut:n[t],fieldAliasOrNames:(await this.getWorkData({lang:o,fallbackLanguages:s,preferredLocale:i,languages:a,work:e})).fieldInfo.map((({fieldAliasOrName:e})=>e))}))))}))));return async()=>e})(),T=new Intl.DisplayNames([...o,...s],{type:"language",languageDisplay:"standard"});Lt.workDisplay.main({languageParam:n,lang:o,workI18n:t,l:e,namespace:this.namespace,groups:P,heading:I,languageI18n:e=>T.of(e),fallbackDirection:f,langs:l,fieldInfo:m,localizeParamNames:d,serializeParamsAsURL:k,paramsSetter:A,replaceHash:Ut,getFieldAliasOrNames:N,hideFormattingSection:g,$p:u,metadataObj:r,lParam:x,lElement:(t,n,r,o,i=[])=>(o[r]=e(t),[n,o,i]),lDirectional:j,lIndexedParam:S,fieldMatchesLocale:E,preferredLocale:i,schemaItems:y,content:O,preferencesPlugin:c})}.call(this,t({workI18n:v,metadataObj:m},b))}catch(e){console.log("err",e),pt.alert(e)}},Xt.prototype.resultsDisplayClient=async function(e){const n=await navigator.storage.persisted(),r=this.skipIndexedDB||!n||!navigator.serviceWorker.controller,o=localStorage.getItem(this.namespace+"-localizeParamNames"),{fieldInfo:i,$p:a,browseFieldSets:s,applicableBrowseFieldSet:u,lang:c,metadataObj:l,fileData:f,fieldValueAliasMapPreferred:p,workI18n:d,lIndexedParam:h,lParamRaw:v,templateArgs:g}=await Kt.call(this,t(t({},e),{},{skipIndexedDB:r,prefI18n:o}));document.title=d("browserfile-resultsdisplay",{work:f?vt(c,l,"alias"):""}),Lt.resultsDisplayClient.main(g),(({applicableBrowseFieldSet:e,fieldValueAliasMapPreferred:t,lParamRaw:n,lIndexedParam:r,max:o,$p:i})=>{const a=e.map((e=>e.fieldSchemaIndex)),s=i.get("work");let u;const c=n("anchorrowcol");if(c&&(u=Lt.resultsDisplayClient.anchorRowCol({anchorRowCol:c})),!u){const e=[];let n="";for(let u,c=1;!u&&!e.length;c++)for(let l=1;;l++){const f=s+"-anchor"+c+"-"+l,p=i.get(f,!0);if(!p){(c===o||e.length)&&(u=!0);break}n=i.get(r("anchorfield")+c,!0);const d=a[l-1],h=Jt(p),v=t[d]&&t[d][h];e.push(v||p)}if(e.length){const t=e=>(e||"").replace(/["\\]/g,"\\$&"),r=t(e.join("-")),o=n?t(n):void 0;u=Lt.resultsDisplayClient.anchors({escapedRow:r,escapedCol:o})}}u&&u.scrollIntoView()})({applicableBrowseFieldSet:u,fieldValueAliasMapPreferred:p,lIndexedParam:h,lParamRaw:v,$p:e.$p,max:s.length}),i.forEach((({plugin:e,applicableField:t,meta:n,j:r})=>{e&&e.done&&e.done({$p:a,applicableField:t,meta:n,j:r,thisObj:this})}))},Xt.prototype.getWorkFiles=async function(e=this.files){const t=await h(e),n=[];return t.groups.forEach((e=>{e.files.forEach((r=>{const{file:o,schemaFile:i,metadataFile:a}=St(t,e,r);n.push(o,i,a)}))})),n.push(...Object.values(t.plugins).map((e=>e.path))),n};export{Xt as default};