vendor: 4,128 bytes, line 1
1(self.webpackChunkhost=self.webpackChunkhost||[]).push([[867],{10867:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FeatureFlagContext:()=>Sc,FeatureFlagProvider:()=>xc,useFeatureFlags:()=>$c});var n=r(52322),s=r(77285),i=r.n(s);const a=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);s<128?t[r++]=s:s<2048?(t[r++]=s>>6|192,t[r++]=63&s|128):55296==(64512&s)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),t[r++]=s>>18|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128,t[r++]=63&s|128):(t[r++]=s>>12|224,t[r++]=s>>6&63|128,t[r++]=63&s|128)}return t},o={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let s=0;s<e.length;s+=3){const t=e[s],i=s+1<e.length,a=i?e[s+1]:0,o=s+2<e.length,l=o?e[s+2]:0,c=t>>2,u=(3&t)<<4|a>>4;let f=(15&a)<<2|l>>6,h=63&l;o||(h=64,i||(f=64)),n.push(r[c],r[u],r[f],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(a(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const s=e[r++];if(s<128)t[n++]=String.fromCharCode(s);else if(s>191&&s<224){const i=e[r++];t[n++]=String.fromCharCode((31&s)<<6|63&i)}else if(s>239&&s<365){const i=((7&s)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(i>>10)),t[n++]=String.fromCharCode(56320+(1023&i))}else{const i=e[r++],a=e[r++];t[n++]=String.fromCharCode((15&s)<<12|(63&i)<<6|63&a)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let s=0;s<e.length;){const t=r[e.charAt(s++)],i=s<e.length?r[e.charAt(s)]:0;++s;const a=s<e.length?r[e.charAt(s)]:64;++s;const o=s<e.length?r[e.charAt(s)]:64;if(++s,null==t||null==i||null==a||null==o)throw new DecodeBase64StringError;const l=t<<2|i>>4;if(n.push(l),64!==a){const e=i<<4&240|a>>2;if(n.push(e),64!==o){const e=a<<6&192|o;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class DecodeBase64StringError extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const l=function(e){return function(e){const t=a(e);return o.encodeByteArray(t,!0)}(e).replace(/\./g,"")},c=function(e){try{return o.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};const u=()=>function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,f=()=>{try{return u()||(()=>{if("undefined"==typeof process)return;const e={NX_PUBLIC_AUTH_URL:"https://auth-dev.ariefinance.com",NX_PUBLIC_LEGACY_OLB_BASE_URL:"http://online.ariefinance.com",NX_PUBLIC_APP_VERSION:"1.980.2"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(r){return}const t=e&&c(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},h=()=>{var e;
vendor: 5,277 bytes, line 1
1return null===(e=f())||void 0===e?void 0:e.config};class Deferred{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,r))}}}function d(){try{return"object"==typeof indexedDB}catch(e){return!1}}class FirebaseError extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,FirebaseError.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ErrorFactory.prototype.create)}}class ErrorFactory{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},n=`${this.service}/${e}`,s=this.errors[e],i=s?function(e,t){return e.replace(p,((e,r)=>{const n=t[r];return null!=n?String(n):`<${r}?>`}))}(s,r):"Error",a=`${this.serviceName}: ${i} (${n}).`;return new FirebaseError(n,a,r)}}const p=/\{\$([^}]+)}/g;function m(e,t){if(e===t)return!0;const r=Object.keys(e),n=Object.keys(t);for(const s of r){if(!n.includes(s))return!1;const r=e[s],i=t[s];if(g(r)&&g(i)){if(!m(r,i))return!1}else if(r!==i)return!1}for(const s of n)if(!r.includes(s))return!1;return!0}function g(e){return null!==e&&"object"==typeof e}function y(e,t=1e3,r=2){const n=t*Math.pow(r,e),s=Math.round(.5*n*(Math.random()-.5)*2);return Math.min(144e5,n+s)}function b(e){return e&&e._delegate?e._delegate:e}class Component{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const v="[DEFAULT]";class Provider{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new Deferred;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(r){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(n)return null;throw s}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:v})}catch(t){}for(const[e,r]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});r.resolve(e)}catch(t){}}}}clearInstance(e=v){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=v){return this.instances.has(e)}getOptions(e=v){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[s,i]of this.instancesDeferred.entries()){r===this.normalizeInstanceIdentifier(s)&&i.resolve(n)}return n}onInit(e,t){var r;const n=this.normalizeInstanceIdentifier(t),s=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;s.add(e),this.onInitCallbacks.set(n,s);const i=this.instances.get(n);return i&&e(i,n),()=>{s.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const s of r)try{s(e,t)}catch(n){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===v?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(s){}var n;return r||null}normalizeInstanceIdentifier(e=v){return this.component?this.component.multipleInstances?e:v:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}
vendor: 4,606 bytes, line 1
1class ComponentContainer{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new Provider(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const _=[];var w;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(w||(w={}));const $={debug:w.DEBUG,verbose:w.VERBOSE,info:w.INFO,warn:w.WARN,error:w.ERROR,silent:w.SILENT},S=w.INFO,x={[w.DEBUG]:"log",[w.VERBOSE]:"log",[w.INFO]:"info",[w.WARN]:"warn",[w.ERROR]:"error"},j=(e,t,...r)=>{if(t<e.logLevel)return;const n=(new Date).toISOString(),s=x[t];if(!s)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[s](`[${n}] ${e.name}:`,...r)};class Logger{constructor(e){this.name=e,this._logLevel=S,this._logHandler=j,this._userLogHandler=null,_.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in w))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?$[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,w.DEBUG,...e),this._logHandler(this,w.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,w.VERBOSE,...e),this._logHandler(this,w.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,w.INFO,...e),this._logHandler(this,w.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,w.WARN,...e),this._logHandler(this,w.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,w.ERROR,...e),this._logHandler(this,w.ERROR,...e)}}let E,k;const O=new WeakMap,C=new WeakMap,A=new WeakMap,I=new WeakMap,R=new WeakMap;let D={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return C.get(e);if("objectStoreNames"===t)return e.objectStoreNames||A.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return M(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function T(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(k||(k=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(P(this),t),M(O.get(this))}:function(...t){return M(e.apply(P(this),t))}:function(t,...r){const n=e.call(P(this),t,...r);return A.set(n,t.sort?t.sort():[t]),M(n)}}function L(e){return"function"==typeof e?T(e):(e instanceof IDBTransaction&&function(e){if(C.has(e))return;const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{t(),n()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)}));C.set(e,t)}(e),t=e,(E||(E=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,D):e);var t}function M(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{t(M(e.result)),n()},i=()=>{r(e.error),n()};e.addEventListener("success",s),e.addEventListener("error",i)}));return t.then((t=>{t instanceof IDBCursor&&O.set(t,e)})).catch((()=>{})),R.set(t,e),t}(e);if(I.has(e))return I.get(e);const t=L(e);return t!==e&&(I.set(e,t),R.set(t,e)),t}const P=e=>R.get(e);const F=["get","getKey","getAll","getAllKeys","count"],N=["put","add","delete","clear"],B=new Map;function q(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(B.get(t))return B.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,s=N.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!s&&!F.includes(r))return;const i=async function(e,...t){const i=this.transaction(e,s?"readwrite":"readonly");let a=i.store;
vendor: 2,797 bytes, line 1
1return n&&(a=a.index(t.shift())),(await Promise.all([a[r](...t),s&&i.done]))[0]};return B.set(t,i),i}D=(e=>({...e,get:(t,r,n)=>q(t,r)||e.get(t,r,n),has:(t,r)=>!!q(t,r)||e.has(t,r)}))(D);class PlatformLoggerServiceImpl{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const z="@firebase/app",U="0.9.13",V=new Logger("@firebase/app"),H="@firebase/app-compat",W="@firebase/analytics-compat",G="@firebase/analytics",K="@firebase/app-check-compat",Z="@firebase/app-check",Y="@firebase/auth",J="@firebase/auth-compat",X="@firebase/database",Q="@firebase/database-compat",ee="@firebase/functions",te="@firebase/functions-compat",re="@firebase/installations",ne="@firebase/installations-compat",se="@firebase/messaging",ie="@firebase/messaging-compat",ae="@firebase/performance",oe="@firebase/performance-compat",le="@firebase/remote-config",ce="@firebase/remote-config-compat",ue="@firebase/storage",fe="@firebase/storage-compat",he="@firebase/firestore",de="@firebase/firestore-compat",pe="firebase",me="[DEFAULT]",ge={[z]:"fire-core",[H]:"fire-core-compat",[G]:"fire-analytics",[W]:"fire-analytics-compat",[Z]:"fire-app-check",[K]:"fire-app-check-compat",[Y]:"fire-auth",[J]:"fire-auth-compat",[X]:"fire-rtdb",[Q]:"fire-rtdb-compat",[ee]:"fire-fn",[te]:"fire-fn-compat",[re]:"fire-iid",[ne]:"fire-iid-compat",[se]:"fire-fcm",[ie]:"fire-fcm-compat",[ae]:"fire-perf",[oe]:"fire-perf-compat",[le]:"fire-rc",[ce]:"fire-rc-compat",[ue]:"fire-gcs",[fe]:"fire-gcs-compat",[he]:"fire-fst",[de]:"fire-fst-compat","fire-js":"fire-js",[pe]:"fire-js-all"},ye=new Map,be=new Map;function ve(e,t){try{e.container.addComponent(t)}catch(r){V.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function _e(e){const t=e.name;if(be.has(t))return V.debug(`There were multiple attempts to register component ${t}.`),!1;be.set(t,e);for(const r of ye.values())ve(r,e);return!0}function we(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}const $e=new ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
1d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});class FirebaseAppImpl{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Component("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw $e.create("app-deleted",{appName:this._name})}}function Se(e,t={}){let r=e;if("object"!=typeof t){t={name:t}}const n=Object.assign({name:me,automaticDataCollectionEnabled:!1},t),s=n.name;if("string"!=typeof s||!s)throw $e.create("bad-app-name",{appName:String(s)});if(r||(r=h()),!r)throw $e.create("no-options");const i=ye.get(s);if(i){if(m(r,i.options)&&m(n,i.config))return i;throw $e.create("duplicate-app",{appName:s})}const a=new ComponentContainer(s);for(const l of be.values())a.addComponent(l);const o=new FirebaseAppImpl(r,n,a);return ye.set(s,o),o}function xe(e,t,r){var n;let s=null!==(n=ge[e])&&void 0!==n?n:e;r&&(s+=`-${r}`);const i=s.match(/\s|\//),a=t.match(/\s|\//);if(i||a){const e=[`Unable to register library "${s}" with version "${t}":`];return i&&e.push(`library name "${s}" contains illegal characters (whitespace or "/")`),i&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void V.warn(e.join(" "))}_e(new Component(`${s}-version`,(()=>({library:s,version:t})),"VERSION"))}const je="firebase-heartbeat-store";let Ee=null;function ke(){return Ee||(Ee=function(e,t,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const a=indexedDB.open(e,t),o=M(a);return n&&a.addEventListener("upgradeneeded",(e=>{n(M(a.result),e.oldVersion,e.newVersion,M(a.transaction),e)})),r&&a.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),o.then((e=>{i&&e.addEventListener("close",(()=>i())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),o}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(je)}}).catch((e=>{throw $e.create("idb-open",{originalErrorMessage:e.message})}))),Ee}async function Oe(e,t){try{const r=(await ke()).transaction(je,"readwrite"),n=r.objectStore(je);await n.put(t,Ce(e)),await r.done}catch(r){if(r instanceof FirebaseError)V.warn(r.message);else{const e=$e.create("idb-set",{originalErrorMessage:null==r?void 0:r.message});V.warn(e.message)}}}function Ce(e){return`${e.name}!${e.options.appId}`}class HeartbeatServiceImpl{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new HeartbeatStorageImpl(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=Ae();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}
vendor: 4,395 bytes, line 1
1async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=Ae(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const r=[];let n=e.slice();for(const s of e){const e=r.find((e=>e.agent===s.agent));if(e){if(e.dates.push(s.date),Ie(r)>t){e.dates.pop();break}}else if(r.push({agent:s.agent,dates:[s.date]}),Ie(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=l(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),n}}function Ae(){return(new Date).toISOString().substring(0,10)}class HeartbeatStorageImpl{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!d()&&new Promise(((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(n);s.onsuccess=()=>{s.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},s.onupgradeneeded=()=>{r=!1},s.onerror=()=>{var e;t((null===(e=s.error)||void 0===e?void 0:e.message)||"")}}catch(r){t(r)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{const t=await ke();return await t.transaction(je).objectStore(je).get(Ce(e))}catch(t){if(t instanceof FirebaseError)V.warn(t.message);else{const e=$e.create("idb-get",{originalErrorMessage:null==t?void 0:t.message});V.warn(e.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return Oe(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return Oe(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function Ie(e){return l(JSON.stringify({version:2,heartbeats:e})).length}var Re;Re="",_e(new Component("platform-logger",(e=>new PlatformLoggerServiceImpl(e)),"PRIVATE")),_e(new Component("heartbeat",(e=>new HeartbeatServiceImpl(e)),"PRIVATE")),xe(z,U,Re),xe(z,U,"esm2017"),xe("fire-js","");xe("firebase","9.23.0","app");let De,Te;const Le=new WeakMap,Me=new WeakMap,Pe=new WeakMap,Fe=new WeakMap,Ne=new WeakMap;let Be={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return Me.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Pe.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ue(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function qe(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Te||(Te=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Ve(this),t),Ue(Le.get(this))}:function(...t){return Ue(e.apply(Ve(this),t))}:function(t,...r){const n=e.call(Ve(this),t,...r);return Pe.set(n,t.sort?t.sort():[t]),Ue(n)}}function ze(e){return"function"==typeof e?qe(e):(e instanceof IDBTransaction&&function(e){if(Me.has(e))return;const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{t(),n()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)}));Me.set(e,t)}(e),t=e,(De||(De=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,Be):e);var t}function Ue(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{t(Ue(e.result)),n()},i=()=>{r(e.error),n()};e.addEventListener("success",s),e.addEventListener("error",i)}));return t.then((t=>{t instanceof IDBCursor&&Le.set(t,e)}
1)).catch((()=>{})),Ne.set(t,e),t}(e);if(Fe.has(e))return Fe.get(e);const t=ze(e);return t!==e&&(Fe.set(e,t),Ne.set(t,e)),t}const Ve=e=>Ne.get(e);const He=["get","getKey","getAll","getAllKeys","count"],We=["put","add","delete","clear"],Ge=new Map;function Ke(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ge.get(t))return Ge.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,s=We.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!s&&!He.includes(r))return;const i=async function(e,...t){const i=this.transaction(e,s?"readwrite":"readonly");let a=i.store;return n&&(a=a.index(t.shift())),(await Promise.all([a[r](...t),s&&i.done]))[0]};return Ge.set(t,i),i}!function(e){Be=e(Be)}((e=>({...e,get:(t,r,n)=>Ke(t,r)||e.get(t,r,n),has:(t,r)=>!!Ke(t,r)||e.has(t,r)})));const Ze="@firebase/installations",Ye="0.6.4",Je=1e4,Xe=`w:${Ye}`,Qe="FIS_v2",et=36e5,tt=new ErrorFactory("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function rt(e){return e instanceof FirebaseError&&e.code.includes("request-failed")}function nt({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function st(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function it(e,t){const r=(await t.json()).error;return tt.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function at({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function ot(e,{refreshToken:t}){const r=at(e);return r.append("Authorization",function(e){return`${Qe} ${e}`}(t)),r}async function lt(e){const t=await e();return t.status>=500&&t.status<600?e():t}function ct(e){return new Promise((t=>{setTimeout(t,e)}))}const ut=/^[cdef][\w-]{21}$/;function ft(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(r=e,btoa(String.fromCharCode(...r)).replace(/\+/g,"-").replace(/\//g,"_"));var r;return t.substr(0,22)}(e);return ut.test(t)?t:""}catch(e){return""}}function ht(e){return`${e.appName}!${e.appId}`}const dt=new Map;function pt(e,t){const r=ht(e);mt(r,t),function(e,t){const r=yt();r&&r.postMessage({key:e,fid:t});bt()}(r,t)}function mt(e,t){const r=dt.get(e);if(r)for(const n of r)n(t)}let gt=null;function yt(){return!gt&&"BroadcastChannel"in self&&(gt=new BroadcastChannel("[Firebase] FID Change"),gt.onmessage=e=>{mt(e.data.key,e.data.fid)}),gt}function bt(){0===dt.size&>&&(gt.close(),gt=null)}const vt="firebase-installations-store";let _t=null;function wt(){return _t||(_t=function(e,t,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const a=indexedDB.open(e,t),o=Ue(a);return n&&a.addEventListener("upgradeneeded",(e=>{n(Ue(a.result),e.oldVersion,e.newVersion,Ue(a.transaction))})),r&&a.addEventListener("blocked",(()=>r())),o.then((e=>{i&&e.addEventListener("close",(()=>i())),s&&e.addEventListener("versionchange",(()=>s()))})).catch((()=>{})),o}("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(vt)}})),_t}async function $t(e,t){const r=ht(e),n=(await wt()).transaction(vt,"readwrite"),s=n.objectStore(vt),i=await s.get(r);return await s.put(t,r),await n.done,i&&i.fid===t.fid||pt(e,t.fid),t}async function St(e){const t=ht(e),r=(await wt()).transaction(vt,"readwrite");await r.objectStore(vt).delete(t),await r.done}async function xt(e,t){const r=ht(e),n=(await wt()).transaction(vt,"readwrite"),s=n.objectStore(vt),i=await s.get(r),a=t(i);return void 0===a?await s.delete(r):await s.put(a,r),await n.done,!a||i&&i.fid===a.fid||pt(e,a.fid),a}async function jt(e){let t;const r=await xt(e.appConfig,(r=>{const n=function(e){const t=e||{fid:ft(),registrationStatus:0};return Ot(t)}(r),s=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(tt.create("app-offline"))}}
vendor: 2,067 bytes, line 1
1const r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=async function(e,t){try{const r=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:r}){const n=nt(e),s=at(e),i=t.getImmediate({optional:!0});if(i){const e=await i.getHeartbeatsHeader();e&&s.append("x-firebase-client",e)}const a={fid:r,authVersion:Qe,appId:e.appId,sdkVersion:Xe},o={method:"POST",headers:s,body:JSON.stringify(a)},l=await lt((()=>fetch(n,o)));if(l.ok){const e=await l.json();return{fid:e.fid||r,registrationStatus:2,refreshToken:e.refreshToken,authToken:st(e.authToken)}}throw await it("Create Installation",l)}(e,t);return $t(e.appConfig,r)}catch(r){throw rt(r)&&409===r.customData.serverCode?await St(e.appConfig):await $t(e.appConfig,{fid:t.fid,registrationStatus:0}),r}}(e,r);return{installationEntry:r,registrationPromise:n}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Et(e)}:{installationEntry:t}}(e,n);return t=s.registrationPromise,s.installationEntry}));return""===r.fid?{installationEntry:await t}:{installationEntry:r,registrationPromise:t}}async function Et(e){let t=await kt(e.appConfig);for(;1===t.registrationStatus;)await ct(100),t=await kt(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:r}=await jt(e);return r||t}return t}function kt(e){return xt(e,(e=>{if(!e)throw tt.create("installation-not-found");return Ot(e)}))}function Ot(e){return 1===(t=e).registrationStatus&&t.registrationTime+Je<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function Ct({appConfig:e,heartbeatServiceProvider:t},r){const n=function(e,{fid:t}){return`${nt(e)}/${t}/authTokens:generate`}(e,r),s=ot(e,r),i=t.getImmediate({optional:!0});if(i){const e=await i.getHeartbeatsHeader();e&&s.append("x-firebase-client",e)}const a={installation:{sdkVersion:Xe,appId:e.appId}},o={method:"POST",headers:s,body:JSON.stringify(a)},l=await lt((()=>fetch(n,o)));if(l.ok){return st(await l.json())}throw await it("Generate Auth Token",l)}async function At(e,t=!1){let r;const n=await xt(e.appConfig,(n=>
1{if(!Rt(n))throw tt.create("not-registered");const s=n.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+et}(e)}(s))return n;if(1===s.requestStatus)return r=async function(e,t){let r=await It(e.appConfig);for(;1===r.authToken.requestStatus;)await ct(100),r=await It(e.appConfig);const n=r.authToken;return 0===n.requestStatus?At(e,t):n}(e,t),n;{if(!navigator.onLine)throw tt.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(n);return r=async function(e,t){try{const r=await Ct(e,t),n=Object.assign(Object.assign({},t),{authToken:r});return await $t(e.appConfig,n),r}catch(r){if(!rt(r)||401!==r.customData.serverCode&&404!==r.customData.serverCode){const r=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await $t(e.appConfig,r)}else await St(e.appConfig);throw r}}(e,t),t}}));return r?await r:n.authToken}function It(e){return xt(e,(e=>{if(!Rt(e))throw tt.create("not-registered");const t=e.authToken;return 1===(r=t).requestStatus&&r.requestTime+Je<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e;var r}))}function Rt(e){return void 0!==e&&2===e.registrationStatus}async function Dt(e,t=!1){const r=e;await async function(e){const{registrationPromise:t}=await jt(e);t&&await t}(r);return(await At(r,t)).token}function Tt(e){return tt.create("missing-app-config-values",{valueName:e})}const Lt="installations",Mt=e=>{const t=we(e.getProvider("app").getImmediate(),Lt).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:r,registrationPromise:n}=await jt(t);return n?n.catch(console.error):At(t).catch(console.error),r.fid}(t),getToken:e=>Dt(t,e)}};_e(new Component(Lt,(e=>{const t=e.getProvider("app").getImmediate(),r=function(e){if(!e||!e.options)throw Tt("App Configuration");if(!e.name)throw Tt("App Name");const t=["projectId","apiKey","appId"];for(const r of t)if(!e.options[r])throw Tt(r);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:r,heartbeatServiceProvider:we(t,"heartbeat"),_delete:()=>Promise.resolve()}}),"PUBLIC")),_e(new Component("installations-internal",Mt,"PRIVATE")),xe(Ze,Ye),xe(Ze,Ye,"esm2017");const Pt="@firebase/remote-config",Ft="0.4.4";class RemoteConfigAbortSignal{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach((e=>e()))}}const Nt="remote-config",Bt=new ErrorFactory("remoteconfig","Remote Config",{"registration-window":"Undefined window object. This SDK only supports usage in a browser environment.","registration-project-id":"Undefined project identifier. Check Firebase app initialization.","registration-api-key":"Undefined API key. Check Firebase app initialization.","registration-app-id":"Undefined app identifier. Check Firebase app initialization.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","storage-delete":"Error thrown when deleting from storage. Original error: {$originalErrorMessage}.","fetch-client-network":"Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-timeout":'The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',"fetch-throttle":'The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',"fetch-client-parse":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","indexed-db-unavailable":"Indexed DB is not supported by current browser"});const qt=["1","true","t","yes","y","on"];class Value{constructor(e,t=""){this._source=e,this._value=t}asString(){return this._value}asBoolean(){return"static"!==this._source&&qt.indexOf(this._value.toLowerCase())>=0}asNumber(){if("static"===this._source)return 0;let e=Number(this._value);return isNaN(e)&&(e=0),e}getSource(){return this._source}}function zt(e=function(e=me){const t=ye.get(e);if(!t&&e===me&&h())return Se();if(!t)throw $e.create("no-app",{appName:e});return t}()){return we(e=b(e),Nt).getImmediate()}async function Ut(e){const t=b(e),r=new RemoteConfigAbortSignal;setTimeout((async()=>{r.abort()}),t.settings.fetchTimeoutMillis);try{await t._client.fetch({cacheMaxAgeMillis:t.settings.minimumFetchIntervalMillis,signal:r}),await t._storageCache.setLastFetchStatus("success")}catch(n){const e=function(e,t){return e instanceof FirebaseError&&-1!==e.code.indexOf(t)}(n,"fetch-throttle")?"throttle":"failure";throw await t._storageCache.setLastFetchStatus(e),n}}function Vt(e,t){const r=b(e);r._isInitializationComplete||r._logger.debug(`A value was requested for key "${t}" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.`);const n=r._storageCache.getActiveConfig();return n&&void 0!==n[t]?new Value("remote",n[t]):r.defaultConfig&&void 0!==r.defaultConfig[t]?new Value("default",String(r.defaultConfig[t])):(r._logger.debug(`Returning static value for key "${t}". Define a default or remote value if this is unintentional.`),new Value("static"))}class CachingClient{constructor(e,t,r,n){this.client=e,this.storage=t,this.storageCache=r,this.logger=n}
1isCachedDataFresh(e,t){if(!t)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;const r=Date.now()-t,n=r<=e;return this.logger.debug(`Config fetch cache check. Cache age millis: ${r}. Cache max age millis (minimumFetchIntervalMillis setting): ${e}. Is cache hit: ${n}.`),n}async fetch(e){const[t,r]=await Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()]);if(r&&this.isCachedDataFresh(e.cacheMaxAgeMillis,t))return r;e.eTag=r&&r.eTag;const n=await this.client.fetch(e),s=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())];return 200===n.status&&s.push(this.storage.setLastSuccessfulFetchResponse(n)),await Promise.all(s),n}}function Ht(e=navigator){return e.languages&&e.languages[0]||e.language}class RestClient{constructor(e,t,r,n,s,i){this.firebaseInstallations=e,this.sdkVersion=t,this.namespace=r,this.projectId=n,this.apiKey=s,this.appId=i}async fetch(e){const[t,r]=await Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()]),n=`${window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com"}/v1/projects/${this.projectId}/namespaces/${this.namespace}:fetch?key=${this.apiKey}`,s={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":e.eTag||"*"},i={sdk_version:this.sdkVersion,app_instance_id:t,app_instance_id_token:r,app_id:this.appId,language_code:Ht()},a={method:"POST",headers:s,body:JSON.stringify(i)},o=fetch(n,a),l=new Promise(((t,r)=>{e.signal.addEventListener((()=>{const e=new Error("The operation was aborted.");e.name="AbortError",r(e)}))}));let c;try{await Promise.race([o,l]),c=await o}catch(p){let e="fetch-client-network";throw"AbortError"===(null==p?void 0:p.name)&&(e="fetch-timeout"),Bt.create(e,{originalErrorMessage:null==p?void 0:p.message})}let u=c.status;const f=c.headers.get("ETag")||void 0;let h,d;if(200===c.status){let e;try{e=await c.json()}catch(p){throw Bt.create("fetch-client-parse",{originalErrorMessage:null==p?void 0:p.message})}h=e.entries,d=e.state}if("INSTANCE_STATE_UNSPECIFIED"===d?u=500:"NO_CHANGE"===d?u=304:"NO_TEMPLATE"!==d&&"EMPTY_CONFIG"!==d||(h={}),304!==u&&200!==u)throw Bt.create("fetch-status",{httpStatus:u});return{status:u,eTag:f,config:h}}}class RetryingClient{constructor(e,t){this.client=e,this.storage=t}async fetch(e){const t=await this.storage.getThrottleMetadata()||{backoffCount:0,throttleEndTimeMillis:Date.now()};return this.attemptFetch(e,t)}async attemptFetch(e,{throttleEndTimeMillis:t,backoffCount:r}){await function(e,t){return new Promise(((r,n)=>{const s=Math.max(t-Date.now(),0),i=setTimeout(r,s);e.addEventListener((()=>{clearTimeout(i),n(Bt.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}(e.signal,t);try{const t=await this.client.fetch(e);return await this.storage.deleteThrottleMetadata(),t}catch(n){if(!function(e){if(!(e instanceof FirebaseError&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(n))throw n;const t={throttleEndTimeMillis:Date.now()+y(r),backoffCount:r+1};return await this.storage.setThrottleMetadata(t),this.attemptFetch(e,t)}}}class RemoteConfig{constructor(e,t,r,n,s){this.app=e,this._client=t,this._storageCache=r,this._storage=n,this._logger=s,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}get fetchTimeMillis(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1}get lastFetchStatus(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"}}function Wt(e,t){const r=e.target.error||void 0;return Bt.create(t,{originalErrorMessage:r&&(null==r?void 0:r.message)})}const Gt="app_namespace_store";class Storage{constructor(e,t,r,n=function(){return new Promise(((e,t)=>{try{const r=indexedDB.open("firebase_remote_config",1);r.onerror=e=>{t(Wt(e,"storage-open"))},r.onsuccess=t=>{e(t.target.result)},r.onupgradeneeded=e=>{const t=e.target.result;0===e.oldVersion&&t.createObjectStore(Gt,{keyPath:"compositeKey"})}}catch(r){t(Bt.create("storage-open",{originalErrorMessage:null==r?void 0:r.message}))}}))}()){this.appId=e,this.appName=t,this.namespace=r,this.openDbPromise=n}getLastFetchStatus(){return this.get("last_fetch_status")}setLastFetchStatus(e){return this.set("last_fetch_status",e)}getLastSuccessfulFetchTimestampMillis(){return this.get("last_successful_fetch_timestamp_millis")}setLastSuccessfulFetchTimestampMillis(e){return this.set("last_successful_fetch_timestamp_millis",e)}getLastSuccessfulFetchResponse(){return this.get("last_successful_fetch_response")}setLastSuccessfulFetchResponse(e){return this.set("last_successful_fetch_response",e)}getActiveConfig(){return this.get("active_config")}setActiveConfig(e){return this.set("active_config",e)}getActiveConfigEtag(){return this.get("active_config_etag")}setActiveConfigEtag(e){return this.set("active_config_etag",e)}getThrottleMetadata(){return this.get("throttle_metadata")}setThrottleMetadata(e){return this.set("throttle_metadata",e)}deleteThrottleMetadata(){return this.delete("throttle_metadata")}async get(e){const t=await this.openDbPromise;return new Promise(((r,n)=>{const s=t.transaction([Gt],"readonly").objectStore(Gt),i=this.createCompositeKey(e);try{const e=s.get(i);e.onerror=e=>{n(Wt(e,"storage-get"))},e.onsuccess=e=>{const t=e.target.result;r(t?t.value:void 0)}}catch(a){n(Bt.create("storage-get",{originalErrorMessage:null==a?void 0:a.message}))}}))}async set(e,t){const r=await this.openDbPromise;return new Promise(((n,s)=>{const i=r.transaction([Gt],"readwrite").objectStore(Gt),a=this.createCompositeKey(e);try{const e=i.put({compositeKey:a,value:t});e.onerror=e=>{s(Wt(e,"storage-set"))},e.onsuccess=()=>{n()}}catch(o){s(Bt.create("storage-set",{originalErrorMessage:null==o?void 0:o.message}))}}))}async delete(e){const t=await this.openDbPromise;return new Promise(((r,n)=>{const s=t.transaction([Gt],"readwrite").objectStore(Gt),i=this.createCompositeKey(e);try{const e=s.delete(i);e.onerror=e=>{n(Wt(e,"storage-delete"))},e.onsuccess=()=>{r()}}catch(a){n(Bt.create("storage-delete",{originalErrorMessage:null==a?void 0:a.message}))}}))}createCompositeKey(e){return[this.appId,this.appName,this.namespace,e].join()}}class StorageCache{constructor(e){this.storage=e}getLastFetchStatus(){return this.lastFetchStatus}getLastSuccessfulFetchTimestampMillis(){return this.lastSuccessfulFetchTimestampMillis}getActiveConfig(){return this.activeConfig}async loadFromStorage(){const e=this.storage.getLastFetchStatus(),t=this.storage.getLastSuccessfulFetchTimestampMillis(),r=this.storage.getActiveConfig(),n=await e;n&&(this.lastFetchStatus=n);const s=await t;s&&(this.lastSuccessfulFetchTimestampMillis=s);const i=await r;i&&(this.activeConfig=i)}setLastFetchStatus(e){return this.lastFetchStatus=e,this.storage.setLastFetchStatus(e)}setLastSuccessfulFetchTimestampMillis(e){return this.lastSuccessfulFetchTimestampMillis=e,this.storage.setLastSuccessfulFetchTimestampMillis(e)}setActiveConfig(e){return this.activeConfig=e,this.storage.setActiveConfig(e)}}async function Kt(e){return e=b(e),await Ut(e),async function(e){const t=b(e),[r,n]=await Promise.all([t._storage.getLastSuccessfulFetchResponse(),t._storage.getActiveConfigEtag()]);return!!(r&&r.config&&r.eTag&&r.eTag!==n)&&(await Promise.all([t._storageCache.setActiveConfig(r.config),t._storage.setActiveConfigEtag(r.eTag)]),!0)}(e)}_e(new Component(Nt,(function(e,{instanceIdentifier:t}){const r=e.getProvider("app").getImmediate(),n=e.getProvider("installations-internal").getImmediate();if("undefined"==typeof window)throw Bt.create("registration-window");if(!d())throw Bt.create("indexed-db-unavailable");
1const{projectId:s,apiKey:i,appId:a}=r.options;if(!s)throw Bt.create("registration-project-id");if(!i)throw Bt.create("registration-api-key");if(!a)throw Bt.create("registration-app-id");t=t||"firebase";const o=new Storage(a,r.name,t),l=new StorageCache(o),c=new Logger(Pt);c.logLevel=w.ERROR;const u=new RestClient(n,"9.23.0",t,s,i,a),f=new RetryingClient(u,o),h=new CachingClient(f,o,l,c),p=new RemoteConfig(r,h,l,o,c);return function(e){const t=b(e);t._initializePromise||(t._initializePromise=t._storageCache.loadFromStorage().then((()=>{t._isInitializationComplete=!0}))),t._initializePromise}(p),p}),"PUBLIC").setMultipleInstances(!0)),xe(Pt,Ft),xe(Pt,Ft,"esm2017");var Zt=r(72903),Yt=r.n(Zt),Jt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},Xt=function(e){return e&&e.Math==Math&&e},Qt=Xt("object"==typeof globalThis&&globalThis)||Xt("object"==typeof window&&window)||Xt("object"==typeof self&&self)||Xt("object"==typeof Jt&&Jt)||function(){return this}()||Function("return this")(),er={},tr=function(e){try{return!!e()}catch(t){return!0}},rr=!tr((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),nr=!tr((function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),sr=nr,ir=Function.prototype.call,ar=sr?ir.bind(ir):function(){return ir.apply(ir,arguments)},or={},lr={}.propertyIsEnumerable,cr=Object.getOwnPropertyDescriptor,ur=cr&&!lr.call({1:2},1);or.f=ur?function(e){var t=cr(this,e);return!!t&&t.enumerable}:lr;var fr,hr,dr=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},pr=nr,mr=Function.prototype,gr=mr.call,yr=pr&&mr.bind.bind(gr,gr),br=pr?yr:function(e){return function(){return gr.apply(e,arguments)}},vr=br,_r=vr({}.toString),wr=vr("".slice),$r=function(e){return wr(_r(e),8,-1)},Sr=$r,xr=br,jr=function(e){if("Function"===Sr(e))return xr(e)},Er=tr,kr=$r,Or=Object,Cr=jr("".split),Ar=Er((function(){return!Or("z").propertyIsEnumerable(0)}))?function(e){return"String"==kr(e)?Cr(e,""):Or(e)}:Or,Ir=function(e){return null==e},Rr=Ir,Dr=TypeError,Tr=function(e){if(Rr(e))throw Dr("Can't call method on "+e);return e},Lr=Ar,Mr=Tr,Pr=function(e){return Lr(Mr(e))},Fr="object"==typeof document&&document.all,Nr={all:Fr,IS_HTMLDDA:void 0===Fr&&void 0!==Fr},Br=Nr.all,qr=Nr.IS_HTMLDDA?function(e){return"function"==typeof e||e===Br}:function(e){return"function"==typeof e},zr=qr,Ur=Nr.all,Vr=Nr.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:zr(e)||e===Ur}:function(e){return"object"==typeof e?null!==e:zr(e)},Hr=Qt,Wr=qr,Gr=function(e,t){return arguments.length<2?(r=Hr[e],Wr(r)?r:void 0):Hr[e]&&Hr[e][t];var r},Kr=jr({}.isPrototypeOf),Zr=Qt,Yr=Gr("navigator","userAgent")||"",Jr=Zr.process,Xr=Zr.Deno,Qr=Jr&&Jr.versions||Xr&&Xr.version,en=Qr&&Qr.v8;en&&(hr=(fr=en.split("."))[0]>0&&fr[0]<4?1:+(fr[0]+fr[1])),!hr&&Yr&&(!(fr=Yr.match(/Edge\/(\d+)/))||fr[1]>=74)&&(fr=Yr.match(/Chrome\/(\d+)/))&&(hr=+fr[1]);var tn=hr,rn=tr,nn=!!Object.getOwnPropertySymbols&&!rn((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&tn&&tn<41})),sn=nn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,an=Gr,on=qr,ln=Kr,cn=Object,un=sn?function(e){return"symbol"==typeof e}:function(e){var t=an("Symbol");return on(t)&&ln(t.prototype,cn(e))},fn=String,hn=qr,dn=function(e){try{return fn(e)}catch(t){return"Object"}},pn=TypeError,mn=function(e){if(hn(e))return e;throw pn(dn(e)+" is not a function")},gn=Ir,yn=ar,bn=qr,vn=Vr,_n=TypeError,wn={exports:{}},$n=Qt,Sn=Object.defineProperty,xn=function(e,t){try{Sn($n,e,{value:t,configurable:!0,writable:!0})}catch(r){$n[e]=t}return t},jn=xn,En="__core-js_shared__",kn=Qt[En]||jn(En,{}),On=kn;(wn.exports=function(e,t){return On[e]||(On[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.0",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Cn=Tr,An=Object,In=function(e){return An(Cn(e))},Rn=In,Dn=jr({}.hasOwnProperty),Tn=Object.hasOwn||function(e,t){return Dn(Rn(e),t)},Ln=jr,Mn=0,Pn=Math.random(),Fn=Ln(1..toString),Nn=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Fn(++Mn+Pn,36)},Bn=Qt,qn=wn.exports,zn=Tn,Un=Nn,Vn=nn,Hn=sn,Wn=qn("wks"),Gn=Bn.Symbol,Kn=Gn&&Gn.for,Zn=Hn?Gn:Gn&&Gn.withoutSetter||Un,Yn=function(e){if(!zn(Wn,e)||!Vn&&"string"!=typeof Wn[e]){var t="Symbol."+e;Vn&&zn(Gn,e)?Wn[e]=Gn[e]:Wn[e]=Hn&&Kn?Kn(t):Zn(t)}return Wn[e]},Jn=ar,Xn=Vr,Qn=un,es=function(e,t){var r=e[t];return gn(r)?void 0:mn(r)},ts=function(e,t){var r,n;if("string"===t&&bn(r=e.toString)&&!vn(n=yn(r,e)))return n;if(bn(r=e.valueOf)&&!vn(n=yn(r,e)))return n;if("string"!==t&&bn(r=e.toString)&&!vn(n=yn(r,e)))return n;throw _n("Can't convert object to primitive value")},rs=TypeError,ns=Yn("toPrimitive"),ss=function(e,t){if(!Xn(e)||Qn(e))return e;var r,n=es(e,ns);if(n){if(void 0===t&&(t="default"),r=Jn(n,e,t),!Xn(r)||Qn(r))return r;throw rs("Can't convert object to primitive value")}return void 0===t&&(t="number"),ts(e,t)},is=un,as=function(e){var t=ss(e,"string");return is(t)?t:t+""},os=Vr,ls=Qt.document,cs=os(ls)&&os(ls.createElement),us=function(e){return cs?ls.createElement(e):{}},fs=us,hs=!rr&&!tr((function(){return 7!=Object.defineProperty(fs("div"),"a",{get:function(){return 7}}).a})),ds=rr,ps=ar,ms=or,gs=dr,ys=Pr,bs=as,vs=Tn,_s=hs,ws=Object.getOwnPropertyDescriptor;er.f=ds?ws:function(e,t){if(e=ys(e),t=bs(t),_s)try{return ws(e,t)}catch(r){}if(vs(e,t))return gs(!ps(ms.f,e,t),e[t])};var $s={},Ss=rr&&tr((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xs=Vr,js=String,Es=TypeError,ks=function(e){if(xs(e))return e;throw Es(js(e)+" is not an object")},Os=rr,Cs=hs,As=Ss,Is=ks,Rs=as,Ds=TypeError,Ts=Object.defineProperty,Ls=Object.getOwnPropertyDescriptor,Ms="enumerable",Ps="configurable",Fs="writable";$s.f=Os?As?function(e,t,r){if(Is(e),t=Rs(t),Is(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Fs in r&&!r[Fs]){var n=Ls(e,t);n&&n[Fs]&&(e[t]=r.value,r={configurable:Ps in r?r[Ps]:n[Ps],enumerable:Ms in r?r[Ms]:n[Ms],writable:!1})}return Ts(e,t,r)}:Ts:function(e,t,r){if(Is(e),t=Rs(t),Is(r),Cs)try{return Ts(e,t,r)}catch(n){}if("get"in r||"set"in r)throw Ds("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Ns=$s,Bs=dr,qs=rr?function(e,t,r){return Ns.f(e,t,Bs(1,r))}:function(e,t,r){return e[t]=r,e},zs={exports:{}},Us=rr,Vs=Tn,Hs=Function.prototype,Ws=Us&&Object.getOwnPropertyDescriptor,Gs=Vs(Hs,"name"),Ks={EXISTS:Gs,PROPER:Gs&&"something"===(function(){}).name,CONFIGURABLE:Gs&&(!Us||Us&&Ws(Hs,"name").configurable)},Zs=qr,Ys=kn,Js=jr(Function.toString);Zs(Ys.inspectSource)||(Ys.inspectSource=function(e){return Js(e)});var Xs,Qs,ei,ti=Ys.inspectSource,ri=qr,ni=Qt.WeakMap,si=ri(ni)&&/native code/.test(String(ni)),ii=wn.exports,ai=Nn,oi=ii("keys"),li=function(e){return oi[e]||(oi[e]=ai(e))},ci={},ui=si,fi=Qt,hi=Vr,di=qs,pi=Tn,mi=kn,gi=li,yi=ci,bi="Object already initialized",vi=fi.TypeError,_i=fi.WeakMap;if(ui||mi.state){var wi=mi.state||(mi.state=new _i);wi.get=wi.get,wi.has=wi.has,wi.set=wi.set,Xs=function(e,t){if(wi.has(e))throw vi(bi);return t.facade=e,wi.set(e,t),t},Qs=function(e){return wi.get(e)||{}},ei=function(e){return wi.has(e)}}else{var $i=gi("state");yi[$i]=!0,Xs=function(e,t){if(pi(e,$i))throw vi(bi);return t.facade=e,di(e,$i,t),t},Qs=function(e){return pi(e,$i)?e[$i]:{}},ei=function(e){return pi(e,$i)}}var Si={set:Xs,get:Qs,has:ei,enforce:function(e){return ei(e)?Qs(e):Xs(e,{})},getterFor:function(e){return function(t){var r;if(!hi(t)||(r=Qs(t)).type!==e)throw vi("Incompatible receiver, "+e+" required");return r}}},xi=tr,ji=qr,Ei=Tn,ki=rr,Oi=Ks.CONFIGURABLE,Ci=ti,Ai=Si.enforce,Ii=Si.get,Ri=Object.defineProperty,Di=ki&&!xi((function(){return 8!==Ri((function(){}),"length",{value:8}).length})),Ti=String(String).split("String"),Li=zs.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Ei(e,"name")||Oi&&e.name!==t)&&(ki?Ri(e,"name",{value:t,configurable:!0}):e.name=t),Di&&r&&Ei(r,"arity")&&e.length!==r.arity&&Ri(e,"length",{value:r.arity});try{r&&Ei(r,"constructor")&&r.constructor?ki&&Ri(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(s){}var n=Ai(e);return Ei(n,"source")||(n.source=Ti.join("string"==typeof t?t:"")),e};Function.prototype.toString=Li((function(){return ji(this)&&Ii(this).source||Ci(this)}),"toString");var Mi=qr,Pi=$s,Fi=zs.exports,Ni=xn,Bi=function(e,t,r,n){n||(n={});var s=n.enumerable,i=void 0!==n.name?n.name:t;if(Mi(r)&&Fi(r,i,n),n.global)s?e[t]=r:Ni(t,r);
1else{try{n.unsafe?e[t]&&(s=!0):delete e[t]}catch(a){}s?e[t]=r:Pi.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},qi={},zi=Math.ceil,Ui=Math.floor,Vi=Math.trunc||function(e){var t=+e;return(t>0?Ui:zi)(t)},Hi=function(e){var t=+e;return t!=t||0===t?0:Vi(t)},Wi=Hi,Gi=Math.max,Ki=Math.min,Zi=Hi,Yi=Math.min,Ji=function(e){return e>0?Yi(Zi(e),9007199254740991):0},Xi=Pr,Qi=function(e,t){var r=Wi(e);return r<0?Gi(r+t,0):Ki(r,t)},ea=function(e){return Ji(e.length)},ta=function(e){return function(t,r,n){var s,i=Xi(t),a=ea(i),o=Qi(n,a);if(e&&r!=r){for(;a>o;)if((s=i[o++])!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===r)return e||o||0;return!e&&-1}},ra={includes:ta(!0),indexOf:ta(!1)},na=Tn,sa=Pr,ia=ra.indexOf,aa=ci,oa=jr([].push),la=function(e,t){var r,n=sa(e),s=0,i=[];for(r in n)!na(aa,r)&&na(n,r)&&oa(i,r);for(;t.length>s;)na(n,r=t[s++])&&(~ia(i,r)||oa(i,r));return i},ca=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ua=la,fa=ca.concat("length","prototype");qi.f=Object.getOwnPropertyNames||function(e){return ua(e,fa)};var ha={};ha.f=Object.getOwnPropertySymbols;var da=Gr,pa=qi,ma=ha,ga=ks,ya=jr([].concat),ba=da("Reflect","ownKeys")||function(e){var t=pa.f(ga(e)),r=ma.f;return r?ya(t,r(e)):t},va=Tn,_a=ba,wa=er,$a=$s,Sa=tr,xa=qr,ja=/#|\.prototype\./,Ea=function(e,t){var r=Oa[ka(e)];return r==Aa||r!=Ca&&(xa(t)?Sa(t):!!t)},ka=Ea.normalize=function(e){return String(e).replace(ja,".").toLowerCase()},Oa=Ea.data={},Ca=Ea.NATIVE="N",Aa=Ea.POLYFILL="P",Ia=Ea,Ra=Qt,Da=er.f,Ta=qs,La=Bi,Ma=xn,Pa=function(e,t,r){for(var n=_a(t),s=$a.f,i=wa.f,a=0;a<n.length;a++){var o=n[a];va(e,o)||r&&va(r,o)||s(e,o,i(t,o))}},Fa=Ia,Na=function(e,t){var r,n,s,i,a,o=e.target,l=e.global,c=e.stat;if(r=l?Ra:c?Ra[o]||Ma(o,{}):(Ra[o]||{}).prototype)for(n in t){if(i=t[n],s=e.dontCallGetSet?(a=Da(r,n))&&a.value:r[n],!Fa(l?n:o+(c?".":"#")+n,e.forced)&&void 0!==s){if(typeof i==typeof s)continue;Pa(i,s)}(e.sham||s&&s.sham)&&Ta(i,"sham",!0),La(r,n,i,e)}},Ba=la,qa=ca,za=Object.keys||function(e){return Ba(e,qa)},Ua=rr,Va=jr,Ha=ar,Wa=tr,Ga=za,Ka=ha,Za=or,Ya=In,Ja=Ar,Xa=Object.assign,Qa=Object.defineProperty,eo=Va([].concat),to=!Xa||Wa((function(){if(Ua&&1!==Xa({b:1},Xa(Qa({},"a",{enumerable:!0,get:function(){Qa(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=Xa({},e)[r]||Ga(Xa({},t)).join("")!=n}))?function(e,t){for(var r=Ya(e),n=arguments.length,s=1,i=Ka.f,a=Za.f;n>s;)for(var o,l=Ja(arguments[s++]),c=i?eo(Ga(l),i(l)):Ga(l),u=c.length,f=0;u>f;)o=c[f++],Ua&&!Ha(a,l,o)||(r[o]=l[o]);return r}:Xa,ro=to;Na({target:"Object",stat:!0,arity:2,forced:Object.assign!==ro},{assign:ro});var no={},so=rr,io=Ss,ao=$s,oo=ks,lo=Pr,co=za;no.f=so&&!io?Object.defineProperties:function(e,t){oo(e);for(var r,n=lo(t),s=co(t),i=s.length,a=0;i>a;)ao.f(e,r=s[a++],n[r]);return e};var uo,fo=Gr("document","documentElement"),ho=ks,po=no,mo=ca,go=ci,yo=fo,bo=us,vo="prototype",_o="script",wo=li("IE_PROTO"),$o=function(){},So=function(e){return"<"+_o+">"+e+"</"+_o+">"},xo=function(e){e.write(So("")),e.close();var t=e.parentWindow.Object;return e=null,t},jo=function(){try{uo=new ActiveXObject("htmlfile")}catch(s){}var e,t,r;jo="undefined"!=typeof document?document.domain&&uo?xo(uo):(t=bo("iframe"),r="java"+_o+":",t.style.display="none",yo.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(So("document.F=Object")),e.close(),e.F):xo(uo);for(var n=mo.length;n--;)delete jo[vo][mo[n]];return jo()};go[wo]=!0;var Eo=Object.create||function(e,t){var r;return null!==e?($o[vo]=ho(e),r=new $o,$o[vo]=null,r[wo]=e):r=jo(),void 0===t?r:po.f(r,t)},ko=Yn,Oo=Eo,Co=$s.f,Ao=ko("unscopables"),Io=Array.prototype;null==Io[Ao]&&Co(Io,Ao,{configurable:!0,value:Oo(null)});var Ro,Do,To,Lo={},Mo=!tr((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Po=Tn,Fo=qr,No=In,Bo=Mo,qo=li("IE_PROTO"),zo=Object,Uo=zo.prototype,Vo=Bo?zo.getPrototypeOf:function(e){var t=No(e);if(Po(t,qo))return t[qo];var r=t.constructor;return Fo(r)&&t instanceof r?r.prototype:t instanceof zo?Uo:null},Ho=tr,Wo=qr,Go=Vr,Ko=Vo,Zo=Bi,Yo=Yn("iterator"),Jo=!1;[].keys&&("next"in(To=[].keys())?(Do=Ko(Ko(To)))!==Object.prototype&&(Ro=Do):Jo=!0),(!Go(Ro)||Ho((function(){var e={};return Ro[Yo].call(e)!==e})))&&(Ro={}),Wo(Ro[Yo])||Zo(Ro,Yo,(function(){return this}));var Xo={IteratorPrototype:Ro,BUGGY_SAFARI_ITERATORS:Jo},Qo=$s.f,el=Tn,tl=Yn("toStringTag"),rl=function(e,t,r){e&&!r&&(e=e.prototype),e&&!el(e,tl)&&Qo(e,tl,{configurable:!0,value:t})},nl=Xo.IteratorPrototype,sl=Eo,il=dr,al=rl,ol=Lo,ll=function(){return this},cl=qr,ul=String,fl=TypeError,hl=jr,dl=ks,pl=function(e){if("object"==typeof e||cl(e))return e;throw fl("Can't set "+ul(e)+" as a prototype")},ml=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=hl(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return dl(r),pl(n),t?e(r,n):r.__proto__=n,r}}():void 0),gl=Na,yl=ar,bl=qr,vl=function(e,t,r,n){var s=t+" Iterator";return e.prototype=sl(nl,{next:il(+!n,r)}),al(e,s,!1),ol[s]=ll,e},_l=Vo,wl=ml,$l=rl,Sl=qs,xl=Bi,jl=Lo,El=Ks.PROPER,kl=Ks.CONFIGURABLE,Ol=Xo.IteratorPrototype,Cl=Xo.BUGGY_SAFARI_ITERATORS,Al=Yn("iterator"),Il="keys",Rl="values",Dl="entries",Tl=function(){return this}
1,Ll=Pr,Ml=function(e){Io[Ao][e]=!0},Pl=Lo,Fl=Si,Nl=$s.f,Bl=function(e,t,r,n,s,i,a){vl(r,t,n);var o,l,c,u=function(e){if(e===s&&m)return m;if(!Cl&&e in d)return d[e];switch(e){case Il:case Rl:case Dl:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[Al]||d["@@iterator"]||s&&d[s],m=!Cl&&p||u(s),g="Array"==t&&d.entries||p;if(g&&(o=_l(g.call(new e)))!==Object.prototype&&o.next&&(_l(o)!==Ol&&(wl?wl(o,Ol):bl(o[Al])||xl(o,Al,Tl)),$l(o,f,!0)),El&&s==Rl&&p&&p.name!==Rl&&(kl?Sl(d,"name",Rl):(h=!0,m=function(){return yl(p,this)})),s)if(l={values:u(Rl),keys:i?m:u(Il),entries:u(Dl)},a)for(c in l)(Cl||h||!(c in d))&&xl(d,c,l[c]);else gl({target:t,proto:!0,forced:Cl||h},l);return d[Al]!==m&&xl(d,Al,m,{name:s}),jl[t]=m,l},ql=function(e,t){return{value:e,done:t}},zl=rr,Ul="Array Iterator",Vl=Fl.set,Hl=Fl.getterFor(Ul),Wl=Bl(Array,"Array",(function(e,t){Vl(this,{type:Ul,target:Ll(e),index:0,kind:t})}),(function(){var e=Hl(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,ql(void 0,!0)):ql("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Gl=Pl.Arguments=Pl.Array;if(Ml("keys"),Ml("values"),Ml("entries"),zl&&"values"!==Gl.name)try{Nl(Gl,"name",{value:"values"})}catch(jc){}var Kl=us("span").classList,Zl=Kl&&Kl.constructor&&Kl.constructor.prototype,Yl=Zl===Object.prototype?void 0:Zl,Jl=Qt,Xl={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ql=Yl,ec=Wl,tc=qs,rc=Yn,nc=rc("iterator"),sc=rc("toStringTag"),ic=ec.values,ac=function(e,t){if(e){if(e[nc]!==ic)try{tc(e,nc,ic)}catch(jc){e[nc]=ic}if(e[sc]||tc(e,sc,t),Xl[t])for(var r in ec)if(e[r]!==ec[r])try{tc(e,r,ec[r])}catch(jc){e[r]=ec[r]}}};for(var oc in Xl)ac(Jl[oc]&&Jl[oc].prototype,oc);ac(Ql,"DOMTokenList");const lc=Yt().object({apiKey:Yt().string().required(),authDomain:Yt().string().required(),projectId:Yt().string().required(),appId:Yt().string().required(),measurementId:Yt().string().required(),storageBucket:Yt().string().optional(),messagingSenderId:Yt().string().optional()}),cc=e=>!!Object.keys(e).length,uc=({defaultFlags:e,firebaseConfig:t,ignoreFirebase:r})=>{const[n,s]=i().useState(e),[a,o]=i().useState(!0),[l,c]=i().useState(!1);return i().useEffect((()=>{const t=cc(e);if(r&&!l&&t)return console.info("Firebase is turned off for feature flags. Flags are served from the defaultFlags object."),void c(!0)}),[e,r,l]),i().useEffect((()=>{o(!0);const n=(e=>{var t,r;return!(null===(r=null===(t=lc.validate(e).error)||void 0===t?void 0:t.details)||void 0===r?void 0:r.length)})(t),i=cc(e);if(l||r||!(n&&i))o(!1);else{const r={},n=zt(Se(t));n.settings.minimumFetchIntervalMillis=18e5,Kt(n).then((()=>{for(const[s]of Object.entries(e))try{const e=Vt(n,s).asBoolean();r[s]=e}catch(t){console.error(t)}s(r),c(!0),console.info("Feature flags initialised with firebase!"),o(!1)})).catch((e=>{console.error(e),o(!1)}))}}),[e,t,l,r]),{featureFlags:n,isLoading:a}};var fc=zs.exports,hc=$s,dc=ks,pc=rr,mc=function(e,t,r){return r.get&&fc(r.get,t,{getter:!0}),r.set&&fc(r.set,t,{setter:!0}),hc.f(e,t,r)},gc=function(){var e=dc(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},yc=tr,bc=Qt.RegExp,vc=bc.prototype;pc&&yc((function(){var e=!0;try{bc(".","d")}catch(jc){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",s=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(i.hasIndices="d"),i)s(a,i[a]);return Object.getOwnPropertyDescriptor(vc,"flags").get.call(t)!==n||r!==n}))&&mc(vc,"flags",{configurable:!0,get:gc});const _c="flagOverrides",wc={set(e,t){const r=wc.getAll(),n=JSON.stringify(Object.assign(Object.assign({},r),{[e]:t}));localStorage.setItem(_c,n)},resetAll(){localStorage.removeItem(_c)},getAll:()=>JSON.parse(localStorage.getItem(_c))||{},getValue:e=>wc.getAll()[e]},$c=()=>{const e=i().useContext(Sc);if(void 0===e)throw new Error("useFeatureFlagContext must be within FeatureProvider");const{isLoading:t}=e;return{isFeatureOn:t=>{const r=wc.getValue(t);return void 0!==r?r:Object.prototype.hasOwnProperty.call(e.flags,t)?e.flags[t]:!!e.defaultFlags[t]&&(console.warn(`${t} is returned from default values. Maybe it's not in firebase, or firebase is down.`),e.defaultFlags[t])},isLoading:t}},Sc=i().createContext({flags:{},defaultFlags:{},ignoreFirebase:!1,isLoading:!1}),xc=({children:e,defaultFlags:t,firebaseConfig:r,ignoreFirebase:i=!1,fallback:a=null})=>{(0,s.useEffect)((()=>{window.featureOverrides=wc}),[]);const{featureFlags:o,isLoading:l}=uc({defaultFlags:t,firebaseConfig:r,ignoreFirebase:i});return l&&a?a:(0,n.jsx)(Sc.Provider,Object.assign({value:{flags:o,defaultFlags:t,ignoreFirebase:i,isLoading:l}},{children:e}))}},72903:e=>{var t;self,t=()=>{return e={7629:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(9474),a=r(1687),o=r(8652),l=r(8160),c=r(3292),u=r(6354),f=r(8901),h=r(9708),d=r(6914),p=r(2294),m=r(6133),g=r(1152),y=r(8863),b=r(2036),v={Base:class{constructor(e){this.type=e,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new p.Ids,this._preferences=null,this._refs=new m.Manager,this._cache=null,this._val
vendor: 29,190 bytes, line 1
1ids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return n("function"==typeof h.describe,"Manifest functionality disabled"),h.describe(this)}allow(...e){return l.verifyFlat(e,"allow"),this._values(e,"_valids")}alter(e){n(e&&"object"==typeof e&&!Array.isArray(e),"Invalid targets argument"),n(!this._inRuleset(),"Cannot set alterations inside a ruleset");const t=this.clone();t.$_terms.alterations=t.$_terms.alterations||[];for(const r in e){const s=e[r];n("function"==typeof s,"Alteration adjuster for",r,"must be a function"),t.$_terms.alterations.push({target:r,adjuster:s})}return t.$_temp.ruleset=!1,t}artifact(e){return n(void 0!==e,"Artifact cannot be undefined"),n(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",e)}cast(e){return n(!1===e||"string"==typeof e,"Invalid to value"),n(!1===e||this._definition.cast[e],"Type",this.type,"does not support casting to",e),this.$_setFlag("cast",!1===e?void 0:e)}default(e,t){return this._default("default",e,t)}description(e){return n(e&&"string"==typeof e,"Description must be a non-empty string"),this.$_setFlag("description",e)}empty(e){const t=this.clone();return void 0!==e&&(e=t.$_compile(e,{override:!1})),t.$_setFlag("empty",e,{clone:!1})}error(e){return n(e,"Missing error"),n(e instanceof Error||"function"==typeof e,"Must provide a valid Error object or a function"),this.$_setFlag("error",e)}example(e,t={}){return n(void 0!==e,"Missing example"),l.assertOptions(t,["override"]),this._inner("examples",e,{single:!0,override:t.override})}external(e,t){return"object"==typeof e&&(n(!t,"Cannot combine options with description"),t=e.description,e=e.method),n("function"==typeof e,"Method must be a function"),n(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this._inner("externals",{method:e,description:t},{single:!0})}failover(e,t){return this._default("failover",e,t)}forbidden(){return this.presence("forbidden")}id(e){return e?(n("string"==typeof e,"id must be a non-empty string"),n(/^[^\.]+$/.test(e),"id cannot contain period character"),this.$_setFlag("id",e)):this.$_setFlag("id",void 0)}invalid(...e){return this._values(e,"_invalids")}label(e){return n(e&&"string"==typeof e,"Label name must be a non-empty string"),this.$_setFlag("label",e)}meta(e){return n(void 0!==e,"Meta cannot be undefined"),this._inner("metas",e,{single:!0})}note(...e){n(e.length,"Missing notes");for(const t of e)n(t&&"string"==typeof t,"Notes must be non-empty strings");return this._inner("notes",e)}only(e=!0){return n("boolean"==typeof e,"Invalid mode:",e),this.$_setFlag("only",e)}optional(){return this.presence("optional")}prefs(e){n(e,"Missing preferences"),n(void 0===e.context,"Cannot override context"),n(void 0===e.externals,"Cannot override externals"),n(void 0===e.warnings,"Cannot override warnings"),n(void 0===e.debug,"Cannot override debug"),l.checkPreferences(e);const t=this.clone();return t._preferences=l.preferences(t._preferences,e),t}presence(e){return n(["optional","required","forbidden"].includes(e),"Unknown presence mode",e),this.$_setFlag("presence",e)}raw(e=!0){return this.$_setFlag("result",e?"raw":void 0)}result(e){return n(["raw","strip"].includes(e),"Unknown result mode",e),this.$_setFlag("result",e)}required(){return this.presence("required")}strict(e){const t=this.clone(),r=void 0!==e&&!e;return t._preferences=l.preferences(t._preferences,{convert:r}),t}strip(e=!0){return this.$_setFlag("result",e?"strip":void 0)}tag(...e){n(e.length,"Missing tags");for(const t of e)n(t&&"string"==typeof t,"Tags must be non-empty strings");return this._inner("tags",e)}unit(e){return n(e&&"string"==typeof e,"Unit name must be a non-empty string"),this.$_setFlag("unit",e)}valid(...e){l.verifyFlat(e,"valid");const t=this.allow(...e);return t.$_setFlag("only",!!t._valids,{clone:!1}),t}when(e,t){const r=this.clone();r.$_terms.whens||(r.$_terms.whens=[]);const s=c.when(r,e,t);if(!["any","link"].includes(r.type)){const e=s.is?[s]:s.switch;for(const t of e)n(!t.then||"any"===t.then.type||t.then.type===r.type,"Cannot combine",r.type,"with",t.then&&t.then.type),n(!t.otherwise||"any"===t.otherwise.type||t.otherwise.type===r.type,"Cannot combine",r.type,"with",t.otherwise&&t.otherwise.type)}return r.$_terms.whens.push(s),r.$_mutateRebuild()}cache(e){n(!this._inRuleset(),"Cannot set caching inside a ruleset"),n(!this._cache,"Cannot override schema cache"),n(void 0===this._flags.artifact,"Cannot cache a rule with an artifact");const t=this.clone();return t._cache=e||o.provider.provision(),t.$_temp.ruleset=!1,t}clone(){const e=Object.create(Object.getPrototypeOf(this));return this._assign(e)}concat(e){n(l.isSchema(e),"Invalid schema object"),n("any"===this.type||"any"===e.type||e.type===this.type,"Cannot merge type",this.type,"with another type:",e.type),n(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),n(!e._inRuleset(),"Cannot concatenate a schema with open ruleset");let t=this.clone();if("any"===this.type&&"any"!==e.type){const r=e.clone();for(const e of Object.keys(t))"type"!==e&&(r[e]=t[e]);t=r}t._ids.concat(e._ids),t._refs.register(e,m.toSibling),t._preferences=t._preferences?l.preferences(t._preferences,e._preferences):e._preferences,t._valids=b.merge(t._valids,e._valids,e._invalids),t._invalids=b.merge(t._invalids,e._invalids,e._valids);for(const r of e._singleRules.keys())t._singleRules.has(r)&&(t._rules=t._rules.filter((e=>e.keep||e.name!==r)),t._singleRules.delete(r));for(const r of e._rules)e._definition.rules[r.method].multi||t._singleRules.set(r.name,r),t._rules.push(r);if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);const r=Object.assign({},e._flags);delete r.empty,a(t._flags,r)}else if(e._flags.empty){t._flags.empty=e._flags.empty;const r=Object.assign({},e._flags);delete r.empty,a(t._flags,r)}else a(t._flags,e._flags);for(const r in e.$_terms){const n=e.$_terms[r];n?t.$_terms[r]?t.$_terms[r]=t.$_terms[r].concat(n):t.$_terms[r]=n.slice():t.$_terms[r]||(t.$_terms[r]=n)}return this.$_root._tracer&&this.$_root._tracer._combine(t,[this,e]),t.$_mutateRebuild()}extend(e){return n(!e.base,"Cannot extend type with another base"),f.type(this,e)}extract(e){return e=Array.isArray(e)?e:e.split("."),this._ids.reach(e)}fork(e,t){n(!this._inRuleset(),"Cannot fork inside a ruleset");let r=this;for(let n of[].concat(e))n=Array.isArray(n)?n:n.split("."),r=r._ids.fork(n,t,r);return r.$_temp.ruleset=!1,r}rule(e){const t=this._definition;l.assertOptions(e,Object.keys(t.modifiers)),n(!1!==this.$_temp.ruleset,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const r=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;n(r>=0&&r<this._rules.length,"Cannot apply rules to empty ruleset");const i=this.clone();for(let a=r;a<i._rules.length;++a){const r=i._rules[a],o=s(r);for(const s in e)t.modifiers[s](o,e[s]),n(o.name===r.name,"Cannot change rule name");i._rules[a]=o,i._singleRules.get(o.name)===r&&i._singleRules.set(o.name,o)}return i.$_temp.ruleset=!1,i.$_mutateRebuild()}get ruleset(){n(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const e=this.clone();return e.$_temp.ruleset=e._rules.length,e}get $(){return this.ruleset}tailor(e){e=[].concat(e),n(!this._inRuleset(),"Cannot tailor inside a ruleset");let t=this;if(this.$_terms.alterations)for(const{target:r,adjuster:s}of this.$_terms.alterations)e.includes(r)&&(t=s(t),n(l.isSchema(t),"Alteration adjuster for",r,"failed to return a schema object"));return t=t.$_modify({each:t=>t.tailor(e),ref:!1}),t.$_temp.ruleset=!1,t.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(e,t){return y.entry(e,this,t)}validateAsync(e,t){return y.entryAsync(e,this,t)}$_addRule(e){"string"==typeof e&&(e={name:e}),n(e&&"object"==typeof e,"Invalid options"),n(e.name&&"string"==typeof e.name,"Invalid rule name");for(const a in e)n("_"!==a[0],"Cannot set private rule properties");const t=Object.assign({},e);t._resolve=[],t.method=t.method||t.name;const r=this._definition.rules[t.method],s=t.args;n(r,"Unknown rule",t.method);const i=this.clone();if(s){n(1===Object.keys(s).length||Object.keys(s).length===this._definition.rules[t.name].args.length,"Invalid rule definition for",this.type,t.name);for(const e in s){let a=s[e];if(r.argsByName){const o=r.argsByName.get(e);if(o.ref&&l.isResolvable(a))t._resolve.push(e),i.$_mutateRegister(a);else if(o.normalize&&(a=o.normalize(a),s[e]=a),o.assert){const t=l.validateArg(a,e,o);n(!t,t,"or reference")}}void 0!==a?s[e]=a:delete s[e]}}return r.multi||(i._ruleRemove(t.name,{clone:!1}),i._singleRules.set(t.name,t)),!1===i.$_temp.ruleset&&(i.$_temp.ruleset=null),r.priority?i._rules.unshift(t):i._rules.push(t),i}$_compile(e,t){return c.schema(this.$_root,e,t)}$_createError(e,t,r,n,s,i={}){const a=!1!==i.flags?this._flags:{},o=i.messages?d.merge(this._definition.messages,i.messages):this._definition.messages;return new u.Report(e,t,r,a,o,n,s)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){return e=Array.isArray(e)?e:e.split("."),this._ids.labels(e)}$_match(e,t,r,n){(r=Object.assign({},r)).abortEarly=!0,r._externals=!1,t.snapshot();const s=!y.validate(e,this,t,r,n).errors;return t.restore(),s}$_modify(e){return l.assertOptions(e,["each","once","ref","schema"]),p.schema(this,e)||this}$_mutateRebuild(){return n(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(e,{source:t,name:r,path:n,key:s})=>{const i=this._definition[t][r]&&this._definition[t][r].register;!1!==i&&this.$_mutateRegister(e,{family:i,key:s})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(e,{family:t,key:r}={}){this._refs.register(e,t),this._ids.register(e,{key:r})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t,r={}){n("_"===e[0]||!this._inRuleset(),"Cannot set flag inside a ruleset");const s=this._definition.flags[e]||{};if(i(t,s.default)&&(t=void 0),i(t,this._flags[e]))return this;const a=!1!==r.clone?this.clone():this;return void 0!==t?(a._flags[e]=t,a.$_mutateRegister(t)):delete a._flags[e],"_"!==e[0]&&(a.$_temp.ruleset=!1),a}$_parent(e,...t){return this[e][l.symbols.parent].call(this,...t)}$_validate(e,t,r){return y.validate(e,this,t,r)}_assign(e){e.type=this.type,e.$_root=this.$_root,e.$_temp=Object.assign({},this.$_temp),e.$_temp.whens={},e._ids=this._ids.clone(),e._preferences=this._preferences,e._valids=this._valids&&this._valids.clone(),e._invalids=this._invalids&&this._invalids.clone(),e._rules=this._rules.slice(),e._singleRules=s(this._singleRules,{shallow:!0}),e._refs=this._refs.clone(),e._flags=Object.assign({},this._flags),e._cache=null,e.$_terms={};for(const t in this.$_terms)e.$_terms[t]=this.$_terms[t]?this.$_terms[t].slice():null;e.$_super={};for(const t in this.$_super)e.$_super[t]=this._super[t].bind(e);return e}_bare(){const e=this.clone();e._reset();const t=e._definition.terms;for(const r in t){const n=t[r];e.$_terms[r]=n.init}return e.$_mutateRebuild()}_default(e,t,r={}){return l.assertOptions(r,"literal"),n(void 0!==t,"Missing",e,"value"),n("function"==typeof t||!r.literal,"Only function value supports literal option"),"function"==typeof t&&r.literal&&(t={[l.symbols.literal]:!0,literal:t}),this.$_setFlag(e,t)}_generate(e,t,r){if(!this.$_terms.whens)return{schema:this};const n=[],s=[];for(let o=0;o<this.$_terms.whens.length;++o){const i=this.$_terms.whens[o];if(i.concat){n.push(i.concat),s.push(`${o}.concat`);continue}const a=i.ref?i.ref.resolve(e,t,r):e,l=i.is?[i]:i.switch,c=s.length;for(let u=0;u<l.length;++u){const{is:c,then:f,otherwise:h}=l[u],d=`${o}${i.switch?"."+u:""}`;if(c.$_match(a,t.nest(c,`${d}.is`),r)){if(f){const i=t.localize([...t.path,`${d}.then`],t.ancestors,t.schemas),{schema:a,id:o}=f._generate(e,i,r);n.push(a),s.push(`${d}.then${o?`(${o})`:""}`);break}}else if(h){const i=t.localize([...t.path,`${d}.otherwise`],t.ancestors,t.schemas),{schema:a,id:o}=h._generate(e,i,r);n.push(a),s.push(`${d}.otherwise${o?`(${o})`:""}`);break}}if(i.break&&s.length>c)break}const i=s.join(", ");if(t.mainstay.tracer.debug(t,"rule","when",i),!i)return{schema:this};if(!t.mainstay.tracer.active&&this.$_temp.whens[i])return{schema:this.$_temp.whens[i],id:i};let a=this;this._definition.generate&&(a=this._definition.generate(this,e,t,r));for(const o of n)a=a.concat(o);return this.$_root._tracer&&this.$_root._tracer._combine(a,[this,...n]),this.$_temp.whens[i]=a,{schema:a,id:i}}_inner(e,t,r={}){n(!this._inRuleset(),`Cannot set ${e} inside a ruleset`);const s=this.clone();return s.$_terms[e]&&!r.override||(s.$_terms[e]=[]),r.single?s.$_terms[e].push(t):s.$_terms[e].push(...t),s.$_temp.ruleset=!1,s}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(e,t={}){if(!this._singleRules.has(e))return this;const r=!1!==t.clone?this.clone():this;r._singleRules.delete(e);const n=[];for(let s=0;s<r._rules.length;++s){const t=r._rules[s];t.name!==e||t.keep?n.push(t):r._inRuleset()&&s<r.$_temp.ruleset&&--r.$_temp.ruleset}return r._rules=n,r}_values(e,t){l.verifyFlat(e,t.slice(1,-1));const r=this.clone(),s=e[0]===l.symbols.override;if(s&&(e=e.slice(1)),!r[t]&&e.length?r[t]=new b:s&&(r[t]=e.length?new b:null,r.$_mutateRebuild()),!r[t])return r;s&&r[t].override();for(const i of e){n(void 0!==i,"Cannot call allow/valid/invalid with undefined"),n(i!==l.symbols.override,"Override must be the first value");const e="_invalids"===t?"_valids":"_invalids";r[e]&&(r[e].remove(i),r[e].length||(n("_valids"===t||!r._flags.only,"Setting invalid value",i,"leaves schema rejecting all values due to previous valid rule"),r[e]=null)),r[t].add(i,r._refs)}return r}}};v.Base.prototype[l.symbols.any]={version:l.version,compile:c.compile,root:"$_root"},v.Base.prototype.isImmutable=!0,v.Base.prototype.deny=v.Base.prototype.invalid,v.Base.prototype.disallow=v.Base.prototype.invalid,v.Base.prototype.equal=v.Base.prototype.valid,v.Base.prototype.exist=v.Base.prototype.required,v.Base.prototype.not=v.Base.prototype.invalid,v.Base.prototype.options=v.Base.prototype.prefs,v.Base.prototype.preferences=v.Base.prototype.prefs,e.exports=new v.Base},8652:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(8160),a={max:1e3,supported:new Set(["undefined","boolean","number","string"])};t.provider={provision:e=>new a.Cache(e)},a.Cache=class{constructor(e={}){i.assertOptions(e,["max"]),n(void 0===e.max||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||a.max,this._map=new Map,this._list=new a.List}get length(){return this._map.size}set(e,t){if(null!==e&&!a.supported.has(typeof e))return;let r=this._map.get(e);if(r)return r.value=t,void this._list.first(r);r=this._list.unshift({key:e,value:t}),this._map.set(e,r),this._compact()}get(e){const t=this._map.get(e);if(t)return this._list.first(t),s(t.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},a.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:t,prev:r}=e;return t.prev=r,r&&(r.next=t),e===this.tail&&(this.tail=t),e.prev=null,e.next=null,e}}},8160:(e,t,r)=>{"use strict";const n=r(375),s=r(7916),i=r(5934);let a,o;const l={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};t.version=i.version,t.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},t.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},t.assertOptions=function(e,t,r="Options"){n(e&&"object"==typeof e&&!Array.isArray(e),"Options must be of type object");const s=Object.keys(e).filter((e=>!t.includes(e)));n(0===s.length,`${r} contain unknown keys: ${s}`)},t.checkPreferences=function(e){o=o||r(3378);const t=o.preferences.validate(e);if(t.error)throw new s([t.error.details[0].message])},t.compare=function(e,t,r){switch(r){case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}},t.default=function(e,t){return void 0===e?t:e},t.isIsoDate=function(e){return l.isoDate.test(e)},t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},t.isResolvable=function(e){return!!e&&(e[t.symbols.ref]||e[t.symbols.template])},t.isSchema=function(e,r={}){const s=e&&e[t.symbols.any];return!!s&&(n(r.legacy||s.version===t.version,"Cannot mix different versions of joi schemas"),!0)},t.isValues=function(e){return e[t.symbols.values]},t.limit=function(e){return Number.isSafeInteger(e)&&e>=0},t.preferences=function(e,n){a=a||r(6914),e=e||{},n=n||{};const s=Object.assign({},e,n);return n.errors&&e.errors&&(s.errors=Object.assign({},e.errors,n.errors),s.errors.wrap=Object.assign({},e.errors.wrap,n.errors.wrap)),n.messages&&(s.messages=a.compile(n.messages,e.messages)),delete s[t.symbols.prefs],s},t.tryWithPath=function(e,t,r={}){try{return e()}catch(e){throw void 0!==e.path?e.path=t+"."+e.path:e.path=t,r.append&&(e.message=`${e.message} (${e.path})`),e}},t.validateArg=function(e,r,{assert:n,message:s}){if(t.isSchema(n)){const t=n.validate(e);if(!t.error)return;return t.error.message}if(!n(e))return r?`${r} ${s}`:s},t.verifyFlat=function(e,t){for(const r of e)n(!Array.isArray(r),"Method no longer accepts array arguments:",t)}},3292:(e,t,r)=>{"use strict";const n=r(375),s=r(8160),i=r(6133),a={};t.schema=function(e,t,r={}){s.assertOptions(r,["appendPath","override"]);try{return a.schema(e,t,r)}catch(e){throw r.appendPath&&void 0!==e.path&&(e.message=`${e.message} (${e.path})`),e}},a.schema=function(e,t,r){n(void 0!==t,"Invalid undefined schema"),Array.isArray(t)&&(n(t.length,"Invalid empty array schema"),1===t.length&&(t=t[0]));const i=(t,...n)=>!1!==r.override?t.valid(e.override,...n):t.valid(...n);if(a.simple(t))return i(e,t);if("function"==typeof t)return e.custom(t);if(n("object"==typeof t,"Invalid schema content:",typeof t),s.isResolvable(t))return i(e,t);if(s.isSchema(t))return t;if(Array.isArray(t)){for(const r of t)if(!a.simple(r))return e.alternatives().try(...t);return i(e,...t)}return t instanceof RegExp?e.string().regex(t):t instanceof Date?i(e.date(),t):(n(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(t))},t.ref=function(e,t){return i.isRef(e)?e:i.create(e,t)},t.compile=function(e,r,i={}){s.assertOptions(i,["legacy"]);const o=r&&r[s.symbols.any];if(o)return n(i.legacy||o.version===s.version,"Cannot mix different versions of joi schemas:",o.version,s.version),r;if("object"!=typeof r||!i.legacy)return t.schema(e,r,{appendPath:!0});const l=a.walk(r);return l?l.compile(l.root,r):t.schema(e,r,{appendPath:!0})},a.walk=function(e){if("object"!=typeof e)return null;if(Array.isArray(e)){for(const t of e){const e=a.walk(t);if(e)return e}return null}const t=e[s.symbols.any];if(t)return{root:e[t.root],compile:t.compile};n(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const r in e){const t=a.walk(e[r]);if(t)return t}return null},a.simple=function(e){return null===e||["boolean","string","number"].includes(typeof e)},t.when=function(e,r,o){if(void 0===o&&(n(r&&"object"==typeof r,"Missing options"),o=r,r=i.create(".")),Array.isArray(o)&&(o={switch:o}),s.assertOptions(o,["is","not","then","otherwise","switch","break"]),s.isSchema(r))return n(void 0===o.is,'"is" can not be used with a schema condition'),n(void 0===o.not,'"not" can not be used with a schema condition'),n(void 0===o.switch,'"switch" can not be used with a schema condition'),a.condition(e,{is:r,then:o.then,otherwise:o.otherwise,break:o.break});if(n(i.isRef(r)||"string"==typeof r,"Invalid condition:",r),n(void 0===o.not||void 0===o.is,'Cannot combine "is" with "not"'),void 0===o.switch){let l=o;void 0!==o.not&&(l={is:o.not,then:o.otherwise,otherwise:o.then,break:o.break});let c=void 0!==l.is?e.$_compile(l.is):e.$_root.invalid(null,!1,0,"").required();return n(void 0!==l.then||void 0!==l.otherwise,'options must have at least one of "then", "otherwise", or "switch"'),n(void 0===l.break||void 0===l.then||void 0===l.otherwise,"Cannot specify then, otherwise, and break all together"),void 0===o.is||i.isRef(o.is)||s.isSchema(o.is)||(c=c.required()),a.condition(e,{ref:t.ref(r),is:c,then:l.then,otherwise:l.otherwise,break:l.break})}n(Array.isArray(o.switch),'"switch" must be an array'),n(void 0===o.is,'Cannot combine "switch" with "is"'),n(void 0===o.not,'Cannot combine "switch" with "not"'),n(void 0===o.then,'Cannot combine "switch" with "then"');const l={ref:t.ref(r),switch:[],break:o.break};for(let t=0;t<o.switch.length;++t){const r=o.switch[t],a=t===o.switch.length-1;s.assertOptions(r,a?["is","then","otherwise"]:["is","then"]),n(void 0!==r.is,'Switch statement missing "is"'),n(void 0!==r.then,'Switch statement missing "then"');const c={is:e.$_compile(r.is),then:e.$_compile(r.then)};if(i.isRef(r.is)||s.isSchema(r.is)||(c.is=c.is.required()),a){n(void 0===o.otherwise||void 0===r.otherwise,'Cannot specify "otherwise" inside and outside a "switch"');const t=void 0!==o.otherwise?o.otherwise:r.otherwise;void 0!==t&&(n(void 0===l.break,"Cannot specify both otherwise and break"),c.otherwise=e.$_compile(t))}l.switch.push(c)}return l},a.condition=function(e,t){for(const r of["then","otherwise"])void 0===t[r]?delete t[r]:t[r]=e.$_compile(t[r]);return t}},6354:(e,t,r)=>{"use strict";const n=r(5688),s=r(8160),i=r(3328);t.Report=class{constructor(e,r,n,s,i,a,o){if(this.code=e,this.flags=s,this.messages=i,this.path=a.path,this.prefs=o,this.state=a,this.value=r,this.message=null,this.template=null,this.local=n||{},this.local.label=t.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const e=this.path[this.path.length-1];"object"!=typeof e&&(this.local.key=e)}}_setTemplate(e){if(this.template=e,!this.flags.label&&0===this.path.length){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const e=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===t?`Error code "${e}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(e,r){return t.template(this.value,e,r||this.code,this.state,this.prefs)}},t.path=function(e){let t="";for(const r of e)"object"!=typeof r&&("string"==typeof r?(t&&(t+="."),t+=r):t+=`[${r}]`);return t},t.template=function(e,t,r,n,a){if(!t)return;if(i.isTemplate(t))return"root"!==r?t:null;let o=a.errors.language;if(s.isResolvable(o)&&(o=o.resolve(e,n,a)),o&&t[o]){if(void 0!==t[o][r])return t[o][r];if(void 0!==t[o]["*"])return t[o]["*"]}return t[r]?t[r]:t["*"]},t.label=function(e,r,n,s){if(!n.errors.label)return"";if(e.label)return e.label;let i=r.path;return"key"===n.errors.label&&r.path.length>1&&(i=r.path.slice(-1)),t.path(i)||t.template(null,n.messages,"root",r,n)||s&&t.template(null,s,"root",r,n)||"value"},t.process=function(e,r,n){if(!e)return null;const{override:s,message:i,details:a}=t.details(e);if(s)return s;if(n.errors.stack)return new t.ValidationError(i,a,r);const o=Error.stackTraceLimit;Error.stackTraceLimit=0;const l=new t.ValidationError(i,a,r);return Error.stackTraceLimit=o,l},t.details=function(e,t={}){let r=[];const n=[];for(const s of e){if(s instanceof Error){if(!1!==t.override)return{override:s};const e=s.toString();r.push(e),n.push({message:e,type:"override",context:{error:s}});continue}const e=s.toString();r.push(e),n.push({message:e,path:s.path.filter((e=>"object"!=typeof e)),type:s.code,context:s.local})}return r.length>1&&(r=[...new Set(r)]),{message:r.join(". "),details:n}},t.ValidationError=class extends Error{constructor(e,t,r){super(e),this._original=r,this.details=t}static isError(e){return e instanceof t.ValidationError}},t.ValidationError.prototype.isJoi=!0,t.ValidationError.prototype.name="ValidationError",t.ValidationError.prototype.annotate=n.error},8901:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(8160),a=r(6914),o={};t.type=function(e,t){const r=Object.getPrototypeOf(e),l=s(r),c=e._assign(Object.create(l)),u=Object.assign({},t);delete u.base,l._definition=u;const f=r._definition||{};u.messages=a.merge(f.messages,u.messages),u.properties=Object.assign({},f.properties,u.properties),c.type=u.type,u.flags=Object.assign({},f.flags,u.flags);const h=Object.assign({},f.terms);if(u.terms)for(const s in u.terms){const e=u.terms[s];n(void 0===c.$_terms[s],"Invalid term override for",u.type,s),c.$_terms[s]=e.init,h[s]=e}u.terms=h,u.args||(u.args=f.args),u.prepare=o.prepare(u.prepare,f.prepare),u.coerce&&("function"==typeof u.coerce&&(u.coerce={method:u.coerce}),u.coerce.from&&!Array.isArray(u.coerce.from)&&(u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)})),u.coerce=o.coerce(u.coerce,f.coerce),u.validate=o.validate(u.validate,f.validate);const d=Object.assign({},f.rules);if(u.rules)for(const s in u.rules){const e=u.rules[s];n("object"==typeof e,"Invalid rule definition for",u.type,s);let t=e.method;if(void 0===t&&(t=function(){return this.$_addRule(s)}),t&&(n(!l[s],"Rule conflict in",u.type,s),l[s]=t),n(!d[s],"Rule conflict in",u.type,s),d[s]=e,e.alias){const t=[].concat(e.alias);for(const r of t)l[r]=e.method}e.args&&(e.argsByName=new Map,e.args=e.args.map((t=>("string"==typeof t&&(t={name:t}),n(!e.argsByName.has(t.name),"Duplicated argument name",t.name),i.isSchema(t.assert)&&(t.assert=t.assert.strict().label(t.name)),e.argsByName.set(t.name,t),t))))}u.rules=d;const p=Object.assign({},f.modifiers);if(u.modifiers)for(const s in u.modifiers){n(!l[s],"Rule conflict in",u.type,s);const e=u.modifiers[s];n("function"==typeof e,"Invalid modifier definition for",u.type,s);const t=function(e){return this.rule({[s]:e})};l[s]=t,p[s]=e}if(u.modifiers=p,u.overrides){l._super=r,c.$_super={};for(const e in u.overrides)n(r[e],"Cannot override missing",e),u.overrides[e][i.symbols.parent]=r[e],c.$_super[e]=r[e].bind(c);Object.assign(l,u.overrides)}u.cast=Object.assign({},f.cast,u.cast);const m=Object.assign({},f.manifest,u.manifest);return m.build=o.build(u.manifest&&u.manifest.build,f.manifest&&f.manifest.build),u.manifest=m,u.rebuild=o.rebuild(u.rebuild,f.rebuild),c},o.build=function(e,t){return e&&t?function(r,n){return t(e(r,n),n)}:e||t},o.coerce=function(e,t){return e&&t?{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(r,n){let s;if((!t.from||t.from.includes(typeof r))&&(s=t.method(r,n),s)){if(s.errors||void 0===s.value)return s;r=s.value}if(!e.from||e.from.includes(typeof r)){const t=e.method(r,n);if(t)return t}return s}}:e||t},o.prepare=function(e,t){return e&&t?function(r,n){const s=e(r,n);if(s){if(s.errors||void 0===s.value)return s;r=s.value}return t(r,n)||s}:e||t},o.rebuild=function(e,t){return e&&t?function(r){t(r),e(r)}:e||t},o.validate=function(e,t){return e&&t?function(r,n){const s=t(r,n);if(s){if(s.errors&&(!Array.isArray(s.errors)||s.errors.length))return s;r=s.value}return e(r,n)||s}:e||t}},5107:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(8652),a=r(8160),o=r(3292),l=r(6354),c=r(8901),u=r(9708),f=r(6133),h=r(3328),d=r(1152);let p;const m={types:{alternatives:r(4946),any:r(8068),array:r(546),boolean:r(4937),date:r(7500),function:r(390),link:r(8785),number:r(3832),object:r(8966),string:r(7417),symbol:r(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const e={_types:new Set(Object.keys(m.types))};for(const t of e._types)e[t]=function(...e){return n(!e.length||["alternatives","link","object"].includes(t),"The",t,"type does not allow arguments"),m.generate(this,m.types[t],e)};for(const t of["allow","custom","disallow","equal","exist","forbidden","invali
1d","not","only","optional","options","prefs","preferences","required","strip","valid","when"])e[t]=function(...e){return this.any()[t](...e)};Object.assign(e,m.methods);for(const t in m.aliases){const r=m.aliases[t];e[t]=e[r]}return e.x=e.expression,d.setup&&d.setup(e),e}};m.methods={ValidationError:l.ValidationError,version:a.version,cache:i.provider,assert(e,t,...r){m.assert(e,t,!0,r)},attempt:(e,t,...r)=>m.assert(e,t,!1,r),build(e){return n("function"==typeof u.build,"Manifest functionality disabled"),u.build(this,e)},checkPreferences(e){a.checkPreferences(e)},compile(e,t){return o.compile(this,e,t)},defaults(e){n("function"==typeof e,"modifier must be a function");const t=Object.assign({},this);for(const r of t._types){const s=e(t[r]());n(a.isSchema(s),"modifier must return a valid schema object"),t[r]=function(...e){return m.generate(this,s,e)}}return t},expression:(...e)=>new h(...e),extend(...e){a.verifyFlat(e,"extend"),p=p||r(3378),n(e.length,"You need to provide at least one extension"),this.assert(e,p.extensions);const t=Object.assign({},this);t._types=new Set(t._types);for(let r of e){"function"==typeof r&&(r=r(t)),this.assert(r,p.extension);const e=m.expandExtension(r,t);for(const r of e){n(void 0===t[r.type]||t._types.has(r.type),"Cannot override name",r.type);const e=r.base||this.any(),s=c.type(e,r);t._types.add(r.type),t[r.type]=function(...e){return m.generate(this,s,e)}}}return t},isError:l.ValidationError.isError,isExpression:h.isTemplate,isRef:f.isRef,isSchema:a.isSchema,in:(...e)=>f.in(...e),override:a.symbols.override,ref:(...e)=>f.create(...e),types(){const e={};for(const t of this._types)e[t]=this[t]();for(const t in m.aliases)e[t]=this[t]();return e}},m.assert=function(e,t,r,n){const i=n[0]instanceof Error||"string"==typeof n[0]?n[0]:null,o=null!==i?n[1]:n[0],c=t.validate(e,a.preferences({errors:{stack:!0}},o||{}));let u=c.error;if(!u)return c.value;if(i instanceof Error)throw i;const f=r&&"function"==typeof u.annotate?u.annotate():u.message;throw u instanceof l.ValidationError==0&&(u=s(u)),u.message=i?`${i} ${f}`:f,u},m.generate=function(e,t,r){return n(e,"Must be invoked on a Joi instance."),t.$_root=e,t._definition.args&&r.length?t._definition.args(t,...r):t},m.expandExtension=function(e,t){if("string"==typeof e.type)return[e];const r=[];for(const n of t._types)if(e.type.test(n)){const s=Object.assign({},e);s.type=n,s.base=t[n](),r.push(s)}return r},e.exports=m.root()},6914:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(3328);t.compile=function(e,t){if("string"==typeof e)return n(!t,"Cannot set single message string"),new i(e);if(i.isTemplate(e))return n(!t,"Cannot set single message template"),e;n("object"==typeof e&&!Array.isArray(e),"Invalid message options"),t=t?s(t):{};for(let r in e){const s=e[r];if("root"===r||i.isTemplate(s)){t[r]=s;continue}if("string"==typeof s){t[r]=new i(s);continue}n("object"==typeof s&&!Array.isArray(s),"Invalid message for",r);const a=r;for(r in t[a]=t[a]||{},s){const e=s[r];"root"===r||i.isTemplate(e)?t[a][r]=e:(n("string"==typeof e,"Invalid message for",r,"in",a),t[a][r]=new i(e))}}return t},t.decompile=function(e){const t={};for(let r in e){const n=e[r];if("root"===r){t.root=n;continue}if(i.isTemplate(n)){t[r]=n.describe({compact:!0});continue}const s=r;for(r in t[s]={},n){const e=n[r];"root"!==r?t[s][r]=e.describe({compact:!0}):t[s].root=e}}return t},t.merge=function(e,r){if(!e)return t.compile(r);if(!r)return e;if("string"==typeof r)return new i(r);if(i.isTemplate(r))return r;const a=s(e);for(let t in r){const e=r[t];if("root"===t||i.isTemplate(e)){a[t]=e;continue}if("string"==typeof e){a[t]=new i(e);continue}n("object"==typeof e&&!Array.isArray(e),"Invalid message for",t);const s=t;for(t in a[s]=a[s]||{},e){const r=e[t];"root"===t||i.isTemplate(r)?a[s][t]=r:(n("string"==typeof r,"Invalid message for",t,"in",s),a[s][t]=new i(r))}}return a}},2294:(e,t,r)=>{"use strict";const n=r(375),s=r(8160),i=r(6133),a={};t.Ids=a.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new a.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);
vendor: 60,154 bytes, line 1
1for(const[t,r]of e._byId.entries())n(!this._byKey.has(t),"Schema id conflicts with existing key:",t),this._byId.set(t,r);for(const[t,r]of e._byKey.entries())n(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,r)}fork(e,t,r){const i=this._collect(e);i.push({schema:r});const o=i.shift();let l={id:o.id,schema:t(o.schema)};n(s.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const n of i)l={id:n.id,schema:a.fork(n.schema,l.id,l.schema)};return l.schema}labels(e,t=[]){const r=e[0],n=this._get(r);if(!n)return[...t,...e].join(".");const s=e.slice(1);return t=[...t,n.schema._flags.label||r],s.length?n.schema._ids.labels(s,t):t.join(".")}reach(e,t=[]){const r=e[0],s=this._get(r);n(s,"Schema does not contain path",[...t,...e].join("."));const i=e.slice(1);return i.length?s.schema._ids.reach(i,[...t,r]):s.schema}register(e,{key:t}={}){if(!e||!s.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const r=e._flags.id;if(r){const t=this._byId.get(r);n(!t||t.schema===e,"Cannot add different schemas with the same id:",r),n(!this._byKey.has(r),"Schema id conflicts with existing key:",r),this._byId.set(r,{schema:e,id:r})}t&&(n(!this._byKey.has(t),"Schema already contains key:",t),n(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,{schema:e,id:t}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,t=[],r=[]){const s=e[0],i=this._get(s);n(i,"Schema does not contain path",[...t,...e].join(".")),r=[i,...r];const a=e.slice(1);return a.length?i.schema._ids._collect(a,[...t,s],r):r}_get(e){return this._byId.get(e)||this._byKey.get(e)}},a.fork=function(e,r,n){const s=t.schema(e,{each:(e,{key:t})=>{if(r===(e._flags.id||t))return n},ref:!1});return s?s.$_mutateRebuild():e},t.schema=function(e,t){let r;for(const n in e._flags){if("_"===n[0])continue;const s=a.scan(e._flags[n],{source:"flags",name:n},t);void 0!==s&&(r=r||e.clone(),r._flags[n]=s)}for(let n=0;n<e._rules.length;++n){const s=e._rules[n],i=a.scan(s.args,{source:"rules",name:s.name},t);if(void 0!==i){r=r||e.clone();const t=Object.assign({},s);t.args=i,r._rules[n]=t,r._singleRules.get(s.name)===s&&r._singleRules.set(s.name,t)}}for(const n in e.$_terms){if("_"===n[0])continue;const s=a.scan(e.$_terms[n],{source:"terms",name:n},t);void 0!==s&&(r=r||e.clone(),r.$_terms[n]=s)}return r},a.scan=function(e,t,r,n,o){const l=n||[];if(null===e||"object"!=typeof e)return;let c;if(Array.isArray(e)){for(let n=0;n<e.length;++n){const s="terms"===t.source&&"keys"===t.name&&e[n].key,i=a.scan(e[n],t,r,[n,...l],s);void 0!==i&&(c=c||e.slice(),c[n]=i)}return c}if(!1!==r.schema&&s.isSchema(e)||!1!==r.ref&&i.isRef(e)){const n=r.each(e,{...t,path:l,key:o});if(n===e)return;return n}for(const s in e){if("_"===s[0])continue;const n=a.scan(e[s],t,r,[s,...l],o);void 0!==n&&(c=c||Object.assign({},e),c[s]=n)}return c}},6133:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(9621),a=r(8160);let o;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};t.create=function(e,t={}){n("string"==typeof e,"Invalid reference key:",e),a.assertOptions(t,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),n(!t.prefix||"object"==typeof t.prefix,"options.prefix must be of type object");const r=Object.assign({},l.defaults,t);delete r.prefix;const s=r.separator,i=l.context(e,s,t.prefix);if(r.type=i.type,e=i.key,"value"===r.type)if(i.root&&(n(!s||e[0]!==s,"Cannot specify relative path with root prefix"),r.ancestor="root",e||(e=null)),s&&s===e)e=null,r.ancestor=0;else if(void 0!==r.ancestor)n(!s||!e||e[0]!==s,"Cannot combine prefix with ancestor option");else{const[t,n]=l.ancestor(e,s);n&&""===(e=e.slice(n))&&(e=null),r.ancestor=t}return r.path=s?null===e?[]:e.split(s):[e],new l.Ref(r)},t.in=function(e,r={}){return t.create(e,{...r,in:!0})},t.isRef=function(e){return!!e&&!!e[a.symbols.ref]},l.Ref=class{constructor(e){n("object"==typeof e,"Invalid reference construction"),a.assertOptions(e,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),n([!1,void 0].includes(e.separator)||"string"==typeof e.separator&&1===e.separator.length,"Invalid separator"),n(!e.adjust||"function"==typeof e.adjust,"options.adjust must be a function"),n(!e.map||Array.isArray(e.map),"options.map must be an array"),n(!e.map||!e.adjust,"Cannot set both map and adjust options"),Object.assign(this,l.defaults,e),n("value"===this.type||void 0===this.ancestor,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(e,t,r,s,i={}){return n(!this.in||i.in,"Invalid in() reference usage"),"global"===this.type?this._resolve(r.context,t,i):"local"===this.type?this._resolve(s,t,i):this.ancestor?"root"===this.ancestor?this._resolve(t.ancestors[t.ancestors.length-1],t,i):(n(this.ancestor<=t.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(t.ancestors[this.ancestor-1],t,i)):this._resolve(e,t,i)}_resolve(e,t,r){let n;if("value"===this.type&&t.mainstay.shadow&&!1!==r.shadow&&(n=t.mainstay.shadow.get(this.absolute(t))),void 0===n&&(n=i(e,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(n=this.adjust(n)),this.map){const e=this.map.get(n);void 0!==e&&(n=e)}return t.mainstay&&t.mainstay.tracer.resolve(t,this,n),n}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const e={path:this.path};"value"!==this.type&&(e.type=this.type),"."!==this.separator&&(e.separator=this.separator),"value"===this.type&&1!==this.ancestor&&(e.ancestor=this.ancestor),this.map&&(e.map=[...this.map]);for(const t of["adjust","iterables","render"])null!==this[t]&&void 0!==this[t]&&(e[t]=this[t]);return!1!==this.in&&(e.in=!0),{ref:e}}updateDisplay(){const e=null!==this.key?this.key:"";if("value"!==this.type)return void(this.display=`ref:${this.type}:${e}`);if(!this.separator)return void(this.display=`ref:${e}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${e}`);if("root"===this.ancestor)return void(this.display=`ref:root:${e}`);if(1===this.ancestor)return void(this.display=`ref:${e||".."}`);const t=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${t}${e||""}`}},l.Ref.prototype[a.symbols.ref]=!0,t.build=function(e){return"value"===(e=Object.assign({},l.defaults,e)).type&&void 0===e.ancestor&&(e.ancestor=1),new l.Ref(e)},l.context=function(e,t,r={}){if(e=e.trim(),r){const n=void 0===r.global?"$":r.global;if(n!==t&&e.startsWith(n))return{key:e.slice(n.length),type:"global"};const s=void 0===r.local?"#":r.local;if(s!==t&&e.startsWith(s))return{key:e.slice(s.length),type:"local"};const i=void 0===r.root?"/":r.root;if(i!==t&&e.startsWith(i))return{key:e.slice(i.length),type:"value",root:!0}}return{key:e,type:"value"}},l.ancestor=function(e,t){if(!t)return[1,0];if(e[0]!==t)return[1,0];if(e[1]!==t)return[0,1];let r=2;for(;e[r]===t;)++r;return[r-1,r]},t.toSibling=0,t.toParent=1,t.Manager=class{constructor(){this.refs=[]}register(e,n){if(e)if(n=void 0===n?t.toParent:n,Array.isArray(e))for(const t of e)this.register(t,n);else if(a.isSchema(e))for(const t of e._refs.refs)t.ancestor-n>=0&&this.refs.push({ancestor:t.ancestor-n,root:t.root});else t.isRef(e)&&"value"===e.type&&e.ancestor-n>=0&&this.refs.push({ancestor:e.ancestor-n,root:e.root}),o=o||r(3328),o.isTemplate(e)&&this.register(e.refs(),n)}get length(){return this.refs.length}clone(){const e=new t.Manager;return e.refs=s(this.refs),e}reset(){this.refs=[]}roots(){return this.refs.filter((e=>!e.ancestor)).map((e=>e.root))}}},3378:(e,t,r)=>{"use strict";const n=r(5107),s={};s.wrap=n.string().min(1).max(2).allow(!1),t.preferences=n.object({allowUnknown:n.boolean(),abortEarly:n.boolean(),artifacts:n.boolean(),cache:n.boolean(),context:n.object(),convert:n.boolean(),dateFormat:n.valid("date","iso","string","time","utc"),debug:n.boolean(),errors:{escapeHtml:n.boolean(),label:n.valid("path","key",!1),language:[n.string(),n.object().ref()],render:n.boolean(),stack:n.boolean(),wrap:{label:s.wrap,array:s.wrap,string:s.wrap}},externals:n.boolean(),messages:n.object(),noDefaults:n.boolean(),nonEnumerables:n.boolean(),presence:n.valid("required","optional","forbidden"),skipFunctions:n.boolean(),stripUnknown:n.object({arrays:n.boolean(),objects:n.boolean()}).or("arrays","objects").allow(!0,!1),warnings:n.boolean()}).strict(),s.nameRx=/^[a-zA-Z0-9]\w*$/,s.rule=n.object({alias:n.array().items(n.string().pattern(s.nameRx)).single(),args:n.array().items(n.string(),n.object({name:n.string().pattern(s.nameRx).required(),ref:n.boolean(),assert:n.alternatives([n.function(),n.object().schema()]).conditional("ref",{is:!0,then:n.required()}),normalize:n.function(),message:n.string().when("assert",{is:n.function(),then:n.required()})})),convert:n.boolean(),manifest:n.boolean(),method:n.function().allow(!1),multi:n.boolean(),validate:n.function()}),t.extension=n.object({type:n.alternatives([n.string(),n.object().regex()]).required(),args:n.function(),cast:n.object().pattern(s.nameRx,n.object({from:n.function().maxArity(1).required(),to:n.function().minArity(1).maxArity(2).required()})),base:n.object().schema().when("type",{is:n.object().regex(),then:n.forbidden()}),coerce:[n.function().maxArity(3),n.object({method:n.function().maxArity(3).required(),from:n.array().items(n.string()).single()})],flags:n.object().pattern(s.nameRx,n.object({setter:n.string(),default:n.any()})),manifest:{build:n.function().arity(2)},messages:[n.object(),n.string()],modifiers:n.object().pattern(s.nameRx,n.function().minArity(1).maxArity(2)),overrides:n.object().pattern(s.nameRx,n.function()),prepare:n.function().maxArity(3),rebuild:n.function().arity(1),rules:n.object().pattern(s.nameRx,s.rule),terms:n.object().pattern(s.nameRx,n.object({init:n.array().allow(null).required(),manifest:n.object().pattern(/.+/,[n.valid("schema","single"),n.object({mapped:n.object({from:n.string().required(),to:n.string().required()}).required()})])})),validate:n.function().maxArity(3)}).strict(),t.extensions=n.array().items(n.object(),n.function().arity(1)).strict(),s.desc={buffer:n.object({buffer:n.string()}),func:n.object({function:n.function().required(),options:{literal:!0}}),override:n.object({override:!0}),ref:n.object({ref:n.object({type:n.valid("value","global","local"),path:n.array().required(),separator:n.string().length(1).allow(!1),ancestor:n.number().min(0).integer().allow("root"),map:n.array().items(n.array().length(2)).min(1),adjust:n.function(),iterables:n.boolean(),in:n.boolean(),render:n.boolean()}).required()}),regex:n.object({regex:n.string().min(3)}),special:n.object({special:n.valid("deep").required()}),template:n.object({template:n.string().required(),options:n.object()}),value:n.object({value:n.alternatives([n.object(),n.array()]).required()})},s.desc.entity=n.alternatives([n.array().items(n.link("...")),n.boolean(),n.function(),n.number(),n.string(),s.desc.buffer,s.desc.func,s.desc.ref,s.desc.regex,s.desc.special,s.desc.template,s.desc.value,n.link("/")]),s.desc.values=n.array().items(null,n.boolean(),n.function(),n.number().allow(1/0,-1/0),n.string().allow(""),n.symbol(),s.desc.buffer,s.desc.func,s.desc.override,s.desc.ref,s.desc.regex,s.desc.template,s.desc.value),s.desc.messages=n.object().pattern(/.+/,[n.string(),s.desc.template,n.object().pattern(/.+/,[n.string(),s.desc.template])]),t.description=n.object({type:n.string().required(),flags:n.object({cast:n.string(),default:n.any(),description:n.string(),empty:n.link("/"),failover:s.desc.entity,id:n.string(),label:n.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:n.boolean(),unit:n.string()}).unknown(),preferences:{allowUnknown:n.boolean(),abortEarly:n.boolean(),artifacts:n.boolean(),cache:n.boolean(),convert:n.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:n.boolean(),label:["path","key"],language:[n.string(),s.desc.ref],wrap:{label:s.wrap,array:s.wrap}},externals:n.boolean(),messages:s.desc.messages,noDefaults:n.boolean(),nonEnumerables:n.boolean(),presence:["required","optional","forbidden"],skipFunctions:n.boolean(),stripUnknown:n.object({arrays:n.boolean(),objects:n.boolean()}).or("arrays","objects").allow(!0,!1),warnings:n.boolean()},allow:s.desc.values,invalid:s.desc.values,rules:n.array().min(1).items({name:n.string().required(),args:n.object().min(1),keep:n.boolean(),message:[n.string(),s.desc.messages],warn:n.boolean()}),keys:n.object().pattern(/.*/,n.link("/")),link:s.desc.ref}).pattern(/^[a-z]\w*$/,n.any())},493:(e,t,r)=>{"use strict";const n=r(8571),s=r(9621),i=r(8160),a={value:Symbol("value")};e.exports=a.State=class{constructor(e,t,r){this.path=e,this.ancestors=t,this.mainstay=r.mainstay,this.schemas=r.schemas,this.debug=null}localize(e,t=null,r=null){const n=new a.State(e,t,this);return r&&n.schemas&&(n.schemas=[a.schemas(r),...n.schemas]),n}nest(e,t){const r=new a.State(this.path,this.ancestors,this);return r.schemas=r.schemas&&[a.schemas(e),...r.schemas],r.debug=t,r}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new a.Shadow,this.mainstay.shadow.set(this.path,e,t)}snapshot(){this.mainstay.shadow&&(this._snapshot=n(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},a.schemas=function(e){return i.isSchema(e)?{schema:e}:e},a.Shadow=class{constructor(){this._values=null}set(e,t,r){if(!e.length)return;if("strip"===r&&"number"==typeof e[e.length-1])return;this._values=this._values||new Map;let n=this._values;for(let s=0;s<e.length;++s){const t=e[s];let r=n.get(t);r||(r=new Map,n.set(t,r)),n=r}n[a.value]=t}get(e){const t=this.node(e);if(t)return t[a.value]}node(e){if(this._values)return s(this._values,e,{iterables:!0})}override(e,t){if(!this._values)return;const r=e.slice(0,-1),n=e[e.length-1],i=s(this._values,r,{iterables:!0});t?i.set(n,t):i&&i.delete(n)}}},3328:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(5277),a=r(1447),o=r(8160),l=r(6354),c=r(6133),u={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join("\x01"),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=u.Template=class{constructor(e,t){if(n("string"==typeof e,"Template source must be a string"),n(!e.includes("\0")&&!e.includes("\x01"),"Template source cannot contain reserved control characters"),this.source=e,this.rendered=e,this._template=null,t){const{functions:e,...r}=t;this._settings=Object.keys(r).length?s(r):void 0,this._functions=e,this._functions&&(n(Object.keys(this._functions).every((e=>"string"==typeof e)),"Functions keys must be strings"),n(Object.values(this._functions).every((e=>"function"==typeof e)),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const e=u.encode(this.source),t=u.split(e);let r=!1;const n=[],s=t.shift();s&&n.push(s);for(const i of t){const e="{"!==i[0],t=e?"}":"}}",s=i.indexOf(t);if(-1===s||"{"===i[1]){n.push(`{${u.decode(i)}`);continue}let a=i.slice(e?0:1,s);const o=":"===a[0];o&&(a=a.slice(1));const l=this._ref(u.decode(a),{raw:e,wrapped:o});n.push(l),"string"!=typeof l&&(r=!0);const c=i.slice(s+t.length);c&&n.push(u.decode(c))}r?this._template=n:this.rendered=n.join("")}static date(e,t){return u.dateFormat[t.dateFormat].call(e)}describe(e={}){if(!this._settings&&e.compact)return this.source;const t={template:this.source};return this._settings&&(t.options=this._settings),this._functions&&(t.functions=this._functions),t}static build(e){return new u.Template(e.template,e.options||e.functions?{...e.options,functions:e.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[o.symbols.template]}refs(){if(!this._template)return;const e=[];for(const t of this._template)"string"!=typeof t&&e.push(...t.refs);return e}resolve(e,t,r,n){return this._template&&1===this._template.length?this._part(this._template[0],e,t,r,n,{}):this.render(e,t,r,n)}_part(e,...t){return e.ref?e.ref.resolve(...t):e.formula.evaluate(t)}render(e,t,r,n,s={}){if(!this.isDynamic())return this.rendered;const a=[];for(const o of this._template)if("string"==typeof o)a.push(o);else{const l=this._part(o,e,t,r,n,s),c=u.stringify(l,e,t,r,n,s);if(void 0!==c){const e=o.raw||!1===(s.errors&&s.errors.escapeHtml)?c:i(c);a.push(u.wrap(e,o.wrapped&&r.errors.wrap.label))}}return a.join("")}_ref(e,{raw:t,wrapped:r}){const n=[],s=e=>{const t=c.create(e,this._settings);return n.push(t),e=>{const r=t.resolve(...e);return void 0!==r?r:null}};try{const t=this._functions?{...u.functions,...this._functions}:u.functions;var i=new a.Parser(e,{reference:s,functions:t,constants:u.constants})}catch(t){throw t.message=`Invalid template variable "${e}" fails due to: ${t.message}`,t}if(i.single){if("reference"===i.single.type){const e=n[0];return{ref:e,raw:t,refs:n,wrapped:r||"local"===e.type&&"label"===e.key}}return u.stringify(i.single.value)}return{formula:i,raw:t,refs:n}}toString(){return this.source}},u.Template.prototype[o.symbols.template]=!0,u.Template.prototype.isImmutable=!0,u.encode=function(e){return e.replace(/\\(\{+)/g,((e,t)=>u.opens.slice(0,t.length))).replace(/\\(\}+)/g,((e,t)=>u.closes.slice(0,t.length)))},u.decode=function(e){return e.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},u.split=function(e){const t=[];let r="";for(let n=0;n<e.length;++n){const s=e[n];if("{"===s){let s="";for(;n+1<e.length&&"{"===e[n+1];)s+="{",++n;t.push(r),r=s}else r+=s}return t.push(r),t},u.wrap=function(e,t){return t?1===t.length?`${t}${e}${t}`:`${t[0]}${e}${t[1]}`:e},u.stringify=function(e,t,r,n,s,i={}){const a=typeof e,o=n&&n.errors&&n.errors.wrap||{};let l=!1;if(c.isRef(e)&&e.render&&(l=e.in,e=e.resolve(t,r,n,s,{in:e.in,...i})),null===e)return"null";if("string"===a)return u.wrap(e,i.arrayItems&&o.string);if("number"===a||"function"===a||"symbol"===a)return e.toString();if("object"!==a)return JSON.stringify(e);if(e instanceof Date)return u.Template.date(e,n);if(e instanceof Map){const t=[];for(const[r,n]of e.entries())t.push(`${r.toString()} -> ${n.toString()}`);e=t}if(!Array.isArray(e))return e.toString();const f=[];for(const c of e)f.push(u.stringify(c,t,r,n,s,{arrayItems:!0,...i}));return u.wrap(f.join(", "),!l&&o.array)},u.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},u.functions={if:(e,t,r)=>e?t:r,length:e=>"string"==typeof e?e.length:e&&"object"==typeof e?Array.isArray(e)?e.length:Object.keys(e).length:null,msg(e){const[t,r,n,s,i]=this,a=i.messages;if(!a)return"";const o=l.template(t,a[0],e,r,n)||l.template(t,a[1],e,r,n);return o?o.render(t,r,n,s,i):""},number:e=>"number"==typeof e?e:"string"==typeof e?parseFloat(e):"boolean"==typeof e?e?1:0:e instanceof Date?e.getTime():null}},4946:(e,t,r)=>{"use strict";const n=r(375),s=r(1687),i=r(8068),a=r(8160),o=r(3292),l=r(6354),c=r(6133),u={};e.exports=i.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:c.toSibling}},args:(e,...t)=>1===t.length&&Array.isArray(t[0])?e.try(...t[0]):e.try(...t),validate(e,t){const{schema:r,error:n,state:i,prefs:a}=t;if(r._flags.match){const t=[],o=[];for(let n=0;n<r.$_terms.matches.length;++n){const s=r.$_terms.matches[n],l=i.nest(s.schema,`match.${n}`);l.snapshot();const c=s.schema.$_validate(e,l,a);c.errors?(o.push(c.errors),l.restore()):(t.push(c.value),l.commit())}if(0===t.length)return{errors:n("alternatives.any",{details:o.map((e=>l.details(e,{override:!1})))})};if("one"===r._flags.match)return 1===t.length?{value:t[0]}:{errors:n("alternatives.one")};if(t.length!==r.$_terms.matches.length)return{errors:n("alternatives.all",{details:o.map((e=>l.details(e,{override:!1})))})};const c=e=>e.$_terms.matches.some((e=>"object"===e.schema.type||"alternatives"===e.schema.type&&c(e.schema)));return c(r)?{value:t.reduce(((e,t)=>s(e,t,{mergeArrays:!1})))}:{value:t[t.length-1]}}const o=[];for(let s=0;s<r.$_terms.matches.length;++s){const t=r.$_terms.matches[s];if(t.schema){const r=i.nest(t.schema,`match.${s}`);r.snapshot();const n=t.schema.$_validate(e,r,a);if(!n.errors)return r.commit(),n;r.restore(),o.push({schema:t.schema,reports:n.errors});continue}const n=t.ref?t.ref.resolve(e,i,a):e,l=t.is?[t]:t.switch;for(let r=0;r<l.length;++r){const o=l[r],{is:c,then:u,otherwise:f}=o,h=`match.${s}${t.switch?"."+r:""}`;if(c.$_match(n,i.nest(c,`${h}.is`),a)){if(u)return u.$_validate(e,i.nest(u,`${h}.then`),a)}else if(f)return f.$_validate(e,i.nest(f,`${h}.otherwise`),a)}}return u.errors(o,t)},rules:{conditional:{method(e,t){n(!this._flags._endedSwitch,"Unreachable condition"),n(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),n(void 0===t.break,"Cannot use break option with alternatives conditional");const r=this.clone(),s=o.when(r,e,t),i=s.is?[s]:s.switch;for(const n of i)if(n.then&&n.otherwise){r.$_setFlag("_endedSwitch",!0,{clone:!1});break}return r.$_terms.matches.push(s),r.$_mutateRebuild()}},match:{method(e){if(n(["any","one","all"].includes(e),"Invalid alternatives match mode",e),"any"!==e)for(const t of this.$_terms.matches)n(t.schema,"Cannot combine match mode",e,"with conditional rules");return this.$_setFlag("match",e)}},try:{method(...e){n(e.length,"Missing alternative schemas"),a.verifyFlat(e,"try"),n(!this._flags._endedSwitch,"Unreachable condition");const t=this.clone();for(const r of e)t.$_terms.matches.push({schema:t.$_compile(r)});return t.$_mutateRebuild()}}},overrides:{label(e){return this.$_parent("label",e).$_modify({each:(t,r)=>"is"!==r.path[0]&&"string"!=typeof t._flags.label?t.label(e):void 0,ref:!1})}},rebuild(e){e.$_modify({each:t=>{a.isSchema(t)&&"array"===t.type&&e.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(e,t){if(t.matches)for(const r of t.matches){const{schema:t,ref:n,is:s,not:i,then:a,otherwise:o}=r;e=t?e.try(t):n?e.conditional(n,{is:s,then:a,not:i,otherwise:o,switch:r.switch}):e.conditional(s,{then:a,otherwise:o})}return e}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),u.errors=function(e,{error:t,state:r}){if(!e.length)return{errors:t("alternatives.any")};if(1===e.length)return{errors:e[0].reports};const n=new Set,s=[];for(const{reports:i,schema:a}of e){if(i.length>1)return u.unmatched(e,t);const o=i[0];if(o instanceof l.Report==0)return u.unmatched(e,t);if(o.state.path.length!==r.path.length){s.push({type:a.type,report:o});continue}if("any.only"===o.code){for(const e of o.local.valids)n.add(e);continue}const[c,f]=o.code.split(".");"base"!==f?s.push({type:a.type,report:o}):"object.base"===o.code?n.add(o.local.type):n.add(c)}return s.length?1===s.length?{errors:s[0].report}:u.unmatched(e,t):{errors:t("alternatives.types",{types:[...n]})}},u.unmatched=function(e,t){const r=[];for(const n of e)r.push(...n.reports);return{errors:t("alternatives.match",l.details(r,{override:!1}))}}},8068:(e,t,r)=>{"use strict";const n=r(375),s=r(7629),i=r(8160),a=r(6914);e.exports=s.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){return n("function"==typeof e,"Method must be a function"),n(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:t}})},validate(e,t,{method:r}){try{return r(e,t)}catch(e){return t.error("any.custom",{error:e})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){n(i.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const t=this.clone();return t.$_terms.shared=t.$_terms.shared||[],t.$_terms.shared.push(e),t.$_mutateRegister(e),t}},warning:{method(e,t){return n(e&&"string"==typeof e,"Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:t},warn:!0})},validate:(e,t,{code:r,local:n})=>t.error(r,n),args:["code","local"],multi:!0}},modifiers:{keep(e,t=!0){e.keep=t},message(e,t){e.message=a.compile(t)},warn(e,t=!0){e.warn=t}},manifest:{build(e,t){for(const r in t){const n=t[r];if(["examples","externals","metas","notes","tags"].includes(r))for(const t of n)e=e[r.slice(0,-1)](t);else if("alterations"!==r)if("whens"!==r){if("shared"===r)for(const t of n)e=e.shared(t)}else for(const t of n){const{ref:r,is:n,not:s,then:i,otherwise:a,concat:o}=t;e=o?e.concat(o):r?e.when(r,{is:n,not:s,then:i,otherwise:a,switch:t.switch,break:t.break}):e.when(n,{then:i,otherwise:a,break:t.break})}else{const t={};for(const{target:e,adjuster:r}of n)t[e]=r;e=e.alter(t)}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(e,t,r)=>{"use strict";const n=r(375),s=r(9474),i=r(9621),a=r(8068),o=r(8160),l=r(3292),c={};e.exports=a.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(e,{schema:t,state:r,prefs:n}){if(!Array.isArray(e))return;const s=t.$_getRule("sort");return s?c.sort(t,e,s.args.options,r,n):void 0}},validate(e,{schema:t,error:r}){if(!Array.isArray(e)){if(t._flags.single){const t=[e];return t[o.symbols.arraySingle]=!0,{value:t}}return{errors:r("array.base")}}if(t.$_getRule("items")||t.$_terms.externals)return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:e}});return t.$_mutateRegister(e),t},validate(e,{state:t,prefs:r,error:n},{schema:s}){const i=[e,...t.ancestors];for(let o=0;o<e.length;++o){const n=t.localize([...t.path,o],i,s);if(s.$_match(e[o],n,r))return e}const a=s._flags.label;return a?n("array.hasKnown",{patternLabel:a}):n("array.hasUnknown",null)},multi:!0},items:{method(...e){o.verifyFlat(e,"items");const t=this.$_addRule("items");for(let r=0;r<e.length;++r){const n=o.tryWithPath((()=>this.$_compile(e[r])),r,{append:!0});t.$_terms.items.push(n)}return t.$_mutateRebuild()},validate(e,{schema:t,error:r,state:n,prefs:s,errorsArray:i}){const a=t.$_terms._requireds.slice(),l=t.$_terms.ordered.slice(),u=[...t.$_terms._inclusions,...a],f=!e[o.symbols.arraySingle];delete e[o.symbols.arraySingle];const h=i();let d=e.length;for(let o=0;o<d;++o){const i=e[o];let p=!1,m=!1;const g=f?o:new Number(o),y=[...n.path,g];if(!t._flags.sparse&&void 0===i){if(h.push(r("array.sparse",{key:g,path:y,pos:o,value:void 0},n.localize(y))),s.abortEarly)return h;l.shift();continue}const b=[e,...n.ancestors];for(const e of t.$_terms._exclusions)if(e.$_match(i,n.localize(y,b,e),s,{presence:"ignore"})){if(h.push(r("array.excludes",{pos:o,value:i},n.localize(y))),s.abortEarly)return h;p=!0,l.shift();break}if(p)continue;if(t.$_terms.ordered.length){if(l.length){const a=l.shift(),u=a.$_validate(i,n.localize(y,b,a),s);if(u.errors){if(h.push(...u.errors),s.abortEarly)return h}else if("strip"===a._flags.result)c.fastSplice(e,o),--o,--d;else{if(!t._flags.sparse&&void 0===u.value){if(h.push(r("array.sparse",{key:g,path:y,pos:o,value:void 0},n.localize(y))),s.abortEarly)return h;continue}e[o]=u.value}continue}if(!t.$_terms.items.length){if(h.push(r("array.orderedLength",{pos:o,limit:t.$_terms.ordered.length})),s.abortEarly)return h;break}}const v=[];let _=a.length;for(let l=0;l<_;++l){const u=n.localize(y,b,a[l]);u.snapshot();const f=a[l].$_validate(i,u,s);if(v[l]=f,!f.errors){if(u.commit(),e[o]=f.value,m=!0,c.fastSplice(a,l),--l,--_,!t._flags.sparse&&void 0===f.value&&(h.push(r("array.sparse",{key:g,path:y,pos:o,value:void 0},n.localize(y))),s.abortEarly))return h;break}u.restore()}if(m)continue;const w=s.stripUnknown&&!!s.stripUnknown.arrays||!1;_=u.length;for(const l of u){let u;const f=a.indexOf(l);if(-1!==f)u=v[f];else{const a=n.localize(y,b,l);if(a.snapshot(),u=l.$_validate(i,a,s),!u.errors){a.commit(),"strip"===l._flags.result?(c.fastSplice(e,o),--o,--d):t._flags.sparse||void 0!==u.value?e[o]=u.value:(h.push(r("array.sparse",{key:g,path:y,pos:o,value:void 0},n.localize(y))),p=!0),m=!0;break}a.restore()}if(1===_){if(w){c.fastSplice(e,o),--o,--d,m=!0;break}if(h.push(...u.errors),s.abortEarly)return h;p=!0;break}}if(!p&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!m){if(w){c.fastSplice(e,o),--o,--d;continue}if(h.push(r("array.includes",{pos:o,value:i},n.localize(y))),s.abortEarly)return h}}return a.length&&c.fillMissedErrors(t,h,a,e,n,s),l.length&&(c.fillOrderedErrors(t,h,l,e,n,s),h.length||c.fillDefault(l,e,n,s)),h.length?h:e},priority:!0,manifest:!1},length:{method(e){return this.$_addRule({name:"length",args:{limit:e},operator:"="})},validate:(e,t,{limit:r},{name:n,operator:s,args:i})=>o.compare(e.length,r,s)?e:t.error("array."+n,{limit:i.limit,value:e}),args:[{name:"limit",ref:!0,assert:o.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}},ordered:{method(...e){o.verifyFlat(e,"ordered");const t=this.$_addRule("items");for(let r=0;r<e.length;++r){const n=o.tryWithPath((()=>this.$_compile(e[r])),r,{append:!0});c.validateSingle(n,t),t.$_mutateRegister(n),t.$_terms.ordered.push(n)}return t.$_mutateRebuild()}},single:{method(e){const t=void 0===e||!!e;return n(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(e={}){o.assertOptions(e,["by","order"]);const t={order:e.order||"ascending"};return e.by&&(t.by=l.ref(e.by,{ancestor:0}),n(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(e,{error:t,state:r,prefs:n,schema:s},{options:i}){const{value:a,errors:o}=c.sort(s,e,i,r,n);if(o)return o;for(let l=0;l<e.length;++l)if(e[l]!==a[l])return t("array.sort",{order:i.order,by:i.by?i.by.key:"value"});return e},convert:!0},sparse:{method(e){const t=void 0===e||!!e;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule("items")).$_setFlag("sparse",t,{clone:!1})}},unique:{method(e,t={}){n(!e||"function"==typeof e||"string"==typeof e,"comparator must be a function or a string"),o.assertOptions(t,["ignoreUndefined","separator"]);const r={name:"unique",args:{options:t,comparator:e}};if(e)if("string"==typeof e){const n=o.default(t.separator,".");r.path=n?e.split(n):[e]}else r.comparator=e;return this.$_addRule(r)},validate(e,{state:t,error:r,schema:a},{comparator:o,options:l},{comparator:c,path:u}){const f={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},h=c||s,d=l.ignoreUndefined;for(let s=0;s<e.length;++s){const a=u?i(e[s],u):e[s],l=c?f.custom:f[typeof a];if(n(l,"Failed to find unique map container for type",typeof a),l instanceof Map){const n=l.entries();let i;for(;!(i=n.next()).done;)if(h(i.value[0],a)){const n=t.localize([...t.path,s],[e,...t.ancestors]),a={pos:s,value:e[s],dupePos:i.value[1],dupeValue:e[i.value[1]]};return u&&(a.path=o),r("array.unique",a,n)}l.set(a,s)}else{if((!d||void 0!==a)&&void 0!==l[a]){const n={pos:s,value:e[s],dupePos:l[a],dupeValue:e[l[a]]};return u&&(n.path=o),r("array.unique",n,t.localize([...t.path,s],[e,...t.ancestors]))}l[a]=s}}return e},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(e,t)=>new Set(e)}},rebuild(e){e.$_terms._inclusions=[],e.$_terms._exclusions=[],e.$_terms._requireds=[];for(const t of e.$_terms.items)c.validateSingle(t,e),"required"===t._flags.presence?e.$_terms._requireds.push(t):"forbidden"===t._flags.presence?e.$_terms._exclusions.push(t):e.$_terms._inclusions.push(t);for(const t of e.$_terms.ordered)c.validateSingle(t,e)},manifest:{build:(e,t)=>(t.items&&(e=e.items(...t.items)),t.ordered&&(e=e.ordered(...t.ordered)),e)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),c.fillMissedErrors=function(e,t,r,n,s,i){const a=[];let o=0;for(const l of r){const e=l._flags.label;e?a.push(e):++o}a.length?o?t.push(e.$_createError("array.includesRequiredBoth",n,{knownMisses:a,unknownMisses:o},s,i)):t.push(e.$_createError("array.includesRequiredKnowns",n,{knownMisses:a},s,i)):t.push(e.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:o},s,i))},c.fillOrderedErrors=function(e,t,r,n,s,i){const a=[];for(const o of r)"required"===o._flags.presence&&a.push(o);a.length&&c.fillMissedErrors(e,t,a,n,s,i)},c.fillDefault=function(e,t,r,n){const s=[];let i=!0;for(let a=e.length-1;a>=0;--a){const o=e[a],l=[t,...r.ancestors],c=o.$_validate(void 0,r.localize(r.path,l,o),n).value;if(i){if(void 0===c)continue;i=!1}s.unshift(c)}s.length&&t.push(...s)},c.fastSplice=function(e,t){let r=t;for(;r<e.length;)e[r++]=e[r];--e.length},c.validateSingle=function(e,t){("array"===e.type||e._flags._arrayItems)&&(n(!t._flags.single,"Cannot specify array item with single rule enabled"),t.$_setFlag("_arrayItems",!0,{clone:!1}))},c.sort=function(e,t,r,n,s){const i="ascending"===r.order?1:-1,a=-1*i,o=i,l=(l,u)=>{let f=c.compare(l,u,a,o);if(null!==f)return f;if(r.by&&(l=r.by.resolve(l,n,s),u=r.by.resolve(u,n,s)),f=c.compare(l,u,a,o),null!==f)return f;const h=typeof l;if(h!==typeof u)throw e.$_createError("array.sort.mismatching",t,null,n,s);if("number"!==h&&"string"!==h)throw e.$_createError("array.sort.unsupported",t,{type:h},n,s);return"number"===h?(l-u)*i:l<u?a:o};try{return{value:t.slice().sort(l)}}catch(e){return{errors:e}}},c.compare=function(e,t,r,n){return e===t?0:void 0===e?1:void 0===t?-1:null===e?n:null===t?r:null}},4937:(e,t,r)=>{"use strict";const n=r(375),s=r(8068),i=r(8160),a=r(2036),o={isBool:function(e){return"boolean"==typeof e}};e.exports=s.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(e,{schema:t}){if("boolean"!=typeof e){if("string"==typeof e){const r=t._flags.sensitive?e:e.toLowerCase();e="true"===r||"false"!==r&&e}return"boolean"!=typeof e&&(e=t.$_terms.truthy&&t.$_terms.truthy.has(e,null,null,!t._flags.sensitive)||(!t.$_terms.falsy||!t.$_terms.falsy.has(e,null,null,!t._flags.sensitive))&&e),{value:e}}},validate(e,{error:t}){if("boolean"!=typeof e)return{value:e,errors:t("boolean.base")}},rules:{truthy:{method(...e){i.verifyFlat(e,"truthy");const t=this.clone();t.$_terms.truthy=t.$_terms.truthy||new a;for(let r=0;r<e.length;++r){const s=e[r];n(void 0!==s,"Cannot call truthy with undefined"),t.$_terms.truthy.add(s)}return t}},falsy:{method(...e){i.verifyFlat(e,"falsy");const t=this.clone();t.$_terms.falsy=t.$_terms.falsy||new a;for(let r=0;r<e.length;++r){const s=e[r];n(void 0!==s,"Cannot call falsy with undefined"),t.$_terms.falsy.add(s)}return t}},sensitive:{method(e=!0){return this.$_setFlag("sensitive",e)}}},cast:{number:{from:o.isBool,to:(e,t)=>e?1:0},string:{from:o.isBool,to:(e,t)=>e?"true":"false"}},manifest:{build:(e,t)=>(t.truthy&&(e=e.truthy(...t.truthy)),t.falsy&&(e=e.falsy(...t.falsy)),e)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(e,t,r)=>{"use strict";const n=r(375),s=r(8068),i=r(8160),a=r(3328),o={isDate:function(e){return e instanceof Date}};e.exports=s.extend({type:"date",coerce:{from:["number","string"],method:(e,{schema:t})=>({value:o.parse(e,t._flags.format)||e})},validate(e,{schema:t,error:r,prefs:n}){if(e instanceof Date&&!isNaN(e.getTime()))return;const s=t._flags.format;return n.convert&&s&&"string"==typeof e?{value:e,errors:r("date.format",{format:s})}:{value:e,errors:r("date.base")}},rules:{compare:{method:!1,validate(e,t,{date:r},{name:n,operator:s,args:a}){const o="now"===r?Date.now():r.getTime();return i.compare(e.getTime(),o,s)?e:t.error("date."+n,{limit:a.date,value:e})},args:[{name:"date",ref:!0,normalize:e=>"now"===e?e:o.parse(e),assert:e=>null!==e,message:"must have a valid date format"}]},format:{method(e){return n(["iso","javascript","unix"].includes(e),"Unknown date format",e),this.$_setFlag("format",e)}},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{date:e},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{date:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{date:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{date:e},operator:">="})}},timestamp:{method(e="javascript"){return n(["javascript","unix"].includes(e),'"type" must be one of "javascript, unix"'),this.format(e)}}},cast:{number:{from:o.isDate,to:(e,t)=>e.getTime()},string:{from:o.isDate,to:(e,{prefs:t})=>a.date(e,t)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),o.parse=function(e,t){if(e instanceof Date)return e;if("string"!=typeof e&&(isNaN(e)||!isFinite(e)))return null;if(/^\s*$/.test(e))return null;if("iso"===t)return i.isIsoDate(e)?o.date(e.toString()):null;const r=e;if("string"==typeof e&&/^[+-]?\d+(\.\d+)?$/.test(e)&&(e=parseFloat(e)),t){if("javascript"===t)return o.date(1*e);if("unix"===t)return o.date(1e3*e);if("string"==typeof r)return null}return o.date(e)},o.date=function(e){const t=new Date(e);return isNaN(t.getTime())?null:t}},390:(e,t,r)=>{"use strict";const n=r(375),s=r(7824);e.exports=s.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(e){return n(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:e}})},validate:(e,t,{n:r})=>e.length===r?e:t.error("function.arity",{n:r})},class:{method(){return this.$_addRule("class")},validate:(e,t)=>/^\s*class\s/.test(e.toString())?e:t.error("function.class",{value:e})},minArity:{method(e){return n(Number.isSafeInteger(e)&&e>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:e}})},validate:(e,t,{n:r})=>e.length>=r?e:t.error("function.minArity",{n:r})},maxArity:{method(e){return n(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:e}})},validate:(e,t,{n:r})=>e.length<=r?e:t.error("function.maxArity",{n:r})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(e,t,r)=>{"use strict";const n=r(978),s=r(375),i=r(8571),a=r(3652),o=r(8068),l=r(8160),c=r(3292),u=r(6354),f=r(6133),h=r(3328),d={renameDefaults:{alias:!1,multiple:!1,override:!1}};e.exports=o.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(e,t)=>e.keys(t),validate(e,{schema:t,error:r,state:n,prefs:s}){if(!e||typeof e!==t.$_property("typeof")||Array.isArray(e))return{value:e,errors:r("object.base",{type:t.$_property("typeof")})};if(!(t.$_terms.renames||t.$_terms.dependencies||t.$_terms.keys||t.$_terms.patterns||t.$_terms.externals))return;e=d.clone(e,s);const i=[];if(t.$_terms.renames&&!d.rename(t,e,n,s,i))return{value:e,errors:i};if(!t.$_terms.keys&&!t.$_terms.patterns&&!t.$_terms.dependencies)return{value:e,errors:i};const a=new Set(Object.keys(e));if(t.$_terms.keys){const r=[e,...n.ancestors];for(const o of t.$_terms.keys){const t=o.key,l=e[t];a.delete(t);const c=n.localize([...n.path,t],r,o),u=o.schema.$_validate(l,c,s);if(u.errors){if(s.abortEarly)return{value:e,errors:u.errors};void 0!==u.value&&(e[t]=u.value),i.push(...u.errors)}else"strip"===o.schema._flags.result||void 0===u.value&&void 0!==l?delete e[t]:void 0!==u.value&&(e[t]=u.value)}}if(a.size||t._flags._hasPatternMatch){const r=d.unknown(t,e,a,i,n,s);if(r)return r}if(t.$_terms.dependencies)for(const o of t.$_terms.dependencies){if(null!==o.key&&!1===d.isPresent(o.options)(o.key.resolve(e,n,s,null,{shadow:!1})))continue;const r=d.dependencies[o.rel](t,o,e,n,s);if(r){const a=t.$_createError(r.code,e,r.context,n,s);if(s.abortEarly)return{value:e,errors:a};i.push(a)}}return{value:e,errors:i}},rules:{and:{method(...e){return l.verifyFlat(e,"and"),d.dependency(this,"and",null,e)}},append:{method(e){return null==e||0===Object.keys(e).length?this:this.keys(e)}},assert:{method(e,t,r){h.isTemplate(e)||(e=c.ref(e)),s(void 0===r||"string"==typeof r,"Message must be a string"),t=this.$_compile(t,{appendPath:!0});const n=this.$_addRule({name:"assert",args:{subject:e,schema:t,message:r}});return n.$_mutateRegister(e),n.$_mutateRegister(t),n},validate(e,{error:t,prefs:r,state:n},{subject:s,schema:i,message:a}){const o=s.resolve(e,n,r),l=f.isRef(s)?s.absolute(n):[];return i.$_match(o,n.localize(l,[e,...n.ancestors],i),r)?e:t("object.assert",{subject:s,message:a})},args:["subject","schema","message"],multi:!0},instance:{method(e,t){return s("function"==typeof e,"constructor must be a function"),t=t||e.name,this.$_addRule({name:"instance",args:{constructor:e,name:t}})},validate:(e,t,{constructor:r,name:n})=>e instanceof r?e:t.error("object.instance",{type:n,value:e}),args:["constructor","name"]},keys:{method(e){s(void 0===e||"object"==typeof e,"Object schema must be a valid object"),s(!l.isSchema(e),"Object schema cannot be a joi schema");const t=this.clone();if(e)if(Object.keys(e).length){t.$_terms.keys=t.$_terms.keys?t.$_terms.keys.filter((t=>!e.hasOwnProperty(t.key))):new d.Keys;for(const r in e)l.tryWithPath((()=>t.$_terms.keys.push({key:r,schema:this.$_compile(e[r])})),r)}else t.$_terms.keys=new d.Keys;else t.$_terms.keys=null;return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:"length",args:{limit:e},operator:"="})},validate:(e,t,{limit:r},{name:n,operator:s,args:i})=>l.compare(Object.keys(e).length,r,s)?e:t.error("object."+n,{limit:i.limit,value:e}),args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}},nand:{method(...e){return l.verifyFlat(e,"nand"),d.dependency(this,"nand",null,e)}},or:{method(...e){return l.verifyFlat(e,"or"),d.dependency(this,"or",null,e)}},oxor:{method(...e){return d.dependency(this,"oxor",null,e)}},pattern:{method(e,t,r={}){const n=e instanceof RegExp;n||(e=this.$_compile(e,{appendPath:!0})),s(void 0!==t,"Invalid rule"),l.assertOptions(r,["fallthrough","matches"]),n&&s(!e.flags.includes("g")&&!e.flags.includes("y"),"pattern should not use global or sticky mode"),t=this.$_compile(t,{appendPath:!0});const i=this.clone();i.$_terms.patterns=i.$_terms.patterns||[];const a={[n?"regex":"schema"]:e,rule:t};return r.matches&&(a.matches=this.$_compile(r.matches),"array"!==a.matches.type&&(a.matches=a.matches.$_root.array().items(a.matches)),i.$_mutateRegister(a.matches),i.$_setFlag("_hasPatternMatch",!0,{clone:!1})),r.fallthrough&&(a.fallthrough=!0),i.$_terms.patterns.push(a),i.$_mutateRegister(t),i}},ref:{method(){return this.$_addRule("ref")},validate:(e,t)=>f.isRef(e)?e:t.error("object.refType",{value:e})},regex:{method(){return this.$_addRule("regex")},validate:(e,t)=>e instanceof RegExp?e:t.error("object.regex",{value:e})},rename:{method(e,t,r={}){s("string"==typeof e||e instanceof RegExp,"Rename missing the from argument"),s("string"==typeof t||t instanceof h,"Invalid rename to argument"),s(t!==e,"Cannot rename key to same name:",e),l.assertOptions(r,["alias","ignoreUndefined","override","multiple"]);const i=this.clone();i.$_terms.renames=i.$_terms.renames||[];for(const n of i.$_terms.renames)s(n.from!==e,"Cannot rename the same key multiple times");return t instanceof h&&i.$_mutateRegister(t),i.$_terms.renames.push({from:e,to:t,options:n(d.renameDefaults,r)}),i}},schema:{method(e="any"){return this.$_addRule({name:"schema",args:{type:e}})},validate:(e,t,{type:r})=>!l.isSchema(e)||"any"!==r&&e.type!==r?t.error("object.schema",{type:r}):e},unknown:{method(e){return this.$_setFlag("unknown",!1!==e)}},with:{method(e,t,r={}){return d.dependency(this,"with",e,t,r)}},without:{method(e,t,r={}){return d.dependency(this,"without",e,t,r)}},xor:{method(...e){return l.verifyFlat(e,"xor"),d.dependency(this,"xor",null,e)}}},overrides:{default(e,t){return void 0===e&&(e=l.symbols.deepDefault),this.$_parent("default",e,t)}},rebuild(e){if(e.$_terms.keys){const t=new a.Sorter;for(const r of e.$_terms.keys)l.tryWithPath((()=>t.add(r,{after:r.schema.$_rootReferences(),group:r.key})),r.key);e.$_terms.keys=new d.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys&&(e=e.keys(t.keys)),t.dependencies)for(const{rel:r,key:n=null,peers:s,options:i}of t.dependencies)e=d.dependency(e,r,n,s,i);if(t.patterns)for(const{regex:r,schema:n,rule:s,fallthrough:i,matches:a}of t.patterns)e=e.pattern(r||n,s,{fallthrough:i,matches:a});if(t.renames)for(const{from:r,to:n,options:s}of t.renames)e=e.rename(r,n,s);return e}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),d.clone=function(e,t){if("object"==typeof e){if(t.nonEnumerables)return i(e,{shallow:!0});const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}const r=function(...t){return e.apply(this,t)};return r.prototype=i(e.prototype),Object.defineProperty(r,"name",{value:e.name,writable:!1}),Object.defineProperty(r,"length",{value:e.length,writable:!1}),Object.assign(r,e),r},d.dependency=function(e,t,r,n,i){s(null===r||"string"==typeof r,t,"key must be a strings"),i||(i=n.length>1&&"object"==typeof n[n.length-1]?n.pop():{}),l.assertOptions(i,["separator","isPresent"]),n=[].concat(n);const a=l.default(i.separator,"."),o=[];for(const l of n)s("string"==typeof l,t,"peers must be strings"),o.push(c.ref(l,{separator:a,ancestor:0,prefix:!1}));null!==r&&(r=c.ref(r,{separator:a,ancestor:0,prefix:!1}));const u=e.clone();return u.$_terms.dependencies=u.$_terms.dependencies||[],u.$_terms.dependencies.push(new d.Dependency(t,r,o,n,i)),u},d.dependencies={and(e,t,r,n,s){const i=[],a=[],o=t.peers.length,l=d.isPresent(t.options);for(const c of t.peers)!1===l(c.resolve(r,n,s,null,{shadow:!1}))?i.push(c.key):a.push(c.key);if(i.length!==o&&a.length!==o)return{code:"object.and",context:{present:a,presentWithLabels:d.keysToLabels(e,a),missing:i,missingWithLabels:d.keysToLabels(e,i)}}},nand(e,t,r,n,s){const i=[],a=d.isPresent(t.options);for(const c of t.peers)a(c.resolve(r,n,s,null,{shadow:!1}))&&i.push(c.key);if(i.length!==t.peers.length)return;const o=t.paths[0],l=t.paths.slice(1);return{code:"object.nand",context:{main:o,mainWithLabel:d.keysToLabels(e,o),peers:l,peersWithLabels:d.keysToLabels(e,l)}}},or(e,t,r,n,s){const i=d.isPresent(t.options);for(const a of t.peers)if(i(a.resolve(r,n,s,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:t.paths,peersWithLabels:d.keysToLabels(e,t.paths)}}},oxor(e,t,r,n,s){const i=[],a=d.isPresent(t.options);for(const l of t.peers)a(l.resolve(r,n,s,null,{shadow:!1}))&&i.push(l.key);if(!i.length||1===i.length)return;const o={peers:t.paths,peersWithLabels:d.keysToLabels(e,t.paths)};return o.present=i,o.presentWithLabels=d.keysToLabels(e,i),{code:"object.oxor",context:o}},with(e,t,r,n,s){const i=d.isPresent(t.options);for(const a of t.peers)if(!1===i(a.resolve(r,n,s,null,{shadow:!1})))return{code:"object.with",context:{main:t.key.key,mainWithLabel:d.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:d.keysToLabels(e,a.key)}}},without(e,t,r,n,s){const i=d.isPresent(t.options);for(const a of t.peers)if(i(a.resolve(r,n,s,null,{shadow:!1})))return{code:"object.without",context:{main:t.key.key,mainWithLabel:d.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:d.keysToLabels(e,a.key)}}},xor(e,t,r,n,s){const i=[],a=d.isPresent(t.options);for(const l of t.peers)a(l.resolve(r,n,s,null,{shadow:!1}))&&i.push(l.key);if(1===i.length)return;const o={peers:t.paths,peersWithLabels:d.keysToLabels(e,t.paths)};return 0===i.length?{code:"object.missing",context:o}:(o.present=i,o.presentWithLabels=d.keysToLabels(e,i),{code:"object.xor",context:o})}},d.keysToLabels=function(e,t){return Array.isArray(t)?t.map((t=>e.$_mapLabels(t))):e.$_mapLabels(t)},d.isPresent=function(e){return"function"==typeof e.isPresent?e.isPresent:e=>void 0!==e},d.rename=function(e,t,r,n,s){const i={};for(const a of e.$_terms.renames){const o=[],l="string"!=typeof a.from;if(l)for(const e in t){if(void 0===t[e]&&a.options.ignoreUndefined)continue;if(e===a.to)continue;const r=a.from.exec(e);r&&o.push({from:e,to:a.to,match:r})}else!Object.prototype.hasOwnProperty.call(t,a.from)||void 0===t[a.from]&&a.options.ignoreUndefined||o.push(a);for(const c of o){const o=c.from;let u=c.to;if(u instanceof h&&(u=u.render(t,r,n,c.match)),o!==u){if(!a.options.multiple&&i[u]&&(s.push(e.$_createError("object.rename.multiple",t,{from:o,to:u,pattern:l},r,n)),n.abortEarly))return!1;if(Object.prototype.hasOwnProperty.call(t,u)&&!a.options.override&&!i[u]&&(s.push(e.$_createError("object.rename.override",t,{from:o,to:u,pattern:l},r,n)),n.abortEarly))return!1;void 0===t[o]?delete t[u]:t[u]=t[o],i[u]=!0,a.options.alias||delete t[o]}}}return!0},d.unknown=function(e,t,r,n,s,i){if(e.$_terms.patterns){let a=!1;const o=e.$_terms.patterns.map((e=>{if(e.matches)return a=!0,[]})),l=[t,...s.ancestors];for(const c of r){const a=t[c],u=[...s.path,c];for(let f=0;f<e.$_terms.patterns.length;++f){const h=e.$_terms.patterns[f];if(h.regex){const e=h.regex.test(c);if(s.mainstay.tracer.debug(s,"rule",`pattern.${f}`,e?"pass":"error"),!e)continue}else if(!h.schema.$_match(c,s.nest(h.schema,`pattern.${f}`),i))continue;r.delete(c);const d=s.localize(u,l,{schema:h.rule,key:c}),p=h.rule.$_validate(a,d,i);if(p.errors){if(i.abortEarly)return{value:t,errors:p.errors};n.push(...p.errors)}if(h.matches&&o[f].push(c),t[c]=p.value,!h.fallthrough)break}}if(a)for(let r=0;r<o.length;++r){const a=o[r];if(!a)continue;const c=e.$_terms.patterns[r].matches,f=s.localize(s.path,l,c),h=c.$_validate(a,f,i);if(h.errors){const r=u.details(h.errors,{override:!1});r.matches=a;const o=e.$_createError("object.pattern.match",t,r,s,i);if(i.abortEarly)return{value:t,errors:o};n.push(o)}}}if(r.size&&(e.$_terms.keys||e.$_terms.patterns)){if(i.stripUnknown&&void 0===e._flags.unknown||i.skipFunctions){const e=!(!i.stripUnknown||!0!==i.stripUnknown&&!i.stripUnknown.objects);for(const n of r)e?(delete t[n],r.delete(n)):"function"==typeof t[n]&&r.delete(n)}if(!l.default(e._flags.unknown,i.allowUnknown))for(const a of r){const r=s.localize([...s.path,a],[]),o=e.$_createError("object.unknown",t[a],{child:a},r,i,{flags:!1});if(i.abortEarly)return{value:t,errors:o};n.push(o)}}},d.Dependency=class{constructor(e,t,r,n,s){this.rel=e,this.key=t,this.peers=r,this.paths=n,this.options=s}describe(){const e={rel:this.rel,peers:this.paths};return null!==this.key&&(e.key=this.key.key),"."!==this.peers[0].separator&&(e.options={...e.options,separator:this.peers[0].separator}),this.options.isPresent&&(e.options={...e.options,isPresent:this.options.isPresent}),e}},d.Keys=class extends Array{concat(e){const t=this.slice(),r=new Map;for(let n=0;n<t.length;++n)r.set(t[n].key,n);for(const n of e){const e=n.key,s=r.get(e);void 0!==s?t[s]={key:e,schema:t[s].schema.concat(n.schema)}:t.push(n)}return t}}},8785:(e,t,r)=>{"use strict";const n=r(375),s=r(8068),i=r(8160),a=r(3292),o=r(6354),l={};e.exports=s.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(e,t)=>e.ref(t),validate(e,{schema:t,state:r,prefs:s}){n(t.$_terms.link,"Uninitialized link schema");const i=l.generate(t,e,r,s),a=t.$_terms.link[0].ref;return i.$_validate(e,r.nest(i,`link:${a.display}:${i.type}`),s)},generate:(e,t,r,n)=>l.generate(e,t,r,n),rules:{ref:{method(e){n(!this.$_terms.link,"Cannot reinitialize schema"),e=a.ref(e),n("value"===e.type||"local"===e.type,"Invalid reference type:",e.type),n("local"===e.type||"root"===e.ancestor||e.ancestor>0,"Link cannot reference itself");const t=this.clone();return t.$_terms.link=[{ref:e}],t}},relative:{method(e=!0){return this.$_setFlag("relative",e)}}},overrides:{concat(e){n(this.$_terms.link,"Uninitialized link schema"),n(i.isSchema(e),"Invalid schema object"),n("link"!==e.type,"Cannot merge type link with another link");const t=this.clone();return t.$_terms.whens||(t.$_terms.whens=[]),t.$_terms.whens.push({concat:e}),t.$_mutateRebuild()}},manifest:{build:(e,t)=>(n(t.link,"Invalid link description missing link"),e.ref(t.link))}}),l.generate=function(e,t,r,n){let s=r.mainstay.links.get(e);if(s)return s._generate(t,r,n).schema;const i=e.$_terms.link[0].ref,{perspective:a,path:o}=l.perspective(i,r);l.assert(a,"which is outside of schema boundaries",i,e,r,n);try{s=o.length?a.$_reach(o):a}catch(t){l.assert(!1,"to non-existing schema",i,e,r,n)}return l.assert("link"!==s.type,"which is another link",i,e,r,n),e._flags.relative||r.mainstay.links.set(e,s),s._generate(t,r,n).schema},l.perspective=function(e,t){if("local"===e.type){for(const{schema:r,key:n}of t.schemas){if((r._flags.id||n)===e.path[0])return{perspective:r,path:e.path.slice(1)};if(r.$_terms.shared)for(const t of r.$_terms.shared)if(t._flags.id===e.path[0])return{perspective:t,path:e.path.slice(1)}}return{perspective:null,path:null}}return"root"===e.ancestor?{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}:{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}},l.assert=function(e,t,r,s,i,a){e||n(!1,`"${o.label(s._flags,i,a)}" contains link reference "${r.display}" ${t}`)}},3832:(e,t,r)=>{"use strict";const n=r(375),s=r(8068),i=r(8160),a={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const t=e.toString(),r=t.indexOf("."),n=t.indexOf("e");return(r<0?0:(n<0?t.length:n)-r-1)+(n<0?0:Math.max(0,-parseInt(t.slice(n+1))))}};e.exports=s.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,{schema:t,error:r}){if(!e.match(a.numberRx))return;e=e.trim();const n={value:parseFloat(e)};if(0===n.value&&(n.value=0),!t._flags.unsafe)if(e.match(/e/i)){if(a.extractSignificantDigits(e)!==a.extractSignificantDigits(String(n.value)))return n.errors=r("number.unsafe"),n}else{const t=n.value.toString();if(t.match(/e/i))return n;if(t!==a.normalizeDecimal(e))return n.errors=r("number.unsafe"),n}return n}},validate(e,{schema:t,error:r,prefs:n}){if(e===1/0||e===-1/0)return{value:e,errors:r("number.infinity")};if(!i.isNumber(e))return{value:e,errors:r("number.base")};const s={value:e};if(n.convert){const e=t.$_getRule("precision");if(e){const t=Math.pow(10,e.args.limit);s.value=Math.round(s.value*t)/t}}return 0===s.value&&(s.value=0),!t._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(s.errors=r("number.unsafe")),s},rules:{compare:{method:!1,validate:(e,t,{limit:r},{name:n,operator:s,args:a})=>i.compare(e,r,s)?e:t.error("number."+n,{limit:a.limit,value:e}),args:[{name:"limit",ref:!0,assert:i.isNumber,message:"must be a number"}]},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{limit:e},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,t)=>
1Math.trunc(e)-e==0?e:t.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){const t="number"==typeof e?a.decimalPlaces(e):null,r=Math.pow(10,t);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:t,pfactor:r}})},validate:(e,t,{base:r,baseDecimalPlace:n,pfactor:s},i)=>a.decimalPlaces(e)>n?t.error("number.multiple",{multiple:i.args.base,value:e}):Math.round(s*e)%Math.round(s*r)==0?e:t.error("number.multiple",{multiple:i.args.base,value:e}),args:[{name:"base",ref:!0,assert:e=>"number"==typeof e&&isFinite(e)&&e>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,t)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:t.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return n(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,t,{limit:r}){const n=e.toString().match(a.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=r?e:t.error("number.precision",{limit:r,value:e})},convert:!0},sign:{method(e){return n(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate:(e,t,{sign:r})=>"negative"===r&&e<0||"positive"===r&&e>0?e:t.error(`number.${r}`)},unsafe:{method(e=!0){return n("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>"number"==typeof e,to:(e,t)=>e.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),a.extractSignificantDigits=function(e){return e.replace(a.exponentialPartRegex,"").replace(a.dotRegex,"").replace(a.trailingZerosRegex,"").replace(a.leadingSignAndZerosRegex,"")},a.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),"-0"===e?"0":e}},8966:(e,t,r)=>{"use strict";const n=r(7824);e.exports=n.extend({type:"object",cast:{map:{from:e=>e&&"object"==typeof e,to:(e,t)=>new Map(Object.entries(e))}}})},7417:(e,t,r)=>{"use strict";const n=r(375),s=r(5380),i=r(1745),a=r(9959),o=r(6064),l=r(9926),c=r(5752),u=r(8068),f=r(8160),h={tlds:l instanceof Set&&{tlds:{allow:l,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:a.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};e.exports=u.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(e,{schema:t,state:r,prefs:n}){const s=t.$_getRule("normalize");s&&(e=e.normalize(s.args.form));const i=t.$_getRule("case");i&&(e="upper"===i.args.direction?e.toLocaleUpperCase():e.toLocaleLowerCase());const a=t.$_getRule("trim");if(a&&a.args.enabled&&(e=e.trim()),t.$_terms.replacements)for(const l of t.$_terms.replacements)e=e.replace(l.pattern,l.replacement);const o=t.$_getRule("hex");
vendor: 8,710 bytes, line 1
1if(o&&o.args.options.byteAligned&&e.length%2!=0&&(e=`0${e}`),t.$_getRule("isoDate")){const t=h.isoDate(e);t&&(e=t)}if(t._flags.truncate){const s=t.$_getRule("max");if(s){let i=s.args.limit;if(f.isResolvable(i)&&(i=i.resolve(e,r,n),!f.limit(i)))return{value:e,errors:t.$_createError("any.ref",i,{ref:s.args.limit,arg:"limit",reason:"must be a positive integer"},r,n)};e=e.slice(0,i)}}return{value:e}}},validate(e,{schema:t,error:r}){if("string"!=typeof e)return{value:e,errors:r("string.base")};if(""===e){const n=t.$_getRule("min");if(n&&0===n.args.limit)return;return{value:e,errors:r("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(e,t)=>/^[a-zA-Z0-9]+$/.test(e)?e:t.error("string.alphanum")},base64:{method(e={}){return f.assertOptions(e,["paddingRequired","urlSafe"]),e={urlSafe:!1,paddingRequired:!0,...e},n("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),n("boolean"==typeof e.urlSafe,"urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:e}})},validate:(e,t,{options:r})=>h.base64Regex[r.paddingRequired][r.urlSafe].test(e)?e:t.error("string.base64")},case:{method(e){return n(["lower","upper"].includes(e),"Invalid case:",e),this.$_addRule({name:"case",args:{direction:e}})},validate:(e,t,{direction:r})=>"lower"===r&&e===e.toLocaleLowerCase()||"upper"===r&&e===e.toLocaleUpperCase()?e:t.error(`string.${r}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(e,t){let r=e.length,n=0,s=1;for(;r--;){const t=e.charAt(r)*s;n+=t-9*(t>9),s^=3}return n>0&&n%10==0?e:t.error("string.creditCard")}},dataUri:{method(e={}){return f.assertOptions(e,["paddingRequired"]),e={paddingRequired:!0,...e},n("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:e}})},validate(e,t,{options:r}){const n=e.match(h.dataUriRegex);if(n){if(!n[2])return e;if("base64"!==n[2])return e;if(h.base64Regex[r.paddingRequired].false.test(n[3]))return e}return t.error("string.dataUri")}},domain:{method(e){e&&f.assertOptions(e,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const t=h.addressOptions(e);return this.$_addRule({name:"domain",args:{options:e},address:t})},validate:(e,t,r,{address:n})=>s.isValid(e,n)?e:t.error("string.domain")},email:{method(e={}){f.assertOptions(e,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),n(void 0===e.multiple||"boolean"==typeof e.multiple,"multiple option must be an boolean");const t=h.addressOptions(e),r=new RegExp(`\\s*[${e.separator?o(e.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:e},regex:r,address:t})},validate(e,t,{options:r},{regex:n,address:s}){const a=r.multiple?e.split(n):[e],o=[];for(const l of a)i.isValid(l,s)||o.push(l);return o.length?t.error("string.email",{value:e,invalids:o}):e}},guid:{alias:"uuid",method(e={}){f.assertOptions(e,["version","separator"]);let t="";if(e.version){const r=[].concat(e.version);n(r.length>=1,"version must have at least 1 valid version specified");const s=new Set;for(let e=0;e<r.length;++e){const i=r[e];n("string"==typeof i,"version at position "+e+" must be a string");const a=h.guidVersions[i.toLowerCase()];n(a,"version at position "+e+" must be one of "+Object.keys(h.guidVersions).join(", ")),n(!s.has(a),"version at position "+e+" must not be a duplicate"),t+=a,s.add(a)}}n(h.guidSeparators.has(e.separator),'separator must be one of true, false, "-", or ":"');const r=void 0===e.separator?"[:-]?":!0===e.separator?"[:-]":!1===e.separator?"[]?":`\\${e.separator}`,s=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${r})[0-9A-F]{4}\\2?[${t||"0-9A-F"}][0-9A-F]{3}\\2?[${t?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:e},regex:s})},validate(e,t,r,{regex:n}){const s=n.exec(e);return s?h.guidBrackets[s[1]]!==s[s.length-1]?t.error("string.guid"):e:t.error("string.guid")}},hex:{method(e={}){return f.assertOptions(e,["byteAligned","prefix"]),e={byteAligned:!1,prefix:!1,...e},n("boolean"==typeof e.byteAligned,"byteAligned must be boolean"),n("boolean"==typeof e.prefix||"optional"===e.prefix,'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:e}})},validate:(e,t,{options:r})=>("optional"===r.prefix?h.hexRegex.withOptionalPrefix:!0===r.prefix?h.hexRegex.withPrefix:h.hexRegex.withoutPrefix).test(e)?r.byteAligned&&e.length%2!=0?t.error("string.hexAlign"):e:t.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(e,t)=>s.isValid(e,{minDomainSegments:1})||h.ipRegex.test(e)?e:t.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(e={}){f.assertOptions(e,["cidr","version"]);const{cidr:t,versions:r,regex:n}=a.regex(e),s=e.version?r:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:t,version:s}},regex:n})},validate:(e,t,{options:r},{regex:n})=>n.test(e)?e:r.version?t.error("string.ipVersion",{value:e,cidr:r.cidr,version:r.version}):t.error("string.ip",{value:e,cidr:r.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(e,{error:t})=>h.isoDate(e)?e:t("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(e,t)=>h.isoDurationRegex.test(e)?e:t.error("string.isoDuration")},length:{method(e,t){return h.length(this,"length",e,"=",t)},validate(e,t,{limit:r,encoding:n},{name:s,operator:i,args:a}){const o=!n&&e.length;return f.compare(o,r,i)?e:t.error("string."+s,{limit:a.limit,value:e,encoding:n})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(e,t){return h.length(this,"max",e,"<=",t)},args:["limit","encoding"]},min:{method(e,t){return h.length(this,"min",e,">=",t)},args:["limit","encoding"]},normalize:{method(e="NFC"){return n(h.normalizationForms.includes(e),"normalization form must be one of "+h.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:e}})},validate:(e,{error:t},{form:r})=>e===e.normalize(r)?e:t("string.normalize",{value:e,form:r}),convert:!0},pattern:{alias:"regex",method(e,t={}){n(e instanceof RegExp,"regex must be a RegExp"),n(!e.flags.includes("g")&&!e.flags.includes("y"),"regex should not use global or sticky mode"),"string"==typeof t&&(t={name:t}),f.assertOptions(t,["invert","name"]);const r=["string.pattern",t.invert?".invert":"",t.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:e,options:t},errorCode:r})},validate:(e,t,{regex:r,options:n},{errorCode:s})=>r.test(e)^n.invert?e:t.error(s,{name:n.name,regex:r,value:e}),args:["regex","options"],multi:!0},replace:{method(e,t){"string"==typeof e&&(e=new RegExp(o(e),"g")),n(e instanceof RegExp,"pattern must be a RegExp"),n("string"==typeof t,"replacement must be a String");const r=this.clone();return r.$_terms.replacements||(r.$_terms.replacements=[]),r.$_terms.replacements.push({pattern:e,replacement:t}),r}},token:{method(){return this.$_addRule("token")},validate:(e,t)=>/^\w+$/.test(e)?e:t.error("string.token")},trim:{method(e=!0){return n("boolean"==typeof e,"enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:e}})},validate:(e,t,{enabled:r})=>r&&e!==e.trim()?t.error("string.trim"):e,convert:!0},truncate:{method(e=!0){return n("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("truncate",e)}},uppercase:{method(){return this.case("upper")}},uri:{method(e={}){f.assertOptions(e,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),e.domain&&f.assertOptions(e.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:t,scheme:r}=c.regex(e),n=e.domain?h.addressOptions(e.domain):null;return this.$_addRule({name:"uri",args:{options:e},regex:t,domain:n,scheme:r})},validate(e,t,{options:r},{regex:n,domain:i,scheme:a}){if(["http:/","https:/"].includes(e))return t.error("string.uri");let o=n.exec(e);if(!o&&t.prefs.convert&&r.encodeUri){const t=encodeURI(e);o=n.exec(t),o&&(e=t)}if(o){const n=o[1]||o[2];return!i||r.allowRelative&&!n||s.isValid(n,i)?e:t.error("string.domain",{value:n})}return r.relativeOnly?t.error("string.uriRelativeOnly"):r.scheme?t.error("string.uriCustomScheme",{scheme:a,value:e}):t.error("string.uri")}}},manifest:{build(e,t){if(t.replacements)for(const{pattern:r,replacement:n}of t.replacements)e=e.replace(r,n);return e}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}}
1 must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),h.addressOptions=function(e){if(!e)return h.tlds||e;if(n(void 0===e.minDomainSegments||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,"minDomainSegments must be a positive integer"),n(void 0===e.maxDomainSegments||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),!1===e.tlds)return e;if(!0===e.tlds||void 0===e.tlds)return n(h.tlds,"Built-in TLD list disabled"),Object.assign({},e,h.tlds);n("object"==typeof e.tlds,"tlds must be true, false, or an object");const t=e.tlds.deny;if(t)return Array.isArray(t)&&(e=Object.assign({},e,{tlds:{deny:new Set(t)}})),n(e.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),n(!e.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),h.validateTlds(e.tlds.deny,"tlds.deny"),e;const r=e.tlds.allow;return r?!0===r?(n(h.tlds,"Built-in TLD list disabled"),Object.assign({},e,h.tlds)):(Array.isArray(r)&&(e=Object.assign({},e,{tlds:{allow:new Set(r)}})),n(e.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),h.validateTlds(e.tlds.allow,"tlds.allow"),e):e},h.validateTlds=function(e,t){for(const r of e)n(s.isValid(r,{minDomainSegments:1,maxDomainSegments:1}),`${t} must contain valid top level domain names`)},h.isoDate=function(e){if(!f.isIsoDate(e))return null;/.*T.*[+-]\d\d$/.test(e)&&(e+="00");const t=new Date(e);return isNaN(t.getTime())?null:t.toISOString()},h.length=function(e,t,r,s,i){return n(!i||!1,"Invalid encoding:",i),e.$_addRule({name:t,method:"length",args:{limit:r,encoding:i},operator:s})}},8826:(e,t,r)=>{"use strict";const n=r(375),s=r(8068),i={};i.Map=class extends Map{slice(){return new i.Map(this)}},e.exports=s.extend({type:"symbol",terms:{map:{init:new i.Map}},coerce:{method(e,{schema:t,error:r}){const n=t.$_terms.map.get(e);return n&&(e=n),t._flags.only&&"symbol"!=typeof e?{value:e,errors:r("symbol.map",{map:t.$_terms.map})}:{value:e}}},validate(e,{error:t}){if("symbol"!=typeof e)return{value:e,errors:t("symbol.base")}},rules:{map:{method(e){e&&!e[Symbol.iterator]&&"object"==typeof e&&(e=Object.entries(e)),n(e&&e[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),r=[];for(const s of e){n(s&&s[Symbol.iterator],"Entry must be an iterable");const[e,i]=s;n("object"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e,"Key must not be of type object, function, or Symbol"),n("symbol"==typeof i,"Value must be a Symbol"),t.$_terms.map.set(e,i),r.push(i)}return t.valid(...r)}}},manifest:{build:(e,t)=>(t.map&&(e=e.map(t.map)),e)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(738),a=r(9621),o=r(8160),l=r(6354),c=r(493),u={result:Symbol("result")};t.entry=function(e,t,r){let s=o.defaults;r&&(n(void 0===r.warnings,"Cannot override warnings preference in synchronous validation"),n(void 0===r.artifacts,"Cannot override artifacts preference in synchronous validation"),s=o.preferences(o.defaults,r));const i=u.entry(e,t,s);n(!i.mainstay.externals.length,"Schema with external rules must use validateAsync()");const a={value:i.value};return i.error&&(a.error=i.error),i.mainstay.warnings.length&&(a.warning=l.details(i.mainstay.warnings)
vendor: 14,215 bytes, line 1
1),i.mainstay.debug&&(a.debug=i.mainstay.debug),i.mainstay.artifacts&&(a.artifacts=i.mainstay.artifacts),a},t.entryAsync=async function(e,t,r){let n=o.defaults;r&&(n=o.preferences(o.defaults,r));const s=u.entry(e,t,n),i=s.mainstay;if(s.error)throw i.debug&&(s.error.debug=i.debug),s.error;if(i.externals.length){let t=s.value;const c=[];for(const s of i.externals){const f=s.state.path,h="link"===s.schema.type?i.links.get(s.schema):null;let d,p,m=t;const g=f.length?[t]:[],y=f.length?a(e,f):e;if(f.length){d=f[f.length-1];let e=t;for(const t of f.slice(0,-1))e=e[t],g.unshift(e);p=g[0],m=p[d]}try{const e=(e,t)=>(h||s.schema).$_createError(e,m,t,s.state,n),a=await s.method(m,{schema:s.schema,linked:h,state:s.state,prefs:r,original:y,error:e,errorsArray:u.errorsArray,warn:(e,t)=>i.warnings.push((h||s.schema).$_createError(e,m,t,s.state,n)),message:(e,t)=>(h||s.schema).$_createError("external",m,t,s.state,n,{messages:e})});if(void 0===a||a===m)continue;if(a instanceof l.Report){if(i.tracer.log(s.schema,s.state,"rule","external","error"),c.push(a),n.abortEarly)break;continue}if(Array.isArray(a)&&a[o.symbols.errors]){if(i.tracer.log(s.schema,s.state,"rule","external","error"),c.push(...a),n.abortEarly)break;continue}p?(i.tracer.value(s.state,"rule",m,a,"external"),p[d]=a):(i.tracer.value(s.state,"rule",t,a,"external"),t=a)}catch(e){throw n.errors.label&&(e.message+=` (${s.label})`),e}}if(s.value=t,c.length)throw s.error=l.process(c,e,n),i.debug&&(s.error.debug=i.debug),s.error}if(!n.warnings&&!n.debug&&!n.artifacts)return s.value;const c={value:s.value};return i.warnings.length&&(c.warning=l.details(i.warnings)),i.debug&&(c.debug=i.debug),i.artifacts&&(c.artifacts=i.artifacts),c},u.Mainstay=class{constructor(e,t,r){this.externals=[],this.warnings=[],this.tracer=e,this.debug=t,this.links=r,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const e=this._snapshots.pop();this.externals=e.externals,this.warnings=e.warnings}commit(){this._snapshots.pop()}},u.entry=function(e,r,n){const{tracer:s,cleanup:i}=u.tracer(r,n),a=n.debug?[]:null,o=r._ids._schemaChain?new Map:null,f=new u.Mainstay(s,a,o),h=r._ids._schemaChain?[{schema:r}]:null,d=new c([],[],{mainstay:f,schemas:h}),p=t.validate(e,r,d,n);i&&r.$_root.untrace();const m=l.process(p.errors,e,n);return{value:p.value,error:m,mainstay:f}},u.tracer=function(e,t){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:t.debug?(n(e.$_root.trace,"Debug mode not supported"),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:u.ignore}},t.validate=function(e,t,r,n,s={}){if(t.$_terms.whens&&(t=t._generate(e,r,n).schema),t._preferences&&(n=u.prefs(t,n)),t._cache&&n.cache){const n=t._cache.get(e);if(r.mainstay.tracer.debug(r,"validate","cached",!!n),n)return n}const i=(s,i,a)=>t.$_createError(s,e,i,a||r,n),a={original:e,prefs:n,schema:t,state:r,error:i,errorsArray:u.errorsArray,warn:(e,t,n)=>r.mainstay.warnings.push(i(e,t,n)),message:(s,i)=>t.$_createError("custom",e,i,r,n,{messages:s})};r.mainstay.tracer.entry(t,r);const l=t._definition;if(l.prepare&&void 0!==e&&n.convert){const t=l.prepare(e,a);if(t){if(r.mainstay.tracer.value(r,"prepare",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),a);e=t.value}}if(l.coerce&&void 0!==e&&n.convert&&(!l.coerce.from||l.coerce.from.includes(typeof e))){const t=l.coerce.method(e,a);if(t){if(r.mainstay.tracer.value(r,"coerced",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),a);e=t.value}}const c=t._flags.empty;c&&c.$_match(u.trim(e,t),r.nest(c),o.defaults)&&(r.mainstay.tracer.value(r,"empty",e,void 0),e=void 0);const f=s.presence||t._flags.presence||(t._flags._endedSwitch?null:n.presence);if(void 0===e){if("forbidden"===f)return u.finalize(e,null,a);if("required"===f)return u.finalize(e,[t.$_createError("any.required",e,null,r,n)],a);if("optional"===f){if(t._flags.default!==o.symbols.deepDefault)return u.finalize(e,null,a);r.mainstay.tracer.value(r,"default",e,{}),e={}}}else if("forbidden"===f)return u.finalize(e,[t.$_createError("any.unknown",e,null,r,n)],a);const h=[];if(t._valids){const s=t._valids.get(e,r,n,t._flags.insensitive);if(s)return n.convert&&(r.mainstay.tracer.value(r,"valids",e,s.value),e=s.value),r.mainstay.tracer.filter(t,r,"valid",s),u.finalize(e,null,a);if(t._flags.only){const s=t.$_createError("any.only",e,{valids:t._valids.values({display:!0})},r,n);if(n.abortEarly)return u.finalize(e,[s],a);h.push(s)}}if(t._invalids){const s=t._invalids.get(e,r,n,t._flags.insensitive);if(s){r.mainstay.tracer.filter(t,r,"invalid",s);const i=t.$_createError("any.invalid",e,{invalids:t._invalids.values({display:!0})},r,n);if(n.abortEarly)return u.finalize(e,[i],a);h.push(i)}}if(l.validate){const t=l.validate(e,a);if(t&&(r.mainstay.tracer.value(r,"base",e,t.value),e=t.value,t.errors)){if(!Array.isArray(t.errors))return h.push(t.errors),u.finalize(e,h,a);if(t.errors.length)return h.push(...t.errors),u.finalize(e,h,a)}}return t._rules.length?u.rules(e,h,a):u.finalize(e,h,a)},u.rules=function(e,t,r){const{schema:n,state:s,prefs:i}=r;for(const a of n._rules){const l=n._definition.rules[a.method];if(l.convert&&i.convert){s.mainstay.tracer.log(n,s,"rule",a.name,"full");continue}let c,f=a.args;if(a._resolve.length){f=Object.assign({},f);for(const t of a._resolve){const r=l.argsByName.get(t),a=f[t].resolve(e,s,i),u=r.normalize?r.normalize(a):a,h=o.validateArg(u,null,r);if(h){c=n.$_createError("any.ref",a,{arg:t,ref:f[t],reason:h},s,i);break}f[t]=u}}c=c||l.validate(e,r,f,a);const h=u.rule(c,a);if(h.errors){if(s.mainstay.tracer.log(n,s,"rule",a.name,"error"),a.warn){s.mainstay.warnings.push(...h.errors);continue}if(i.abortEarly)return u.finalize(e,h.errors,r);t.push(...h.errors)}else s.mainstay.tracer.log(n,s,"rule",a.name,"pass"),s.mainstay.tracer.value(s,"rule",e,h.value,a.name),e=h.value}return u.finalize(e,t,r)},u.rule=function(e,t){return e instanceof l.Report?(u.error(e,t),{errors:[e],value:null}):Array.isArray(e)&&e[o.symbols.errors]?(e.forEach((e=>u.error(e,t))),{errors:e,value:null}):{errors:null,value:e}},u.error=function(e,t){return t.message&&e._setTemplate(t.message),e},u.finalize=function(e,t,r){t=t||[];const{schema:s,state:i,prefs:a}=r;if(t.length){const n=u.default("failover",void 0,t,r);void 0!==n&&(i.mainstay.tracer.value(i,"failover",e,n),e=n,t=[])}if(t.length&&s._flags.error)if("function"==typeof s._flags.error){t=s._flags.error(t),Array.isArray(t)||(t=[t]);for(const e of t)n(e instanceof Error||e instanceof l.Report,"error() must return an Error object")}else t=[s._flags.error];if(void 0===e){const n=u.default("default",e,t,r);i.mainstay.tracer.value(i,"default",e,n),e=n}if(s._flags.cast&&void 0!==e){const t=s._definition.cast[s._flags.cast];if(t.from(e)){const n=t.to(e,r);i.mainstay.tracer.value(i,"cast",e,n,s._flags.cast),e=n}}if(s.$_terms.externals&&a.externals&&!1!==a._externals)for(const{method:n}of s.$_terms.externals)i.mainstay.externals.push({method:n,schema:s,state:i,label:l.label(s._flags,i,a)});const o={value:e,errors:t.length?t:null};return s._flags.result&&(o.value="strip"===s._flags.result?void 0:r.original,i.mainstay.tracer.value(i,s._flags.result,e,o.value),i.shadow(e,s._flags.result)),s._cache&&!1!==a.cache&&!s._refs.length&&s._cache.set(r.original,o),void 0===e||o.errors||void 0===s._flags.artifact||(i.mainstay.artifacts=i.mainstay.artifacts||new Map,i.mainstay.artifacts.has(s._flags.artifact)||i.mainstay.artifacts.set(s._flags.artifact,[]),i.mainstay.artifacts.get(s._flags.artifact).push(i.path)),o},u.prefs=function(e,t){const r=t===o.defaults;return r&&e._preferences[o.symbols.prefs]?e._preferences[o.symbols.prefs]:(t=o.preferences(t,e._preferences),r&&(e._preferences[o.symbols.prefs]=t),t)},u.default=function(e,t,r,n){const{schema:i,state:a,prefs:l}=n,c=i._flags[e];if(l.noDefaults||void 0===c)return t;if(a.mainstay.tracer.log(i,a,"rule",e,"full"),!c)return c;if("function"==typeof c){const o=c.length?[s(a.ancestors[0]),n]:[];try{return c(...o)}catch(t){return void r.push(i.$_createError(`any.${e}`,null,{error:t},a,l))}}return"object"!=typeof c?c:c[o.symbols.literal]?c.literal:o.isResolvable(c)?c.resolve(t,a,l):s(c)},u.trim=function(e,t){if("string"!=typeof e)return e;const r=t.$_getRule("trim");return r&&r.args.enabled?e.trim():e},u.ignore={active:!1,debug:i,entry:i,filter:i,log:i,resolve:i,value:i},u.errorsArray=function(){const e=[];return e[o.symbols.errors]=!0,e}},2036:(e,t,r)=>{"use strict";const n=r(375),s=r(9474),i=r(8160),a={};e.exports=a.Values=class{constructor(e,t){this._values=new Set(e),this._refs=new Set(t),this._lowercase=a.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,t){i.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),t&&t.register(e)):this.has(e,null,null,!1)||(this._values.add(e),"string"==typeof e&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,t,r){if(e=e||new a.Values,t){if(t._override)return t.clone();for(const r of[...t._values,...t._refs])e.add(r)}if(r)for(const n of[...r._values,...r._refs])e.remove(n);return e.length?e:null}remove(e){i.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),"string"==typeof e&&this._lowercase.delete(e.toLowerCase()))}has(e,t,r,n){return!!this.get(e,t,r,n)}get(e,t,r,n){if(!this.length)return!1;if(this._values.has(e))return{value:e};if("string"==typeof e&&e&&n){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&"object"!=typeof e)return!1;if("object"==typeof e)for(const i of this._values)if(s(i,e))return{value:i};if(t)for(const i of this._refs){const a=i.resolve(e,t,r,null,{in:!0});if(void 0===a)continue;const o=i.in&&"object"==typeof a?Array.isArray(a)?a:Object.keys(a):[a];for(const t of o)if(typeof t==typeof e)if(n&&e&&"string"==typeof e){if(t.toLowerCase()===e.toLowerCase())return{value:t,ref:i}}else if(s(t,e))return{value:t,ref:i}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const e=[];for(const t of[...this._values,...this._refs])void 0!==t&&e.push(t);return e}return Array.from([...this._values,...this._refs])}clone(){const e=new a.Values(this._values,this._refs);return e._override=this._override,e}concat(e){n(!e._override,"Cannot concat override set of values");const t=new a.Values([...this._values,...e._values],[...this._refs,...e._refs]);return t._override=this._override,t}describe(){const e=[];this._override&&e.push({override:!0});for(const t of this._values.values())e.push(t&&"object"==typeof t?{value:t}:t);for(const t of this._refs.values())e.push(t.describe());return e}},a.Values.prototype[i.symbols.values]=!0,a.Values.prototype.slice=a.Values.prototype.clone,a.lowercases=function(e){const t=new Map;if(e)for(const r of e)"string"==typeof r&&t.set(r.toLowerCase(),r);return t}},978:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(1687),a=r(9621),o={};e.exports=function(e,t,r={}){if(n(e&&"object"==typeof e,"Invalid defaults value: must be an object"),n(!t||!0===t||"object"==typeof t,"Invalid source value: must be true, falsy or an object"),n("object"==typeof r,"Invalid options: must be an object"),!t)return null;if(r.shallow)return o.applyToDefaultsWithShallow(e,t,r);const a=s(e);if(!0===t)return a;const l=void 0!==r.nullOverride&&r.nullOverride;return i(a,t,{nullOverride:l,mergeArrays:!1})},o.applyToDefaultsWithShallow=function(e,t,r){const l=r.shallow;n(Array.isArray(l),"Invalid keys");const c=new Map,u=!0===t?null:new Set;for(let n of l){n=Array.isArray(n)?n:n.split(".");const r=a(e,n);r&&"object"==typeof r?c.set(r,u&&a(t,n)||r):u&&u.add(n)}const f=s(e,{},c);if(!u)return f;for(const n of u)o.reachCopy(f,t,n);const h=void 0!==r.nullOverride&&r.nullOverride;return i(f,t,{nullOverride:h,mergeArrays:!1})},o.reachCopy=function(e,t,r){for(const i of r){if(!(i in t))return;const e=t[i];if("object"!=typeof e||null===e)return;t=e}const n=t;let s=e;for(let i=0;i<r.length-1;++i){const e=r[i];"object"!=typeof s[e]&&(s[e]={}),s=s[e]}s[r[r.length-1]]=n}},375:(e,t,r)=>{"use strict";const n=r(7916);e.exports=function(e,...t){if(!e){if(1===t.length&&t[0]instanceof Error)throw t[0];throw new n(t)}}},8571:(e,t,r)=>{"use strict";const n=r(9621),s=r(4277),i=r(7043),a={needsProtoHack:new Set([s.set,s.map,s.weakSet,s.weakMap])};e.exports=a.clone=function(e,t={},r=null){if("object"!=typeof e||null===e)return e;let n=a.clone,o=r;if(t.shallow){if(!0!==t.shallow)return a.cloneWithShallow(e,t);n=e=>e}else if(o){const t=o.get(e);if(t)return t}else o=new Map;const l=s.getInternalProto(e);if(l===s.buffer)return!1;if(l===s.date)return new Date(e.getTime());if(l===s.regex)return new RegExp(e);const c=a.base(e,l,t);if(c===e)return e;if(o&&o.set(e,c),l===s.set)for(const s of e)c.add(n(s,t,o));else if(l===s.map)for(const[s,i]of e)c.set(s,n(i,t,o));const u=i.keys(e,t);for(const i of u){if("__proto__"===i)continue;if(l===s.array&&"length"===i){c.length=e.length;continue}const r=Object.getOwnPropertyDescriptor(e,i);r?r.get||r.set?Object.defineProperty(c,i,r):r.enumerable?c[i]=n(e[i],t,o):Object.defineProperty(c,i,{enumerable:!1,writable:!0,configurable:!0,value:n(e[i],t,o)}):Object.defineProperty(c,i,{enumerable:!0,writable:!0,configurable:!0,value:n(e[i],t,o)})}return c},a.cloneWithShallow=function(e,t){const r=t.shallow;(t=Object.assign({},t)).shallow=!1;const s=new Map;for(const i of r){const t=n(e,i);"object"!=typeof t&&"function"!=typeof t||s.set(t,t)}return a.clone(e,t,s)},a.base=function(e,t,r){if(!1===r.prototype)return a.needsProtoHack.has(t)?new t.constructor:t===s.array?[]:{};const n=Object.getPrototypeOf(e);if(n&&n.isImmutable)return e;if(t===s.array){const e=[];return n!==t&&Object.setPrototypeOf(e,n),e}if(a.needsProtoHack.has(t)){const e=new n.constructor;return n!==t&&Object.setPrototypeOf(e,n),e}return Object.create(n)}},9474:(e,t,r)=>{"use strict";const n=r(4277),s={mismatched:null};e.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!s.isDeepEqual(e,t,r,[])},s.isDeepEqual=function(e,t,r,i){if(e===t)return 0!==e||1/e==1/t;const a=typeof e;if(a!==typeof t)return!1;if(null===e||null===t)return!1;if("function"===a){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if("object"!==a)return e!=e&&t!=t;
1const o=s.getSharedType(e,t,!!r.prototype);switch(o){case n.buffer:return!1;case n.promise:return e===t;case n.regex:return e.toString()===t.toString();case s.mismatched:return!1}for(let n=i.length-1;n>=0;--n)if(i[n].isSame(e,t))return!0;i.push(new s.SeenEntry(e,t));try{return!!s.isDeepEqualObj(o,e,t,r,i)}finally{i.pop()}},s.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?s.mismatched:n.getInternalProto(e);const i=n.getInternalProto(e);return i!==n.getInternalProto(t)?s.mismatched:i},s.valueOf=function(e){const t=e.valueOf;if(void 0===t)return e;try{return t.call(e)}catch(e){return e}},s.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)},s.isSetSimpleEqual=function(e,t){for(const r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0},s.isDeepEqualObj=function(e,t,r,i,a){const{isDeepEqual:o,valueOf:l,hasOwnEnumerableProperty:c}=s,{keys:u,getOwnPropertySymbols:f}=Object;if(e===n.array){if(!i.part){if(t.length!==r.length)return!1;for(let e=0;e<t.length;++e)if(!o(t[e],r[e],i,a))return!1;return!0}for(const e of t)for(const t of r)if(o(e,t,i,a))return!0}else if(e===n.set){if(t.size!==r.size)return!1;if(!s.isSetSimpleEqual(t,r)){const e=new Set(Set.prototype.values.call(r));for(const r of Set.prototype.values.call(t)){if(e.delete(r))continue;let t=!1;for(const n of e)if(o(r,n,i,a)){e.delete(n),t=!0;break}if(!t)return!1}}}else if(e===n.map){if(t.size!==r.size)return!1;for(const[e,n]of Map.prototype.entries.call(t)){if(void 0===n&&!Map.prototype.has.call(r,e))return!1;if(!o(n,Map.prototype.get.call(r,e),i,a))return!1}}else if(e===n.error&&(t.name!==r.name||t.message!==r.message))return!1;const h=l(t),d=l(r);if((t!==h||r!==d)&&!o(h,d,i,a))return!1;const p=u(t);if(!i.part&&p.length!==u(r).length&&!i.skip)return!1;let m=0;for(const n of p)if(i.skip&&i.skip.includes(n))void 0===r[n]&&++m;else{if(!c(r,n))return!1;if(!o(t[n],r[n],i,a))return!1}if(!i.part&&p.length-m!==u(r).length)return!1;if(!1!==i.symbols){const e=f(t),n=new Set(f(r));for(const s of e){if(!i.skip||!i.skip.includes(s))if(c(t,s)){if(!c(r,s))return!1;if(!o(t[s],r[s],i,a))return!1}else if(c(r,s))return!1;n.delete(s)}for(const t of n)if(c(r,t))return!1}return!0},s.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}},7916:(e,t,r)=>{"use strict";const n=r(8761);e.exports=class extends Error{constructor(e){super(e.filter((e=>""!==e)).map((e=>"string"==typeof e?e:e instanceof Error?e.message:n(e))).join(" ")||"Unknown error"),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t.assert)}}},5277:e=>{"use strict";const t={};e.exports=function(e){if(!e)return"";let r="";for(let n=0;n<e.length;++n){const s=e.charCodeAt(n);t.isSafe(s)?r+=e[n]:r+=t.escapeHtmlChar(s)}return r},t.escapeHtmlChar=function(e){return t.namedHtml.get(e)||(e>=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)},t.isSafe=function(e){return t.safeCharCodes.has(e)},t.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),t.safeCharCodes=function(){const e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&e.add(t);return e}()},6064:e=>{"use strict";e.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:e=>{"use strict";e.exports=function(){}},1687:(e,t,r)=>{"use strict";const n=r(375),s=r(8571),i=r(7043),a={};e.exports=a.merge=function(e,t,r){if(n(e&&"object"==typeof e,"Invalid target value: must be an object"),n(null==t||"object"==typeof t,"Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){n(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let n=0;n<t.length;++n)e.push(s(t[n],{symbols:r.symbols}));return e}const o=i.keys(t,r);for(let n=0;n<o.length;++n){const i=o[n];if("__proto__"===i||!Object.prototype.propertyIsEnumerable.call(t,i))continue;const l=t[i];if(l&&"object"==typeof l){if(e[i]===l)continue;!e[i]||"object"!=typeof e[i]||Array.isArray(e[i])!==Array.isArray(l)||l instanceof Date||l instanceof RegExp?e[i]=s(l,{symbols:r.symbols}):a.merge(e[i],l,r)}else(null!=l||r.nullOverride)&&(e[i]=l)}return e}},9621:(e,t,r)=>{"use strict";const n=r(375),s={};e.exports=function(e,t,r){if(!1===t||null==t)return e;"string"==typeof(r=r||{})&&(r={separator:r});const i=Array.isArray(t);
1n(!i||!r.separator,"Separator option is not valid for array-based chain");const a=i?t:t.split(r.separator||".");let o=e;for(let l=0;l<a.length;++l){let e=a[l];const i=r.iterables&&s.iterables(o);if(Array.isArray(o)||"set"===i){const t=Number(e);Number.isInteger(t)&&(e=t<0?o.length+t:t)}if(!o||"function"==typeof o&&!1===r.functions||!i&&void 0===o[e]){n(!r.strict||l+1===a.length,"Missing segment",e,"in reach path ",t),n("object"==typeof o||!0===r.functions||"function"!=typeof o,"Invalid segment",e,"in reach path ",t),o=r.default;break}o=i?"set"===i?[...o][e]:o.get(e):o[e]}return o},s.iterables=function(e){return e instanceof Set?"set":e instanceof Map?"map":void 0}},8761:e=>{"use strict";e.exports=function(...e){try{return JSON.stringify(...e)}catch(e){return"[Cannot display object: "+e.message+"]"}}},4277:(e,t)=>{"use strict";const r={};t=e.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},r.typeMap=new Map([["[object Error]",t.error],["[object Map]",t.map],["[object Promise]",t.promise],["[object Set]",t.set],["[object WeakMap]",t.weakMap],["[object WeakSet]",t.weakSet]]),t.getInternalProto=function(e){if(Array.isArray(e))return t.array;if(e instanceof Date)return t.date;if(e instanceof RegExp)return t.regex;if(e instanceof Error)return t.error;const n=Object.prototype.toString.call(e);return r.typeMap.get(n)||t.generic}},7043:(e,t)=>{"use strict";t.keys=function(e,t={}){return!1!==t.symbols?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}},3652:(e,t,r)=>{"use strict";const n=r(375),s={};t.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(e,t){const r=[].concat((t=t||{}).before||[]),s=[].concat(t.after||[]),i=t.group||"?",a=t.sort||0;n(!r.includes(i),`Item cannot come before itself: ${i}`),n(!r.includes("?"),"Item cannot come before unassociated items"),n(!s.includes(i),`Item cannot come after itself: ${i}`),n(!s.includes("?"),"Item cannot come after unassociated items"),Array.isArray(e)||(e=[e]);for(const n of e){const e={seq:this._items.length,sort:a,before:r,after:s,group:i,node:n};this._items.push(e)}if(!t.manual){const e=this._sort();n(e,"item","?"!==i?`added into group ${i}`:"","created a dependencies error")}return this.nodes}merge(e){Array.isArray(e)||(e=[e]);for(const r of e)if(r)for(const e of r._items)this._items.push(Object.assign({},e));this._items.sort(s.mergeSort);for(let r=0;r<this._items.length;++r)this._items[r].seq=r;const t=this._sort();return n(t,"merge created a dependencies error"),this.nodes}sort(){const e=this._sort();return n(e,"sort created a dependencies error"),this.nodes}_sort(){const e={},t=Object.create(null),r=Object.create(null);for(const o of this._items){const n=o.seq,s=o.group;r[s]=r[s]||[],r[s].push(n),e[n]=o.before;for(const e of o.after)t[e]=t[e]||[],t[e].push(n)}for(const o in e){const t=[];for(const n in e[o]){const s=e[o][n];r[s]=r[s]||[],t.push(...r[s])}e[o]=t}for(const o in t)if(r[o])for(const n of r[o])e[n].push(...t[o]);const n={};for(const o in e){const t=e[o];for(const e of t)n[e]=n[e]||[],n[e].push(o)}const s={},i=[];for(let o=0;o<this._items.length;++o){let e=o;if(n[o]){e=null;for(let t=0;t<this._items.length;++t){if(!0===s[t])continue;n[t]||(n[t]=[]);const r=n[t].length;let i=0;for(let e=0;e<r;++e)s[n[t][e]]&&++i;if(i===r){e=t;break}}}null!==e&&(s[e]=!0,i.push(e))}if(i.length!==this._items.length)return!1;const a={};for(const o of this._items)a[o.seq]=o;this._items=[],this.nodes=[];for(const o of i){const e=a[o];this.nodes.push(e.node),this._items.push(e)}return!0}},s.mergeSort=(e,t)=>e.sort===t.sort?0:e.sort<t.sort?-1:1}
1,5380:(e,t,r)=>{"use strict";const n=r(443),s=r(2178),i={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:n.URL||URL};t.analyze=function(e,t={}){if(!e)return s.code("DOMAIN_NON_EMPTY_STRING");if("string"!=typeof e)throw new Error("Invalid input: domain must be a string");if(e.length>256)return s.code("DOMAIN_TOO_LONG");if(i.nonAsciiRx.test(e)){if(!1===t.allowUnicode)return s.code("DOMAIN_INVALID_UNICODE_CHARS");e=e.normalize("NFC")}if(i.domainControlRx.test(e))return s.code("DOMAIN_INVALID_CHARS");e=i.punycode(e),t.allowFullyQualified&&"."===e[e.length-1]&&(e=e.slice(0,-1));const r=t.minDomainSegments||i.minDomainSegments,n=e.split(".");if(n.length<r)return s.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&n.length>t.maxDomainSegments)return s.code("DOMAIN_SEGMENTS_COUNT_MAX");const a=t.tlds;if(a){const e=n[n.length-1].toLowerCase();if(a.deny&&a.deny.has(e)||a.allow&&!a.allow.has(e))return s.code("DOMAIN_FORBIDDEN_TLDS")}for(let o=0;o<n.length;++o){const e=n[o];if(!e.length)return s.code("DOMAIN_EMPTY_SEGMENT");if(e.length>63)return s.code("DOMAIN_LONG_SEGMENT");if(o<n.length-1){if(!i.domainSegmentRx.test(e))return s.code("DOMAIN_INVALID_CHARS")}else if(!i.tldSegmentRx.test(e))return s.code("DOMAIN_INVALID_TLDS_CHARS")}return null},t.isValid=function(e,r){return!t.analyze(e,r)},i.punycode=function(e){e.includes("%")&&(e=e.replace(/%/g,"%25"));try{return new i.URL(`http://${e}`).host}catch(t){return e}}},1745:(e,t,r)=>{"use strict";const n=r(9848),s=r(5380),i=r(2178),a={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(n.TextEncoder||TextEncoder)};t.analyze=function(e,t){return a.email(e,t)},t.isValid=function(e,t){return!a.email(e,t)},a.email=function(e,t={}){if("string"!=typeof e)throw new Error("Invalid input: email must be a string");if(!e)return i.code("EMPTY_STRING");const r=!a.nonAsciiRx.test(e);if(!r){if(!1===t.allowUnicode)return i.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const n=e.split("@");if(2!==n.length)return n.length>2?i.code("MULTIPLE_AT_CHAR"):i.code("MISSING_AT_CHAR");const[o,l]=n;if(!o)return i.code("EMPTY_LOCAL");if(!t.ignoreLength){if(e.length>254)return i.code("ADDRESS_TOO_LONG");if(a.encoder.encode(o).length>64)return i.code("LOCAL_TOO_LONG")}return a.local(o,r)||s.analyze(l,t)},a.local=function(e,t){const r=e.split(".");for(const n of r){if(!n.length)return i.code("EMPTY_LOCAL_SEGMENT");if(t){if(!a.atextRx.test(n))return i.code("INVALID_LOCAL_CHARS")}else for(const e of n){if(a.atextRx.test(e))continue;const t=a.binary(e);if(!a.atomRx.test(t))return i.code("INVALID_LOCAL_CHARS")}}},a.binary=function(e){return Array.from(a.encoder.encode(e)).map((e=>String.fromCharCode(e))).join("")},a.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,a.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(e,t)=>{"use strict";t.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @
1character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},t.code=function(e){return{code:e,error:t.codes[e]}}},9959:(e,t,r)=>{"use strict";const n=r(375),s=r(5752);t.regex=function(e={}){n(void 0===e.cidr||"string"==typeof e.cidr,"options.cidr must be a string");const t=e.cidr?e.cidr.toLowerCase():"optional";n(["required","optional","forbidden"].includes(t),"options.cidr must be one of required, optional, forbidden"),n(void 0===e.version||"string"==typeof e.version||Array.isArray(e.version),"options.version must be a string or an array of string");let r=e.version||["ipv4","ipv6","ipvfuture"];Array.isArray(r)||(r=[r]),n(r.length>=1,"options.version must have at least 1 version specified");for(let s=0;s<r.length;++s)n("string"==typeof r[s],"options.version must only contain strings"),r[s]=r[s].toLowerCase(),n(["ipv4","ipv6","ipvfuture"].includes(r[s]),"options.version contains unknown version "+r[s]+" - must be one of ipv4, ipv6, ipvfuture");r=Array.from(new Set(r));const i=`(?:${r.map((e=>{if("forbidden"===t)return s.ip[e];const r=`\\/${"ipv4"===e?s.ip.v4Cidr:s.ip.v6Cidr}`;return"required"===t?`${s.ip[e]}${r}`:`${s.ip[e]}(?:${r})?`})).join("|")})`,a=new RegExp(`^${i}$`);return{cidr:t,versions:r,regex:a,raw:i}}},5752:(e,t,r)=>{"use strict";const n=r(375),s=r(6064),i={generate:function(){const e={},t="\\dA-Fa-f",r="["+t+"]",n="\\w-\\.~",s="!\\$&'\\(\\)\\*\\+,;=",i="%"+t,a=n+i+s+":@",o="["+a+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";e.ipv4address="(?:"+l+"\\.){3}"+l;const c=r+"{1,4}",u="(?:"+c+":"+c+"|"+e.ipv4address+")",f="(?:"+c+":){6}"+u,h="::(?:"+c+":){5}"+u,d="(?:"+c+")?::(?:"+c+":){4}"+u,p="(?:(?:"+c+":){0,1}"+c+")?::(?:"+c+":){3}"+u,m="(?:(?:"+c+":){0,2}"+c+")?::(?:"+c+":){2}"+u,g="(?:(?:"+c+":){0,3}"+c+")?::"+c+":"+u,y="(?:(?:"+c+":){0,4}"+c+")?::"+u,b="(?:(?:"+c+":){0,5}"+c+")?::"+c,v="(?:(?:"+c+":){0,6}"+c+")?::";e.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",e.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",e.ipv6address="(?:"+f+"|"+h+"|"+d+"|"+p+"|"+m+"|"+g+"|"+y+"|"+b+"|"+v+")",e.ipvFuture="v"+r+"+\\.["+n+s+":]+",e.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",e.schemeRegex=new RegExp(e.scheme);const _="["+n+i+s+":]*",w="["+n+i+s+"]{1,255}",$="(?:\\[(?:"+e.ipv6address+"|"+e.ipvFuture+")\\]|"+e.ipv4address+"|"+w+")",S="(?:"+_+"@)?"+$+"(?::\\d*)?",x="(?:"+_+"@)?("+$+")(?::\\d*)?",j=o+"*",E=o+"+",k="(?:\\/"+j+")*",O="\\/(?:"+E+k+")?",C=E+k,A="["+n+i+s+"@]+"+k,I="(?:\\/\\/\\/"+j+k+")";return e.hierPart="(?:(?:\\/\\/"+S+k+")|"+O+"|"+C+"|"+I+")",e.hierPartCapture="(?:(?:\\/\\/"+x+k+")|"+O+"|"+C+")",e.relativeRef="(?:(?:\\/\\/"+S+k+")|"+O+"|"+A+"|)",e.relativeRefCapture="(?:(?:\\/\\/"+x+k+")|"+O+"|"+A+"|)",e.query="["+a+"\\/\\?]*(?=#|$)",e.queryWithSquareBrackets="["+a+"\\[\\]\\/\\?]*(?=#|$)",e.fragment="["+a+"\\/\\?]*",e}};i.rfc3986=i.generate(),t.ip={v4Cidr:i.rfc3986.ipv4Cidr,v6Cidr:i.rfc3986.ipv6Cidr,ipv4:i.rfc3986.ipv4address,ipv6:i.rfc3986.ipv6address,ipvfuture:i.rfc3986.ipvFuture},i.createRegex=function(e){const t=i.rfc3986,r="(?:\\?"+(e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",a=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly)return i.wrap(a+r);let o="";if(e.scheme){n(e.scheme instanceof RegExp||"string"==typeof e.scheme||Array.isArray(e.sc
1heme),"scheme must be a RegExp, String, or Array");const r=[].concat(e.scheme);n(r.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let e=0;e<r.length;++e){const a=r[e];n(a instanceof RegExp||"string"==typeof a,"scheme at position "+e+" must be a RegExp or String"),a instanceof RegExp?i.push(a.source.toString()):(n(t.schemeRegex.test(a),"scheme at position "+e+" must be a valid scheme"),i.push(s(a)))}o=i.join("|")}const l="(?:"+(o?"(?:"+o+")":t.scheme)+":"+(e.domain?t.hierPartCapture:t.hierPart)+")",c=e.allowRelative?"(?:"+l+"|"+a+")":l;return i.wrap(c+r,o)},i.wrap=function(e,t){return{raw:e=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${e}`,regex:new RegExp(`^${e}$`),scheme:t}},i.uriRegex=i.createRegex({}),t.regex=function(e={}){return e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain?i.createRegex(e):i.uriRegex}},1447:(e,t)=>{"use strict";const r={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};t.Parser=class{constructor(e,t={}){if(!t[r.settings]&&t.constants)for(const r in t.constants){const e=t.constants[r];if(null!==e&&!["boolean","number","string"].includes(typeof e))throw new Error(`Formula constant ${r} contains invalid ${typeof e} value type`)}this.settings=t[r.settings]?t:Object.assign({[r.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let n=[],s="",i=0,a=!1;const o=e=>{if(i)throw new Error("Formula missing closing parenthesis");const o=n.length?n[n.length-1]:null;if(a||s||e){if(o&&"reference"===o.type&&")"===e)return o.type="function",o.value=this._subFormula(s,o.value),void(s="");if(")"===e){const e=new t.Parser(s,this.settings);n.push({type:"segment",value:e})}else if(a){if("]"===a)return n.push({type:"reference",value:s}),void(s="");n.push({type:"literal",value:s})}else if(r.operatorCharacters.includes(s))o&&"operator"===o.type&&r.operators.includes(o.value+s)?o.value+=s:n.push({type:"operator",value:s});else if(s.match(r.numberRx))n.push({type:"constant",value:parseFloat(s)});else if(void 0!==this.settings.constants[s])n.push({type:"constant",value:this.settings.constants[s]});else{if(!s.match(r.tokenRx))throw new Error(`Formula contains invalid token: ${s}`);n.push({type:"reference",value:s})}s=""}};for(const t of e)a?t===a?(o(),a=!1):s+=t:i?"("===t?(s+=t,++i):")"===t?(--i,i?s+=t:o(t)):s+=t:t in r.literals?a=r.literals[t]:"("===t?(o(),++i):r.operatorCharacters.includes(t)?(o(),s=t,o()):" "!==t?s+=t:o();o(),n=n.map(((e,t)=>"operator"!==e.type||"-"!==e.value||t&&"operator"!==n[t-1].type?e:{type:"operator",value:"n"}));let l=!1;for(const t of n){if("operator"===t.type){if(r.operatorsPrefix.includes(t.value))continue;if(!l)throw new Error("Formula contains an operator in invalid position");if(!r.operators.includes(t.value))throw new Error(`Formula contains an unknown operator ${t.value}`)}else if(l)throw new Error("Formula missing expected operator");l=!l}if(!l)throw new Error("Formula contains invalid trailing operator");1===n.length&&["reference","literal","constant"].includes(n[0].type)&&(this.single={type:"reference"===n[0].type?"reference":"value",value:n[0].value}),this._parts=n.map((e=>{if("operator"===e.type)return r.operatorsPrefix.includes(e.value)?e:e.value;if("reference"!==e.type)return e.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value))throw new Error(`Formula contains invalid reference ${e.value}`);return this.settings.reference?this.settings.reference(e.value):r.reference(e.value)}))}_subFormula(e,n){const s=this.settings.functions[n];if("function"!=typeof s)throw new Error(`Formula contains unknown function ${n}`);let i=[];if(e){let t="",s=0,a=!1;const o=()=>{if(!t)throw new Error(`Formula contains function ${n}
1 with invalid arguments ${e}`);i.push(t),t=""};for(let n=0;n<e.length;++n){const i=e[n];a?(t+=i,i===a&&(a=!1)):i in r.literals&&!s?(t+=i,a=r.literals[i]):","!==i||s?(t+=i,"("===i?++s:")"===i&&--s):o()}o()}return i=i.map((e=>new t.Parser(e,this.settings))),function(e){const t=[];for(const r of i)t.push(r.evaluate(e));return s.call(e,...t)}}evaluate(e){const t=this._parts.slice();for(let n=t.length-2;n>=0;--n){const s=t[n];if(s&&"operator"===s.type){const i=t[n+1];t.splice(n+1,1);const a=r.evaluate(i,e);t[n]=r.single(s.value,a)}}return r.operatorsOrder.forEach((n=>{for(let s=1;s<t.length-1;)if(n.includes(t[s])){const n=t[s],i=r.evaluate(t[s-1],e),a=r.evaluate(t[s+1],e);t.splice(s,2);const o=r.calculate(n,i,a);t[s-1]=0===o?0:o}else s+=2})),r.evaluate(t[0],e)}},t.Parser.prototype[r.symbol]=!0,r.reference=function(e){return function(t){return t&&void 0!==t[e]?t[e]:null}},r.evaluate=function(e,t){return null===e?null:"function"==typeof e?e(t):e[r.symbol]?e.evaluate(t):e},r.single=function(e,t){if("!"===e)return!t;const r=-t;return 0===r?0:r},r.calculate=function(e,t,n){if("??"===e)return r.exists(t)?t:n;if("string"==typeof t||"string"==typeof n){if("+"===e)return(t=r.exists(t)?t:"")+(r.exists(n)?n:"")}else switch(e){case"^":return Math.pow(t,n);case"*":return t*n;case"/":return t/n;case"%":return t%n;case"+":return t+n;case"-":return t-n}switch(e){case"<":return t<n;case"<=":return t<=n;case">":return t>n;case">=":return t>=n;case"==":return t===n;case"!=":return t!==n;case"&&":return t&&n;case"||":return t||n}return null},r.exists=function(e){return null!=e}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:e=>{"use strict";e.exports=JSON.parse('{"version":"17.13.3"}')}},t={},function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(5107);var e,t},e.exports=t()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.