textbrowser 0.48.0 → 0.48.2
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.
- package/.eslintrc.cjs +3 -1
- package/CHANGES.md +11 -0
- package/README.md +2 -6
- package/dist/WorkInfo-es.js +972 -344
- package/dist/activateCallback-es.js +2 -2
- package/dist/index-es.js +2713 -1105
- package/dist/index-es.min.js +4 -4
- package/dist/sw-helper.js +10 -6
- package/index.html +2 -0
- package/package.json +33 -33
- package/resources/activateCallback.js +2 -2
- package/resources/index.js +4 -4
- package/resources/resultsDisplay.js +44 -39
- package/resources/templates/languageSelect.js +3 -3
- package/resources/templates/resultsDisplayServerOrClient.js +76 -65
- package/resources/templates/workDisplay.js +123 -103
- package/resources/templates/workSelect.js +4 -4
- package/resources/utils/IntlURLSearchParams.js +1 -1
- package/resources/utils/Languages.js +3 -1
- package/resources/utils/Metadata.js +22 -21
- package/resources/utils/Plugin.js +4 -4
- package/resources/utils/ServiceWorker.js +7 -11
- package/resources/utils/WorkInfo.js +4 -4
- package/resources/utils/dialogs.js +2 -1
- package/resources/utils/getLocaleFallbackResults.js +3 -3
- package/resources/utils/sanitize.js +3 -3
- package/resources/workDisplay.js +13 -14
- package/resources/workSelect.js +3 -2
- package/server/main.js +6 -4
- package/dist/index-umd.js +0 -18864
- package/dist/index-umd.min.js +0 -19
- /package/dist/assets/{index-c987c995.css → index-_11XnUty.css} +0 -0
- /package/dist/assets/{languages-fcf1c836.json → languages-1sAACTKG.json} +0 -0
package/dist/index-umd.min.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TextBrowser=t()}(this,(function(){"use strict";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(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}function a(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let s,u;function l(){}const c=(f=function(){return function(e){var t=e();if(t&&t.then)return t.then(l)}((function(){if(!s)return e=Promise.resolve().then((()=>o(require("path")))),t=function(e){({dirname:s}=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(f.apply(this,e))}catch(e){return Promise.reject(e)}});var f;function p(e){return t=s(new URL(e).pathname),u||(u="win32"===process.platform),t.slice(u?1:0);var t}function h(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let d;function g(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const m=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 g((function(){if(/^https?:/u.test(n))return g((function(){if(!d)return h(Promise.resolve().then((()=>o(require("node-fetch")))),(function(e){d=e}))}),(function(){return r=!0,d.default(n)}))}),(function(i){return r?i:g((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)}}(c,(function(){t=e?p(e):"undefined"==typeof fetch&&process.cwd()}))}),(function(){return h(Promise.resolve().then((()=>o(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 a(Promise.all(n.map((e=>t(e)))),(function(e){return r&&r(...e),o=!0,e}))}),(function(t){return o?t:a(e(n),(function(e){return a(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}();
|
|
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 y=function(e,t){return(y=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 v(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}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var b=function(){return(b=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 _=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 w(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(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 x(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}function S(e){return this instanceof S?(this.v=e,this):new S(e)}var O=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};var P=Object.freeze({__proto__:null,__extends:v,get __assign(){return b},__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:_,__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||_(t,e,n)},__values:w,__read:E,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(E(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:x,__await:S,__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 S?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:S(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=w(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)&&_(t,e,n);return O(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 T(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 A(e){var t={exports:{}};return e(t,t.exports),t.exports}var k=A((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"})),C=A((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}}})),N=A((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})),L=A((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}})),I=A((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})),j=T(P),D=A((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(I.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=j.__assign(j.__assign(j.__assign({},t),{notation:"scientific"}),p.options.reduce((function(e,t){return j.__assign(j.__assign({},e),l(t))}),{}));continue;case"engineering":t=j.__assign(j.__assign(j.__assign({},t),{notation:"engineering"}),p.options.reduce((function(e,t){return j.__assign(j.__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=j.__assign(j.__assign({},t),a(p.options[0])))}else if(r.test(p.stem))t=j.__assign(j.__assign({},t),a(p.stem));else{var h=s(p.stem);h&&(t=j.__assign(j.__assign({},t),h));var d=u(p.stem);d&&(t=j.__assign(j.__assign({},t),d))}}return t}})),R=A((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),j.__exportStar(L,t),j.__exportStar(D,t)})),F=A((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(N.SPACE_SEPARATOR_START_REGEX,"")},y=u?function(e){return e.trimEnd()}:function(e){return e.replace(N.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(k.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:C.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:C.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(k.ErrorKind.INVALID_TAG,n(s,this.clonePosition()));var u=this.clonePosition();return i!==this.parseTagName()?this.error(k.ErrorKind.UNMATCHED_CLOSING_TAG,n(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:C.TYPE.tag,value:i,children:a,location:n(r,this.clonePosition())},err:null}:this.error(k.ErrorKind.INVALID_TAG,n(s,this.clonePosition())))}return this.error(k.ErrorKind.UNCLOSED_TAG,n(r,this.clonePosition()))}return this.error(k.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:C.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(k.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,n(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(k.ErrorKind.EMPTY_ARGUMENT,n(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(k.ErrorKind.MALFORMED_ARGUMENT,n(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(k.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,n(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:C.TYPE.argument,value:i,location:n(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(k.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,n(r,this.clonePosition())):this.parseArgumentOptions(e,t,i,r);default:return this.error(k.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(k.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(k.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:C.TYPE.number,value:r,location:f,style:w.val},err:null};if(0===h.length)return this.error(k.ErrorKind.EXPECT_DATE_TIME_SKELETON,f);var g={type:C.SKELETON_TYPE.dateTime,pattern:h,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?R.parseDateTimeSkeleton(h):{}};return{val:{type:"date"===s?C.TYPE.date:C.TYPE.time,value:r,location:f,style:g},err:null}}return{val:{type:"number"===s?C.TYPE.number:"date"===s?C.TYPE.date:C.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(k.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS,n(v,j.__assign({},v)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),_=0;if("select"!==s&&"offset"===b.value){if(!this.bumpIf(":"))return this.error(k.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,n(this.clonePosition(),this.clonePosition()));var w;if(this.bumpSpace(),(w=this.tryParseDecimalInteger(k.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,k.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:C.TYPE.select,value:r,options:d(x.val),location:S},err:null}:{val:{type:C.TYPE.plural,value:r,options:d(x.val),offset:_,pluralType:"plural"===s?"cardinal":"ordinal",location:S},err:null};default:return this.error(k.ErrorKind.INVALID_ARGUMENT_TYPE,n(a,u))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(k.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(k.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=R.parseNumberSkeletonFromString(e)}catch(e){return this.error(k.ErrorKind.INVALID_NUMBER_SKELETON,t)}return{val:{type:C.SKELETON_TYPE.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?R.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(k.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR,k.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?k.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR:k.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(a=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?k.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:k.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?k.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR:k.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR,n(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(k.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=_})),U=A((function(e,t){function n(e){e.forEach((function(e){if(delete e.location,C.isSelectElement(e)||C.isPluralElement(e))for(var t in e.options)delete e.options[t].location,n(e.options[t].value);else C.isNumberElement(e)&&C.isNumberSkeleton(e.style)||(C.isDateElement(e)||C.isTimeElement(e))&&C.isDateTimeSkeleton(e.style)?delete e.style.location:C.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=j.__assign({shouldParseSkeletons:!0},t);var r=new F.Parser(e,t).parse();if(r.err){var i=SyntaxError(k.ErrorKind[r.err.kind]);throw i.location=r.err.location,i}return(null==t?void 0:t.captureLocation)||n(r.val),r.val},j.__exportStar(C,t)}));function $(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 M(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 z(e,t,n,r,i){return n.bind(t,e,r,i)}function q(e,t){return z(e,this,1===e.length?$:M,t.cache.create(),t.serializer)}function G(){return JSON.stringify(arguments)}function B(){this.cache=Object.create(null)}B.prototype.has=function(e){return e in this.cache},B.prototype.get=function(e){return this.cache[e]},B.prototype.set=function(e,t){this.cache[e]=t};var V={create:function(){return new B}},W=function(e,t){var n=t&&t.cache?t.cache:V,r=t&&t.serializer?t.serializer:G;return(t&&t.strategy?t.strategy:q)(e,{cache:n,serializer:r})},H={variadic:function(e,t){return z(e,this,M,t.cache.create(),t.serializer)},monadic:function(e,t){return z(e,this,$,t.cache.create(),t.serializer)}};W.strategies=H;var K,X=Object.freeze(Object.assign(Object.create(null),W,{default:W,strategies:H}));!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(K||(K={}));var Y,J=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return v(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),Z=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(r).join('", "')+'"',K.INVALID_VALUE,i)||this}return v(t,e),t}(J),Q=function(e){function t(t,n,r){return e.call(this,'Value for "'+t+'" must be of type '+n,K.INVALID_VALUE,r)||this}return v(t,e),t}(J),ee=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',K.MISSING_VALUE,n)||this}return v(t,e),t}(J);function te(e){return"function"==typeof e}function ne(e,t,n,r,i,o,a){if(1===e.length&&U.isLiteralElement(e[0]))return[{type:Y.literal,value:e[0].value}];for(var s=[],u=0,l=e;u<l.length;u++){var c=l[u];if(U.isLiteralElement(c))s.push({type:Y.literal,value:c.value});else if(U.isPoundElement(c))"number"==typeof o&&s.push({type:Y.literal,value:n.getNumberFormat(t).format(o)});else{var f=c.value;if(!i||!(f in i))throw new ee(f,a);var p=i[f];if(U.isArgumentElement(c))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),s.push({type:"string"==typeof p?Y.literal:Y.object,value:p});else if(U.isDateElement(c)){var h="string"==typeof c.style?r.date[c.style]:U.isDateTimeSkeleton(c.style)?c.style.parsedOptions:void 0;s.push({type:Y.literal,value:n.getDateTimeFormat(t,h).format(p)})}else if(U.isTimeElement(c)){h="string"==typeof c.style?r.time[c.style]:U.isDateTimeSkeleton(c.style)?c.style.parsedOptions:void 0;s.push({type:Y.literal,value:n.getDateTimeFormat(t,h).format(p)})}else if(U.isNumberElement(c)){(h="string"==typeof c.style?r.number[c.style]:U.isNumberSkeleton(c.style)?c.style.parsedOptions:void 0)&&h.scale&&(p*=h.scale||1),s.push({type:Y.literal,value:n.getNumberFormat(t,h).format(p)})}else{if(U.isTagElement(c)){var d=c.children,g=c.value,m=i[g];if(!te(m))throw new Q(g,"function",a);var y=m(ne(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?Y.literal:Y.object,value:e}})))}if(U.isSelectElement(c)){if(!(v=c.options[p]||c.options.other))throw new Z(c.value,p,Object.keys(c.options),a);s.push.apply(s,ne(v.value,t,n,r,i))}else if(U.isPluralElement(c)){var v;if(!(v=c.options["="+p])){if(!Intl.PluralRules)throw new J('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',K.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 Z(c.value,p,Object.keys(c.options),a);s.push.apply(s,ne(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===Y.literal&&t.type===Y.literal?n.value+=t.value:e.push(t),e}),[])}(s)}function re(e,t){return t?Object.keys(e).reduce((function(n,r){var i,o;return n[r]=(i=e[r],(o=t[r])?b(b(b({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=b(b({},i[t]),o[t]||{}),e}),{})):i),n}),b({},e)):e}function ie(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"}(Y||(Y={}));var oe=W||X;var ae=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===Y.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 ne(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=re(e.formats,r),this.locales=n,this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:oe((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,x([void 0],t)))}),{cache:ie(o.number),strategy:oe.strategies.variadic}),getDateTimeFormat:oe((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,x([void 0],t)))}),{cache:ie(o.dateTime),strategy:oe.strategies.variadic}),getPluralRules:oe((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,x([void 0],t)))}),{cache:ie(o.pluralRules),strategy:oe.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=U.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 se(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return se=function(){return e},e}function ue(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=se();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 le(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let ce,fe;function pe(){}const he=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(pe)}((function(){if(!ce)return e=Promise.resolve().then((()=>ue(require("path")))),t=function(e){({dirname:ce}=e)},n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e);var e,t,n}))}));function de(e){return t=ce(new URL(e).pathname),fe||(fe="win32"===process.platform),t.slice(fe?1:0);var t}function ge(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let me;function ye(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const ve=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 ye((function(){if(/^https?:/u.test(n))return ye((function(){if(!me)return ge(Promise.resolve().then((()=>ue(require("node-fetch")))),(function(e){me=e}))}),(function(){return r=!0,me.default(n)}))}),(function(i){return r?i:ye((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)}}(he,(function(){t=e?de(e):"undefined"==typeof fetch&&process.cwd()}))}),(function(){return ge(Promise.resolve().then((()=>ue(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 le(Promise.all(n.map((e=>t(e)))),(function(e){return r&&r(...e),o=!0,e}))}),(function(t){return o?t:le(e(n),(function(e){return le(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 be{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 ae(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),ve(e.map(this.localeFileResolver,this),((...e)=>{n||this.locales.push(...e),t&&t.apply(this,e)}))}}const _e=e=>new be(e);function we(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 Ee(e){return(Ee="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 xe(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)||Oe(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 Se(e){return function(e){if(Array.isArray(e))return Pe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Oe(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 Oe(e,t){if(e){if("string"==typeof e)return Pe(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)?Pe(e,t):void 0}}function Pe(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=ae);var Te=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i,ke=/(\[[^[\]]*])/g;function Ce(e,t){"object"!==Ee(t)?t={hash:Boolean(t)}:void 0===t.hash&&(t.hash=!0);var n=t.hash?{}:"",r=t.serializer||(t.hash?Le:Ie),i=e&&e.elements?Se(e.elements):[],o=Object.create(null);return i.forEach((function(e){if((t.disabled||!e.disabled)&&e.name&&Ae.test(e.nodeName)&&!Te.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 Se(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=xe(e,2),i=t[0];t[1]||(n=r(n,i,""))})),n}function Ne(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(Ne(null,t,n)):(e._values=e._values||[],e._values.push(Ne(null,t,n))),e;if(i){var o=i[1],a=Number(o);isNaN(a)?(e=e||{})[o]=Ne(e[o],t,n):(e=e||[])[a]=Ne(e[a],t,n)}else e[r]=Ne(e[r],t,n);return e}function Le(e,t,n){if(t.match(ke)){Ne(e,function(e){var t=[],n=new RegExp(ke),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 je(e,t){Object.entries(t).forEach((function(t){var n=xe(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"===Ee(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)&&Se(e.querySelectorAll('[name="'.concat(r+(a?"[]":""),'"]'))).forEach((function(e){e.checked=i===e.value})),o[0]&&"select-multiple"===o[0].type)Se(o[0].options).forEach((function(e){i.includes(e.value)&&(e.selected=!0)}));else if(Array.isArray(i)){if("select-multiple"===s)return void Se(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:Se(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 De({$p:e,lang:t,langs:n,langData:r,fallbackLanguages:i,resultsDisplay:o,basePath:a="",localeCallback:s=!1}){return new Promise(((u,l)=>{const c=_e({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 Re="undefined"!=typeof window&&window,Fe="undefined"!=typeof document&&document||Re&&Re.document;const Ue=["$plugins","$map"],$e="http://www.w3.org/1999/xhtml",Me=/-([a-z])/gu,ze={maxlength:"maxLength",minlength:"minLength",readonly:"readOnly"},qe=["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"]),Ge=["autocomplete","dir","integrity","lang","max","min","minLength","maxLength","title"],Be=e=>Fe.querySelector(e),Ve=e=>[...Fe.querySelectorAll(e)];function We(e){return e.nodeName&&e.nodeName.toLowerCase()}function He(e){if(Fe.createStyleSheet&&"style"===We(e)){Fe.createStyleSheet().cssText=e.cssText}}function Ke(e,t){const n=We(e);if(Fe.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=We(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 Xe(e,t,n){if(!/^\w+$/u.test(n))throw new TypeError(`Bad ${e} reference; with prefix "${t}" and arg "${n}"`);const r=Fe.createElement("div");return r.innerHTML="&"+t+n+";",Fe.createTextNode(r.innerHTML)}function Ye(e,t){return t.toUpperCase()}function Je(e){return null==e}function Ze(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 Qe(e,t){return e.append(t),e}function et(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 tt(e){return function(t,n){const r=e.childNodes[n],i=Array.isArray(t)?at(...t):at(t);r.replaceWith(i)}}function nt(e){return function(t){Array.isArray(t)?e.append(at(...t)):e.append(at(t))}}function rt(e){return function(t){"string"==typeof t?e.append(t):Array.isArray(t)?e.append(at(...t)):e.append(at(t))}}function it(e,t,n,r){if(r.$state="attributeValue",n&&"object"==typeof n){const i=ot(r,Object.keys(n)[0]);if(i)return i.set({opts:r,element:e,attribute:{name:t,value:n}})}return n}function ot(e,t){return e.$plugins&&e.$plugins.find((e=>e.name===t))}const at=function e(...t){let n=Fe.createDocumentFragment();function r(r){for(let[p,h]of Object.entries(r))if(p=p in ze?ze[p]:p,Ge.includes(p))h=it(n,p,h,a),Je(h)||(n[p]=h);else if(qe.includes(p))h=it(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"===Ze(o[0])?e("template",...o,Fe.body):e("template",o,Fe.body):"string"==typeof o&&(o=Be(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=it(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?Fe.createElement(c.extends).constructor:i?Fe.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?Fe.createAttributeNS(h[0],h[1]):Fe.createAttribute(h[0]);e.value=h[h.length-1],i[i.length]=e;break}case"$text":{const e=Fe.createTextNode(h);i[i.length]=e;break}case"$document":{const t=Fe.implementation.createHTMLDocument();if(h.childNodes){const e=h.childNodes.length;for(;t.childNodes[e];){t.childNodes[e].remove()}h.childNodes.forEach(tt(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=Fe.createElement("meta");e.setAttribute("charset","utf-8"),r.append(e),h.title&&(t.title=h.title),h.head&&h.head.forEach(nt(r))}h.body&&h.body.forEach(rt(i))}i[i.length]=t;break}case"$DOCTYPE":{const e=Fe.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=it(n,p,h,a),Je(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(Me,Ye).replace(/^([a-z])/u,Ye):r+a.replace(Me,Ye),null===s||"object"!=typeof s)return Je(s)||(n.dataset[i]=s),void(i=r);e(s,i)}))};e(h,"");break}case"innerHTML":Je(h)||(n.innerHTML=h);break;case"htmlFor":case"for":if("label"===o){h=it(n,p,h,a),Je(h)||(n.htmlFor=h);break}h=it(n,p,h,a),n.setAttribute(p,h);break;case"xmlns":break;default:{if(p.startsWith("on")){h=it(n,p,h,a),n[p]=h;break}if("style"===p){if(h=it(n,p,h,a),Je(h))break;if("object"==typeof h){for(const[e,t]of Object.entries(h))Je(t)||("float"===e?(n.style.cssFloat=t,n.style.styleFloat=t):n.style[e.replace(Me,Ye)]=t);break}n.setAttribute(p,h);break}const e=ot(a,p);if(e){e.set({opts:a,element:n,attribute:{name:p,value:h}});break}h=it(n,p,h,a),n.setAttribute(p,h);break}}var s,u,l,f}const i=[];let o,a,s=!1;if("object"===Ze(t[0])&&Object.keys(t[0]).some((e=>Ue.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=Ze(l);switch(c){case"null":if(s===u-1)return He(i[0]),i.length<=1?i[0]:i.reduce(Qe,Fe.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]=Fe.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,""")+'"');e=e.join(" ")}try{i[i.length]=Fe.createProcessingInstruction(l,e)}catch(t){i[i.length]=Fe.createComment("?"+l+" "+e+"?")}break}case"&":i[i.length]=Xe("entity","",t[++s]);break;case"#":i[i.length]=Xe("decimal",l,String(t[++s]));break;case"#x":i[i.length]=Xe("hexadecimal",l,t[++s]);break;case"![":try{i[i.length]=Fe.createCDATASection(t[++s])}catch(e){i[i.length]=Fe.createTextNode(t[s])}break;case"":i[i.length]=n=Fe.createDocumentFragment(),a.$state="fragment";break;default:{o=l;const e=t[s+1];if("object"===Ze(e)&&e.is){const{is:t}=e;n=Fe.createElementNS?Fe.createElementNS($e,o,{is:t}):Fe.createElement(o,{is:t})}else n=Fe.createElementNS?Fe.createElementNS($e,o):Fe.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?et(e.xmlns):' xmlns="'+e.xmlns+'"';n=i[i.length-1]=(new Re.DOMParser).parseFromString((new Re.XMLSerializer).serializeToString(n).replace(' xmlns="'+$e+'"',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++)Ke(l,i[t]);He(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(Je(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":Ke(n,Fe.createTextNode(i));break;default:if(Array.isArray(i))a.$state="children",Ke(n,e(a,...i));else if(i["#"])a.$state="fragmentChildren",Ke(n,e(a,i["#"]));else{const e=it(n,null,i,a);Ke(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};at.toJML=function(e,{stringOutput:t=!1,reportInvalidState:n=!0,stripWhitespace:r=!1}={}){"string"==typeof e&&(e=(new Re.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]},at.toJMLString=function(e,t){return at.toJML(e,Object.assign(t||{},{stringOutput:!0}))},at.toDOM=function(...e){return at(...e)},at.toHTML=function(...e){return at(...e).outerHTML},at.toDOMString=function(...e){return at.toHTML(...e)},at.toXML=function(...e){const t=at(...e);return(new Re.XMLSerializer).serializeToString(t)},at.toXMLDOMString=function(...e){return at.toXML(...e)};class st extends Map{get(e){return e="string"==typeof e?Be(e):e,super.get.call(this,e)}set(e,t){return e="string"==typeof e?Be(e):e,super.set.call(this,e,t)}invoke(e,t,...n){return e="string"==typeof e?Be(e):e,this.get(e)[t](e,...n)}}class ut extends WeakMap{get(e){return e="string"==typeof e?Be(e):e,super.get.call(this,e)}set(e,t){return e="string"==typeof e?Be(e):e,super.set.call(this,e,t)}invoke(e,t,...n){return e="string"==typeof e?Be(e):e,this.get(e)[t](e,...n)}}at.Map=st,at.WeakMap=ut,at.weak=function(e,...t){const n=new ut;return[n,at({$map:[n,e]},...t)]},at.strong=function(e,...t){const n=new st;return[n,at({$map:[n,e]},...t)]},at.symbol=at.sym=at.for=function(e,t){return(e="string"==typeof e?Be(e):e)["symbol"==typeof t?t:Symbol.for(t)]},at.command=function(e,t,n,...r){let i;return e="string"==typeof e?Be(e):e,["symbol","string"].includes(typeof t)?(i=at.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))},at.setWindow=e=>{Re=e,Fe=Re.document,Fe&&Fe.body&&({body:lt}=Fe)},at.getWindow=()=>Re;let lt=Fe&&Fe.body;const ct=" ",ft=(e,t)=>{var n;return(e="string"==typeof e?(n=e,document.querySelector(n)):e).querySelector(t)},pt=["submit","submitClass"],ht=["submit","cancel","cancelClass","submitClass"],dt=["message","submit"],gt={en:{submit:"Submit",cancel:"Cancel",ok:"Ok"}};const mt=new class{constructor({locale:e,localeObject:t}={}){this.setLocale({locale:e,localeObject:t})}setLocale({locale:e={},localeObject:n={}}){this.localeStrings=t(t(t({},gt.en),gt[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=at("dialog",e,t,Be("#main"));return i.showModal(),r&&i.addEventListener("close",(()=>{i.remove()})),i}makeSubmitDialog(e){let{submit:t,submitClass:n="submit"}=e,i=r(e,pt);const o=this.makeCancelDialog(i);return ft(o,`button.${i.cancelClass||"cancel"}`).before(at("button",{class:n,$on:{click(e){t&&t.call(this,{e:e,dialog:o})}}},[this.localeStrings.submit]),ct.repeat(2)),o}makeCancelDialog(e){let{submit:t,cancel:n,cancelClass:i="cancel",submitClass:o="submit"}=e,a=r(e,ht);const s=this.makeDialog(a);return at("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=at("dialog",[r,...n?[["br"],["br"],["div",{class:i},[["button",{$on:{click(){o.close(),e()}}},[this.localeStrings.ok]]]]]:[]],Be("#main"));o.showModal()}))}prompt(e){e="string"==typeof e?{message:e}:e;const{message:n,submit:i}=e,o=r(e,dt);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(ft(n,"input").value)},cancel(){r(new Error("cancelled"))},children:[["label",[n,ct.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=at("dialog",[t,["br"],["br"],["div",{class:n},[["button",{$on:{click(){i.close(),e()}}},[this.localeStrings.ok]],ct.repeat(2),["button",{$on:{click(){i.close(),r(new Error("cancelled"))}}},[this.localeStrings.cancel]]]]],Be("#main"));i.showModal()}))}};class yt{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 vt=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&<.isArrayBuffer,ft=lt&<.isDate,pt=lt&<.isMap,ht=lt&<.isRegExp,dt=lt&<.isSet,gt=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({"&":"&","<":"<",">":">",'"':""","'":"'"});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({"&":"&","<":"<",">":">",""":'"',"'":"'"}),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&<.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};
|
|
16
|
-
/*! Native Promise Only
|
|
17
|
-
v0.8.1 (c) Kyle Simpson
|
|
18
|
-
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 bt=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},_t=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 vt.resolveRefsAt(r.toString(),{loaderOptions:{processContent(e,t){t(void 0,JSON.parse(e.text||e.body.toString()))}}})).resolved},wt=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=bt(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(bt(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},Et=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=>wt({lang:r,field:i,schemaItems:t,metadataObj:e,getFieldAliasOrName:n})));i({setName:s,browseFields:c,i:a,presort:l})}))};class xt{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 St=e=>e.replace(/\^/g,"^^").replace(/-/g,"^0"),Ot=e=>e?e.replace(/(\^+)0/g,((e,t)=>t.length%2?t.slice(1)+"-":e)).replace(/\^\^/g,"^"):e;class Pt{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(Ot)}}const Tt=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:""}},At=async function({lang:e,fallbackLanguages:t,work:n,files:r,allowPlugins:i,basePath:o,languages:a,preferredLocale:s}){const u=await m(r),l=e=>u["localization-strings"][e],c=_e({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))}))),d=Tt(u,p,f),{file:g}=d;let{schemaFile:y,metadataFile:v}=d,b="",_="";y||(y=g,b="schema"),v||(v=g,_="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 _t(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=bt(e,P,i.split("/"))):(r=n.name,"object"==typeof r&&(r=r.localeKey,r=bt(e,P,r.split("/")))),r},A=O,[k,C]=await Promise.all([_t(y,b,o),w?Promise.all(S.map((e=>import(e)))):null]),N=new Pt({pluginsInWork:E,pluginFieldMappings:A,pluginObjects:C}),L=k.items.items,I=L.map((({title:e})=>({field:e,fieldAliasOrName:T(e)||e}))),j=new xt({metadataObj:P});if(a&&N){console.log("pluginsForWork",N);const{lang:e,namespace:t}=this;N.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=N.getPluginObject(r)||{},g=j.getFieldLang(n);d.getTargetLanguage&&(l=d.getTargetLanguage({applicableField:n,targetLanguage:l,pluginLang:i,applicableFieldLang:g}));const m=(({pluginName:e,applicableField:t,targetLanguage:n})=>St(e)+(t?"-"+St(t):"-")+(n?"-"+St(n):""))({pluginName:r,applicableField:n,targetLanguage:l||i||g});"{locale}"===l&&(l=s);const y=bt(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});I.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})};N.processTargetLanguages(l,p)||p()}))}return{fileData:f,lf:c,getFieldAliasOrName:T,metadataObj:P,schemaObj:k,schemaItems:L,fieldInfo:I,pluginsForWork:N,groupsToWorks:h,metadata:j}},kt=({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 mt.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 mt.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}`)}}))}))},Ct=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 mt.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 mt.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})})),Nt=e=>e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):"";var Lt={main({langs:e,languages:t,followParams:n,$p:r}){at("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)]]))]],Be("#main")),history.state&&"object"==typeof history.state&&je(document.querySelector("#languageSelectionContainer"),history.state)}};const It=["aqua","black","blue","fuchsia","gray","green","lime","maroon","navy","olive","purple","red","silver","teal","white","yellow"],jt=["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"],Dt=ct.repeat(2),Rt=ct.repeat(3),Ft=()=>({form:Be("form#browse"),random:Be("#rand")||{},checkboxes:Ve("input[type=checkbox]")});const Ut={languageSelect:Lt,workSelect:({groups:e,lf:t,getNextAlias:n,$p:r,followParams:i})=>{const o=at("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()]]))]]]])),Be("#main"));return history.state&&"object"==typeof history.state&&je(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(){Ve(".fieldSelector").forEach((e=>{e.checked=!0}))}}}),r("uncheck_all","input","value",{type:"button",$on:{click(){Ve(".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=Be("#field"+n).selectedOptions[0].dataset.name;Be("#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"),Dt,["select",{name:t("colorName")},It.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",[ct,e("or_entercolor"),Dt,["input",{name:t("color"),type:"text",value:o.get("color")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("backgroundcolor"),Dt,["select",{name:t("bgcolorName")},It.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",[ct,e("or_entercolor"),Dt,["input",{name:t("bgcolor"),type:"text",value:o.get("bgcolor")||"#",size:"7",maxlength:"7"}]]],["br"],["br"],["label",[e("text_font"),Dt,["select",{name:t("fontSeq"),dir:"ltr"},jt.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"),Dt,["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"),Rt,["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"]),ct]],["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"]),ct]]]],["br"],["label",[e("font_weight")," (normal, bold, 100-900, etc.):",Dt,["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.):",Dt,["input",{name:t("fontsize"),type:"text",value:o.get("fontsize"),size:"7",maxlength:"12"}]]],["br"],["label",{dir:"ltr"},[e("font_stretch"),ct,["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"),Dt,...[["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?"":Rt]]))]],["div",[e("footer_wstyles"),Dt,...[["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?"":Rt]]))]],["label",[["input",{name:t("headerfooterfixed"),type:"checkbox",value:n("yes"),checked:o.get("headerfooterfixed")===n("yes")}],Dt,e("headerfooterfixed-wishtoscroll")]],["br"],["div",[e("caption_wstyles"),Dt,...[["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?"":Rt]]))]],["br"],["div",[e("table_wborder"),Dt,["label",[["input",{name:t("border"),type:"radio",value:"1",checked:"0"!==o.get("border")}],e("yes"),Rt]],["label",[["input",{name:t("border"),type:"radio",value:"0",checked:"0"===o.get("border")}],e("no")]]]],["div",[e("interlin_repeat_field_names"),Dt,["label",[["input",{name:t("interlintitle"),type:"radio",value:"1",checked:"0"!==o.get("interlintitle")}],e("yes"),Rt]],["label",[["input",{name:t("interlintitle"),type:"radio",value:"0",checked:"0"===o.get("interlintitle")}],e("no")]]]],["label",[e("interlintitle_css"),Dt,["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"),Dt,["textarea",{name:t("pagecss"),title:n("page_css_tips"),value:o.get("pagecss")}]]],["br"],i("outputmode_tips","label","title",{},[e("outputmode"),Dt,["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"),Rt,["input",{id:"rand",name:e("rand"),type:"checkbox",value:r("yes"),checked:o.get("rand")===r("yes")}]]],Rt,["label",[n("verses-context"),ct,["input",{name:e("context"),type:"number",min:1,size:4,value:o.get("context")}]]],Rt,i("view-random-URL","input","value",{type:"button",$on:{click(){const e=a(t(t({},Ft()),{},{type:"randomResult"}));Be("#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}}){Be("#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({$:Be,l:u,jml:at,paramsSetter:n,getDataForSerializingParamsAsURL:Ft,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){Ve("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)}],Rt]]),e}),{"#":[]});return[t("start"),["td",[["b",[n("to")]],Rt]],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)}],Dt]]),e}),{"#":[["td",{style:"font-weight: bold; vertical-align: bottom;"},[n("anchored-at")+Rt]]]}),["td",[["label",[n("field")+Dt,["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({},Ft()),{},{type:e}));at("div",{class:"focus"},[["div",{style:"float: left;"},[["button",{$on:{click(){const e=Be("#preferences");e.hidden=!e.hidden}}},[r("Preferences")]],Ut.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",[Ut.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"});Be("#settings-URL").value=e}}}),["input",{id:"settings-URL"}],["br"],["button",{$on:{async click(e){e.preventDefault();const n=p(t(t({},Ft()),{},{workName:A,type:"startEndResult"})),r=h(n)+`&work=${A}&${A}-startEnd1=%s`;try{await navigator.clipboard.writeText(r)}catch(e){}}}},[r("Copy_shortcut_URL")]]]],Ut.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"})]]]]],Be("#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(Ut.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?Ut.resultsDisplayServerOrClient.interlinearSegment({lang:f[t],dir:p[t],html:(g?Ut.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)?Ut.resultsDisplayServerOrClient.interlinearSegment({lang:f[n],html:(g?Ut.resultsDisplayServerOrClient.interlinearTitle({l:l,val:c[n]}):"")+a}):a)+(i&&u.length?w+u.join(w):"")})})))),!1})),["div",[Ut.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})=>Be("#"+e),anchors:({escapedRow:e,escapedCol:t})=>Be('tr[data-row="'+e+'"]'+(t?'> td[data-col="'+t+'"]':"")),main(...e){let t;try{t=Ut.resultsDisplayServerOrClient.main(...e)}catch(e){"JSON support is currently not available"===e.message&&mt.alert(e.message)}at(...t,Be("#main"))}},defaultBody(){for(;lt.hasChildNodes();)lt.firstChild.remove();return at("div",{id:"main",role:"main"},lt)}};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])}Ut.permissions={versionChange(){Be("#versionChange").showModal()},addLogEntry({text:e}){const t=Be("#installationLogContainer");try{t.showModal();Be("#dialogContainer").hidden=!1}catch(e){}Be("#installationLog").append(e+"\n")},exitDialogs(){const e=Be("#dialogContainer");e&&(e.hidden=!0)},dbError({type:e,escapedErrorMessage:t}){e&&at("span",[e," ",t],Be("#dbError")),Be("#dbError").showModal()},errorRegistering(e){e&&at("span",[e],Be("#errorRegistering")),Be("#errorRegistering").showModal()},browserNotGrantingPersistence(){Be("#browserNotGrantingPersistence").showModal()},main({l:e,ok:t,refuse:n,close:r,closeBrowserNotGranting:i}){const o=at("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=at("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=at("dialog",{id:"errorRegistering"},[["section",[e("errorRegistering")]]]);let u="";i&&(u=at("dialog",{id:"browserNotGrantingPersistence"},[["section",[e("browser-not-granting-persistence")]],["br"],["div",{class:"focus"},[["button",{$on:{click:i}},[e("OK")]]]]]));const l=at("dialog",{id:"versionChange"},[["section",[e("versionChange")]]]),c=at("dialog",{id:"dbError"},[["section",[e("dbError")]]]);return at("div",{id:"dialogContainer",style:"height: 100%"},[o,a,u,s,l,c],Be("#main")),[o,a,u,s,l,c]}};class Mt{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 zt=e=>location.href.replace(/#.*$/,"")+"#"+e.toString(),qt=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=Ce(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}},Gt=["lf","fileData","metadataObj"];var Bt,Vt=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,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=Bt._escapeRegExpPattern(e);o(t)})),"string"==typeof t){var a=Bt._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=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:Vt.isRtlLang,getLangDir:Vt.getLangDir};const{getLangDir:Ht}=Wt,Kt=/^.* \((.*?)\)$/,Xt=e=>"string"==typeof e?e.replace(Kt,"$1"):e,Yt=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 yt({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}=wt({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=>Ut.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t}))):t&&"object"==typeof t?"string"==typeof s?u[e]=Ut.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:t[s]}):Object.entries(t).forEach((([t,n])=>{u[e][t]=Ut.resultsDisplayServerOrClient.fieldValueAlias({key:e,value:n})})):u[e]=Ut.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=Nt,{fileData:y,lf:v,getFieldAliasOrName:b,schemaObj:_,metadataObj:w,pluginsForWork:E}=await At({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=bt(t,w,"heading"),S=_.items.items,O=[],P=[],T=[];Et({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 xt({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=bt(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=Ut.resultsDisplayServerOrClient.startSeparator({l:e}),s=Ut.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 Nt(Ut.resultsDisplayServerOrClient.ranges({l:e,startRange:o,endVals:i,rangeNames:u}))})();o=Ut.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)||Kt.test(e))n=Xt(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 vt.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:Ht,meta:r,metaApplicableField:o,$p:i,thisObj:this})||c})),console.log("applicableFieldIdx",s)})));const ue=Ht(k),le=I.map((e=>{if(!e)return null;const t=Ht(e);return t!==ue?t:null})),ce={tableData:ae,$p:i,$pRaw:g,$pRawEsc:e=>Nt(g(e)),$pEscArbitrary:e=>Nt(i.get(e,!0)),escapeQuotedCSS:e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),escapeCSS:m,escapeHTML:Nt,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:Nt(o),htmlEscaped:!0}})({fieldValueAliasMapPreferred:D,escapeColumnIndexes:L,escapeHTML:Nt}),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 Jt(){try{Ut.permissions.addLogEntry({text:"Worker registration: Beginning..."});if(!await navigator.storage.persist())return void Ut.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 mt.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"}),Ct({r:n,logger:t})})({serviceWorkerPath:this.serviceWorkerPath,logger:Ut.permissions})}catch(e){if(console.log("err",e),e&&"object"==typeof e){const{errorType:t}=e;if("versionChange"===t)return void Ut.permissions.versionChange()}Ut.permissions.errorRegistering(Nt(e&&e.message))}}async function Zt(e,t){await new Promise(((e,n)=>{const[,r,i]=Ut.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),Ut.permissions.errorRegistering(Nt(e&&e.message))}switch(r.returnValue){case"denied":case"default":return void e();case"granted":if(navigator.serviceWorker.controller)return void e();await Jt.call(this);break;default:console.error("Unexpected returnValue",r.returnValue)}},closeBrowserNotGranting:e=>{i.close()}});r.showModal()}))}class Qt{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 we(this.stylesheets),this.displayLanguages()}async displayLanguages(){try{const[e,t]=await m([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),mt.alert(e)}}getWorkData(e){try{return At.call(this,t(t({},e),{},{files:this.files,allowPlugins:this.allowPlugins}))}catch(e){console.log("err",e),mt.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 wt(t(t({},e),{},{lang:this.lang}))}getBrowseFieldData(e){return Et(t(t({},e),{},{lang:this.lang}))}async paramChange(){Ut.defaultBody();const e=this.$p="string"==typeof history.state?new Mt({params:history.state}):new Mt,n=(t,n)=>{const r=document.querySelector(t),i=location.href.replace(/#.*$/,"")+"#"+e.toString();history.replaceState(Ce(r,{hash:!0,empty:!0}),document.title,i),n(),location.hash="#"+e.toString()},r=new yt({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 _e({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),d=e.get("result"),g=async()=>{if(d)return;!(f||navigator.serviceWorker.controller&&p)&&(p?(Ut.permissions.main({l:c}),await Jt.call(this)):await Zt.call(this,o,c),Ut.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 g();Ut.permissions.main({l:c});setInterval((()=>{h.update()}),36e5),console.log("worker.state",e.state);const t=async()=>{try{return Ct({r:h,langs:o,languages:this.languages,logger:Ut.permissions})}catch(e){return console.log("err",e),mt.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(),kt({r:h,logger:{addLogEntry(e){console.log(e)}}});break;case"installed":await t();break;case"activating":return await mt.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":kt({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 g();if(Ut.permissions.exitDialogs(),!a)return e.l10n=c,document.title=c("languages-title"),void Ut.languageSelect.main({langs:o,languages:r,followParams:n,$p:e});return De({$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")?!d&&(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 m(e),a=e=>o["localization-strings"][e],s=await m(o.groups.reduce(((e,t)=>{const n=(o.metadataBaseDirectory||"")+(t.metadataBaseDirectory||"")+"/";return t.files.reduce(((e,t)=>[...e,n+t.metadataFile]),e)}),[])),u=_e({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 bt(t,e,"alias")};Ut.workSelect({groups:o.groups,lf:u,getNextAlias:c,$p:r,followParams:i})}catch(e){console.log("Error",e),mt.alert(e)}}({files:this.files,lang:i,fallbackLanguages:s,$p:e,followParams:n}),!0)}})}}return Qt.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,d=localStorage.getItem(this.namespace+"-hideFormattingSection"),g=u.has("formatting",!0)?"0"===u.get("formatting",!0):"true"===d||"false"!==d&&this.hideFormattingSection;try{const p=await this.getWorkData({lang:i,fallbackLanguages:s,preferredLocale:o,languages:a,work:u.get("work")}),{lf:d,fileData:y,metadataObj:v}=p,b=r(p,Gt);document.title=d({key:"browserfile-workdisplay",values:{work:y?bt(i,v,"alias"):""},fallback:!0}),await async function({lf:t,metadataObj:r,getFieldAliasOrName:p,schemaObj:d,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=_e({locales:i.map(S),fallbackLocales:s.map(S)}).getFormatter(),P=(t,n,r)=>e({key:t,values:n,formats:r,fallback:({message:e})=>Ut.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}){Ut.workDisplay.addBrowseFields({browseFields:e,fieldInfo:v,ld:P,i:t,iil:x,$p:u,content:A})}});const k=function(...e){const t=qt(...e);return function(...e){const n=t(...e);return zt(n)}}({l:e,il:E,$p:u}),C=qt({l:e,il:E,$p:u}),{groups:N}=await m(this.files),L=bt(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})();Ut.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:zt,getFieldAliasOrNames:I,hideFormattingSection:g,$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:d,metadataObj:v},b))}catch(e){console.log("err",e),mt.alert(e)}},Qt.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 Yt.call(this,t(t({},e),{},{skipIndexedDB:r,prefI18n:i}));document.title=h({key:"browserfile-resultsdisplay",values:{work:f?bt(l,c,"alias"):""},fallback:!0}),Ut.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=Ut.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=Xt(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=Ut.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})}))},Qt.prototype.getWorkFiles=async function(e=this.files){const t=await m(e),n=[];return t.groups.forEach((e=>{e.files.forEach((r=>{const{file:i,schemaFile:o,metadataFile:a}=Tt(t,e,r);n.push(i,o,a)}))})),n.push(...Object.values(t.plugins).map((e=>e.path))),n},Qt}));
|