@finsemble/finsemble-core 6.1.4 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mocharc.js +12 -12
- package/.nycrc.json +7 -7
- package/README.md +24 -24
- package/assets/fonts/LICENSE.txt +202 -202
- package/configs/core/config.json +214 -214
- package/configs/core/securityPolicies.json +24 -24
- package/configs/core/services.json +233 -233
- package/configs/schemas/README.md +1 -1
- package/configs/schemas/fileBasedSchemas/appdConfigFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/applicationConfigFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/componentsFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/coreConfigFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/dashbarFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/manifestFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/securityPoliciesFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/servicesFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/uiComponentsFile.schema.json +5 -5
- package/configs/schemas/fileBasedSchemas/workspacesFile.schema.json +5 -5
- package/configs/schemas/finsemble.schema.json +4006 -4006
- package/dist/FSBL.js +1 -1
- package/dist/clients/Interop/FinsembleDesktopAgent.md +154 -154
- package/dist/clients/Interop/tsconfig.json +7 -7
- package/dist/clients/Startup/README.md +28 -28
- package/dist/clients/dragAndDropAssets/dragAndDropScrim.css +54 -54
- package/dist/clients/dragAndDropAssets/ff-delete-circle.svg +10 -10
- package/dist/clients/dragAndDropAssets/ff-share.svg +13 -13
- package/dist/components/system/notification/ff-close.svg +14 -14
- package/dist/components/system/notification/finsemble_logo_white.svg +15 -15
- package/dist/components/system/notification/notification.html +155 -155
- package/dist/configs/core/config.json +214 -214
- package/dist/configs/core/securityPolicies.json +24 -24
- package/dist/configs/core/services.json +233 -233
- package/dist/configs/schemas/README.md +1 -1
- package/dist/configs/schemas/fileBasedSchemas/appdConfigFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/applicationConfigFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/componentsFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/coreConfigFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/dashbarFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/manifestFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/securityPoliciesFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/servicesFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/uiComponentsFile.schema.json +5 -5
- package/dist/configs/schemas/fileBasedSchemas/workspacesFile.schema.json +5 -5
- package/dist/configs/schemas/finsemble.schema.json +4006 -4006
- package/dist/finsemble-javascript-adapter.js +1 -1
- package/dist/index.js +1 -1
- package/dist/javascript-adapter-example-app.html +37 -37
- package/dist/services/Interop/DevTools.tsx +71 -71
- package/dist/services/Interop/Interop.html +15 -15
- package/dist/services/Interop/InteropService.js +1 -1
- package/dist/services/Interop/InteropService.md +148 -148
- package/dist/services/Interop/InteropServiceUI.css +12 -12
- package/dist/services/Interop/InteropServiceUI.js +1 -1
- package/dist/services/Interop/InteropServiceUI.tsx +39 -39
- package/dist/services/Interop/devtoolsEnhancer.tsx +63 -63
- package/dist/services/Interop/tsconfig.json +7 -7
- package/dist/services/ServiceTemplate.md +39 -39
- package/dist/services/assimilation/assimilation.html +18 -18
- package/dist/services/assimilation/assimilationService.js +1 -1
- package/dist/services/authentication/authentication.html +17 -17
- package/dist/services/authentication/authenticationService.js +1 -1
- package/dist/services/authentication/dialogSignOn.html +199 -199
- package/dist/services/config/config.html +17 -17
- package/dist/services/config/configService.js +1 -1
- package/dist/services/dataStore/dataStore.html +18 -18
- package/dist/services/dataStore/dataStoreService.js +1 -1
- package/dist/services/hotkeys/hotkeys.html +18 -18
- package/dist/services/hotkeys/hotkeysService.js +1 -1
- package/dist/services/linker/linker.html +18 -18
- package/dist/services/linker/linkerService.js +1 -1
- package/dist/services/logger/logger.html +18 -18
- package/dist/services/logger/loggerService.js +1 -1
- package/dist/services/logger/loggerUI.js +1 -1
- package/dist/services/logger/src/app.css +860 -860
- package/dist/services/logger/src/components/Views/Logs/rightPanel/consoleView.css +379 -379
- package/dist/services/logger/src/components/objectInspector/README.md +1 -1
- package/dist/services/notification/notification.html +11 -11
- package/dist/services/notification/notificationService.js +1 -1
- package/dist/services/preferences/preferencesService.js +1 -1
- package/dist/services/router/router.html +18 -18
- package/dist/services/router/routerService.js +1 -1
- package/dist/services/search/search.html +17 -17
- package/dist/services/search/searchService.js +1 -1
- package/dist/services/storage/adapters/instrumentedIndexedDBAdapter.js +1 -1
- package/dist/services/storage/storage.html +17 -17
- package/dist/services/storage/storageService.js +1 -1
- package/dist/services/systemManager/bootTasks/testTasks/_aReadMe.md +119 -119
- package/dist/services/systemManager/systemManager.html +24 -24
- package/dist/services/systemManager/systemManager.js +1 -1
- package/dist/services/window/Docking/GroupRequirements.md +18 -18
- package/dist/services/window/Splintering/SplinterAgentSlave.html +13 -13
- package/dist/services/window/Splintering/SplinterAgentSlave.js +1 -1
- package/dist/services/window/Splintering/Splintering.md +118 -118
- package/dist/services/window/StackedWindowManager/StackRequirements.md +23 -23
- package/dist/services/window/WindowBehaviorRequirements.md +25 -25
- package/dist/services/window/windowService.html +10 -10
- package/dist/services/window/windowService.js +1 -1
- package/dist/services/workspace/dev-docs/importExportFormat.md +51 -51
- package/dist/services/workspace/dev-docs/remotelyPersistedWorkspaces.md +62 -62
- package/dist/services/workspace/workspace.html +18 -18
- package/dist/services/workspace/workspace.schema.json +48 -48
- package/dist/services/workspace/workspaceService.js +1 -1
- package/package.json +1 -1
- package/tsconfig.json +23 -23
- package/types/index.d.ts +40 -55
- package/types/index.tsbuildinfo +1 -1
- package/types.tsconfig.json +15 -15
package/dist/FSBL.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see FSBL.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FSBLDesktopApiPreload=t():e.FSBLDesktopApiPreload=t()}(self,(function(){return(()=>{var e={7664:(e,t,n)=>{"use strict";function r(e,...t){return(...n)=>e(...t,...n)}function i(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>ht,apply:()=>r,applyEach:()=>T,applyEachSeries:()=>k,asyncify:()=>c,auto:()=>R,autoInject:()=>$,cargo:()=>q,cargoQueue:()=>V,compose:()=>Q,concat:()=>Z,concatLimit:()=>J,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>re,detectSeries:()=>ie,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>ce,eachLimit:()=>de,eachOf:()=>I,eachOfLimit:()=>L,eachOfSeries:()=>M,eachSeries:()=>fe,ensureAsync:()=>pe,every:()=>he,everyLimit:()=>ge,everySeries:()=>me,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>Ce,forever:()=>_e,groupBy:()=>Ae,groupByLimit:()=>Le,groupBySeries:()=>Ee,log:()=>Ie,map:()=>O,mapLimit:()=>K,mapSeries:()=>D,mapValues:()=>Te,mapValuesLimit:()=>Oe,mapValuesSeries:()=>Me,memoize:()=>De,nextTick:()=>ke,parallel:()=>je,parallelLimit:()=>Re,priorityQueue:()=>Be,queue:()=>Pe,race:()=>$e,reduce:()=>G,reduceRight:()=>Ue,reflect:()=>ze,reflectAll:()=>He,reject:()=>Ve,rejectLimit:()=>Ge,rejectSeries:()=>Ye,retry:()=>Ke,retryable:()=>Ze,seq:()=>Y,series:()=>Xe,setImmediate:()=>l,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>rt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>lt,unmemoize:()=>ct,until:()=>ft,waterfall:()=>pt,whilst:()=>dt,all:()=>he,allLimit:()=>ge,allSeries:()=>me,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>re,findSeries:()=>ie,flatMap:()=>Z,flatMapLimit:()=>J,flatMapSeries:()=>X,forEach:()=>ce,forEachSeries:()=>fe,forEachLimit:()=>de,forEachOf:()=>I,forEachOfSeries:()=>M,forEachOfLimit:()=>L,inject:()=>G,foldl:()=>G,foldr:()=>Ue,select:()=>be,selectLimit:()=>Se,selectSeries:()=>Ce,wrapSync:()=>c,during:()=>dt,doDuring:()=>ae});var o="function"==typeof setImmediate&&setImmediate,s="object"==typeof process&&"function"==typeof process.nextTick;function a(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var l=u(o?setImmediate:s?process.nextTick:a);function c(e){return p(e)?function(...t){const n=t.pop();return d(e.apply(this,t),n)}:i((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return d(r,n);n(null,r)}))}function d(e,t){return e.then((e=>{f(t,null,e)}),(e=>{f(t,e&&e.message?e:new Error(e))}))}function f(e,t,n){try{e(t,n)}catch(e){l((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function h(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?c(e):e}function g(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function m(e){return function(t,...n){return g((function(r){var i=this;return e(t,((e,t)=>{h(e).apply(i,n.concat(t))}),r)}))}}function y(e,t,n,r){t=t||[];var i=[],o=0,s=h(n);return e(t,((e,t,n)=>{var r=o++;s(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function v(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const w={};function b(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function S(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function C(e,t,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function l(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,u,c),u++,l()}})).catch(d))}function c(e,t){if(a-=1,!o)return e?d(e):!1===e?(i=!0,void(o=!0)):t===w||i&&a<=0?(i=!0,r(null)):void l()}function d(e){o||(s=!1,i=!0,r(e))}l()}var _=e=>(t,n,r)=>{if(r=b(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return C(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return C(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(v(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t,n,r,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(o):(n=(t=e)?Object.keys(t):[],r=-1,i=n.length,function(){var e=n[++r];return r<i?{value:t[e],key:e}:null})}(t),o=!1,s=!1,a=0,u=!1;function l(e,t){if(!s)if(a-=1,e)o=!0,r(e);else if(!1===e)o=!0,s=!0;else{if(t===w||o&&a<=0)return o=!0,r(null);u||c()}}function c(){for(u=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,S(l))}u=!1}c()},L=g((function(e,t,n,r){return _(t)(e,h(n),r)}),4);function A(e,t,n){n=b(n);var r=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++i!==o&&t!==w||n(null))}for(0===o&&n(null);r<o;r++)t(e[r],r,S(a))}function E(e,t,n){return L(e,1/0,t,n)}var I=g((function(e,t,n){return(v(e)?A:E)(e,h(t),n)}),3),O=g((function(e,t,n){return y(I,e,t,n)}),3),T=m(O),M=g((function(e,t,n){return L(e,1,t,n)}),3),D=g((function(e,t,n){return y(M,e,t,n)}),3),k=m(D);const N=Symbol("promiseCallback");function j(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[N]=new Promise(((n,r)=>{e=n,t=r})),n}function R(e,t,n){"number"!=typeof t&&(n=t,t=null),n=b(n||j());var r=Object.keys(e).length;if(!r)return n(null);t||(t=r);var i={},o=0,s=!1,a=!1,u=Object.create(null),l=[],c=[],d={};function f(e,t){l.push((()=>function(e,t){if(!a){var r=S(((t,...r)=>{if(o--,!1!==t)if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach((e=>{l[e]=i[e]})),l[e]=r,a=!0,u=Object.create(null),s)return;n(t,l)}else i[e]=r,(u[e]||[]).forEach((e=>e())),p();else s=!0}));o++;var l=h(t[t.length-1]);t.length>1?l(i,r):l(r)}}(e,t)))}function p(){if(!s){if(0===l.length&&0===o)return n(null,i);for(;l.length&&o<t;)l.shift()()}}function g(t){var n=[];return Object.keys(e).forEach((r=>{const i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return f(t,[n]),void c.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return f(t,n),void c.push(t);d[t]=i,r.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+r.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--i&&f(t,n)}))}))})),function(){for(var e=0;c.length;)e++,g(c.pop()).forEach((e=>{0==--d[e]&&c.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),p(),n[N]}var P=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,W=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,F=/,/,x=/(=.+)?(\s*)$/,B=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function $(e,t){var n={};return Object.keys(e).forEach((t=>{var r,i=e[t],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))r=[...i],i=r.pop(),n[t]=r.concat(r.length>0?a:i);else if(s)n[t]=i;else{if(r=function(e){const t=e.toString().replace(B,"");let n=t.match(P);if(n||(n=t.match(W)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,r]=n;return r.replace(/\s/g,"").split(F).map((e=>e.replace(x,"").trim()))}(i),0===i.length&&!o&&0===r.length)throw new Error("autoInject task functions require explicit parameters.");o||r.pop(),n[t]=r.concat(a)}function a(e,t){var n=r.map((t=>e[t]));n.push(t),h(i)(...n)}})),R(n,t)}class U{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):z(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):z(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function z(e,t){e.length=1,e.head=e.tail=t}function H(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var r=h(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var c=!1;function d(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?n?o(e):i():t.length<=1?i(t[0]):void i(t)}y.started=!0;var a={data:e,callback:n?s:r||s};if(t?y._tasks.unshift(a):y._tasks.push(a),c||(c=!0,l((()=>{c=!1,y.process()}))),n||!r)return new Promise(((e,t)=>{i=e,o=t}))}function f(e){return function(t,...n){i-=1;for(var r=0,s=e.length;r<s;r++){var a=e[r],l=o.indexOf(a);0===l?o.shift():l>0&&o.splice(l,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}i<=y.concurrency-y.buffer&&u("unsaturated"),y.idle()&&u("drain"),y.process()}}function p(e){return!(0!==e.length||!y.idle()||(l((()=>u("drain"))),0))}const g=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,r){const i=(...r)=>{a(e,i),((e,r)=>{if(e)return n(e);t(r)})(...r)};s[e].push(i)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var m=!1,y={_tasks:new U,*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!1,t)))}return d(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!0,t)))}return d(e,!1,!0,t)},kill(){a(),y._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!1,t)))}return d(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!0,t)))}return d(e,!0,!0,t)},remove(e){y._tasks.remove(e)},process(){if(!m){for(m=!0;!y.paused&&i<y.concurrency&&y._tasks.length;){var e=[],t=[],n=y._tasks.length;y.payload&&(n=Math.min(n,y.payload));for(var s=0;s<n;s++){var a=y._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===y._tasks.length&&u("empty"),i===y.concurrency&&u("saturated");var l=S(f(e));r(t,l)}m=!1}},length:()=>y._tasks.length,running:()=>i,workersList:()=>o,idle:()=>y._tasks.length+i===0,pause(){y.paused=!0},resume(){!1!==y.paused&&(y.paused=!1,l(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:g("saturated")},unsaturated:{writable:!1,value:g("unsaturated")},empty:{writable:!1,value:g("empty")},drain:{writable:!1,value:g("drain")},error:{writable:!1,value:g("error")}}),y}function q(e,t){return H(e,1,t)}function V(e,t,n){return H(e,t,n)}var G=g((function(e,t,n,r){r=b(r);var i=h(n);return M(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function Y(...e){var t=e.map(h);return function(...e){var n=this,r=e[e.length-1];return"function"==typeof r?e.pop():r=j(),G(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[N]}}function Q(...e){return Y(...e.reverse())}var K=g((function(e,t,n,r){return y(_(t),e,n,r)}),4),J=g((function(e,t,n,r){var i=h(n);return K(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4),Z=g((function(e,t,n){return J(e,1/0,t,n)}),3),X=g((function(e,t,n){return J(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,r,i,o)=>{var s,a=!1;const u=h(i);n(r,((n,r,i)=>{u(n,((r,o)=>r||!1===r?i(r):e(o)&&!s?(a=!0,s=t(!0,n),i(null,w)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=g((function(e,t,n){return te((e=>e),((e,t)=>t))(I,e,t,n)}),3),re=g((function(e,t,n,r){return te((e=>e),((e,t)=>t))(_(t),e,n,r)}),4),ie=g((function(e,t,n){return te((e=>e),((e,t)=>t))(_(1),e,t,n)}),3);function oe(e){return(t,...n)=>h(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=g((function(e,t,n){n=S(n);var r,i=h(e),o=h(t);function s(e,...t){if(e)return n(e);!1!==e&&(r=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...r):void 0}return a(null,!0)}),3);function ue(e,t,n){const r=h(t);return ae(e,((...e)=>{const t=e.pop();r(...e,((e,n)=>t(e,!n)))}),n)}function le(e){return(t,n,r)=>e(t,r)}var ce=g((function(e,t,n){return I(e,le(h(t)),n)}),3),de=g((function(e,t,n,r){return _(t)(e,le(h(n)),r)}),4),fe=g((function(e,t,n){return de(e,1,t,n)}),3);function pe(e){return p(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?l((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var he=g((function(e,t,n){return te((e=>!e),(e=>!e))(I,e,t,n)}),3),ge=g((function(e,t,n,r){return te((e=>!e),(e=>!e))(_(t),e,n,r)}),4),me=g((function(e,t,n){return te((e=>!e),(e=>!e))(M,e,t,n)}),3);function ye(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],o=0;o<t.length;o++)i[o]&&n.push(t[o]);r(null,n)}))}function ve(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,o)=>{if(n)return r(n);o&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,n,r){return(v(t)?ye:ve)(e,t,h(n),r)}var be=g((function(e,t,n){return we(I,e,t,n)}),3),Se=g((function(e,t,n,r){return we(_(t),e,n,r)}),4),Ce=g((function(e,t,n){return we(M,e,t,n)}),3),_e=g((function(e,t){var n=S(t),r=h(pe(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2),Le=g((function(e,t,n,r){var i=h(n);return K(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(n,s)?n[s].push(a):n[s]=[a]}return r(e,n)}))}),4);function Ae(e,t,n){return Le(e,1/0,t,n)}function Ee(e,t,n){return Le(e,1,t,n)}var Ie=oe("log"),Oe=g((function(e,t,n,r){r=b(r);var i={},o=h(n);return _(t)(e,((e,t,n)=>{o(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4);function Te(e,t,n){return Oe(e,1/0,t,n)}function Me(e,t,n){return Oe(e,1,t,n)}function De(e,t=(e=>e)){var n=Object.create(null),r=Object.create(null),o=h(e),s=i(((e,i)=>{var s=t(...e);s in n?l((()=>i(null,...n[s]))):s in r?r[s].push(i):(r[s]=[i],o(...e,((e,...t)=>{e||(n[s]=t);var i=r[s];delete r[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var ke=u(s?process.nextTick:o?setImmediate:a),Ne=g(((e,t,n)=>{var r=v(t)?[]:{};e(t,((e,t,n)=>{h(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function je(e,t){return Ne(I,e,t)}function Re(e,t,n){return Ne(_(t),e,n)}function Pe(e,t){var n=h(e);return H(((e,t)=>{n(e[0],t)}),t,1)}class We{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&xe(this.heap[e],this.heap[t=Fe(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&xe(this.heap[t+1],this.heap[t])&&(t+=1),!xe(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=Fe(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function Fe(e){return(e+1>>1)-1}function xe(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=Pe(e,t);return n._tasks=new We,n.push=function(e,t=0,r=(()=>{})){if("function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return l((()=>n.drain()));for(var i=0,o=e.length;i<o;i++){var s={data:e[i],priority:t,callback:r};n._tasks.push(s)}l(n.process)},delete n.unshift,n}var $e=g((function(e,t){if(t=b(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)h(e[n])(t)}),2);function Ue(e,t,n,r){var i=[...e].reverse();return G(i,t,n,r)}function ze(e){var t=h(e);return i((function(e,n){return e.push(((e,...t)=>{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)})),t.apply(this,e)}))}function He(e){var t;return Array.isArray(e)?t=e.map(ze):(t={},Object.keys(e).forEach((n=>{t[n]=ze.call(this,e[n])}))),t}function qe(e,t,n,r){const i=h(n);return we(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var Ve=g((function(e,t,n){return qe(I,e,t,n)}),3),Ge=g((function(e,t,n,r){return qe(_(t),e,n,r)}),4),Ye=g((function(e,t,n){return qe(M,e,t,n)}),3);function Qe(e){return function(){return e}}function Ke(e,t,n){var r={times:5,intervalFunc:Qe(0)};if(arguments.length<3&&"function"==typeof e?(n=t||j(),t=e):(Je(r,e),n=n||j()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=h(t),o=1;function s(){i(((e,...t)=>{!1!==e&&(e&&o++<r.times&&("function"!=typeof r.errorFilter||r.errorFilter(e))?setTimeout(s,r.intervalFunc(o-1)):n(e,...t))}))}return s(),n[N]}function Je(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Qe(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Ze(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;p(t)&&(n+=1);var r=h(t);return i(((t,i)=>{function o(e){r(...t,e)}return(t.length<n-1||null==i)&&(t.push(i),i=j()),e?Ke(e,o,i):Ke(o,i),i[N]}))}function Xe(e,t){return Ne(M,e,t)}var et=g((function(e,t,n){return te(Boolean,(e=>e))(I,e,t,n)}),3),tt=g((function(e,t,n,r){return te(Boolean,(e=>e))(_(t),e,n,r)}),4),nt=g((function(e,t,n){return te(Boolean,(e=>e))(M,e,t,n)}),3),rt=g((function(e,t,n){var r=h(t);return O(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3);function it(e,t,n){var r=h(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",n&&(r.info=n),a=!0,o(r)}),t),r(...i)}))}function ot(e,t,n,r){var i=h(n);return K(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,r)}function st(e,t,n){return ot(e,1/0,t,n)}function at(e,t,n){return ot(e,1,t,n)}function ut(e,t,n,r){arguments.length<=3&&"function"==typeof t&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=b(r||j());var i=h(n);return I(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[N]}var lt=g((function(e,t){var n,r=null;return fe(e,((e,t)=>{h(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))}));function ct(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=g((function(e,t,n){n=S(n);var r=h(t),i=h(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...o):void 0}return i(a)}),3);function ft(e,t,n){const r=h(e);return dt((e=>r(((t,n)=>e(t,!n)))),t,n)}var pt=g((function(e,t){if(t=b(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){h(e[n++])(...t,S(i))}function i(i,...o){if(!1!==i)return i||n===e.length?t(i,...o):void r(o)}r([])}));const ht={apply:r,applyEach:T,applyEachSeries:k,asyncify:c,auto:R,autoInject:$,cargo:q,cargoQueue:V,compose:Q,concat:Z,concatLimit:J,concatSeries:X,constant:ee,detect:ne,detectLimit:re,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:ce,eachLimit:de,eachOf:I,eachOfLimit:L,eachOfSeries:M,eachSeries:fe,ensureAsync:pe,every:he,everyLimit:ge,everySeries:me,filter:be,filterLimit:Se,filterSeries:Ce,forever:_e,groupBy:Ae,groupByLimit:Le,groupBySeries:Ee,log:Ie,map:O,mapLimit:K,mapSeries:D,mapValues:Te,mapValuesLimit:Oe,mapValuesSeries:Me,memoize:De,nextTick:ke,parallel:je,parallelLimit:Re,priorityQueue:Be,queue:Pe,race:$e,reduce:G,reduceRight:Ue,reflect:ze,reflectAll:He,reject:Ve,rejectLimit:Ge,rejectSeries:Ye,retry:Ke,retryable:Ze,seq:Y,series:Xe,setImmediate:l,some:et,someLimit:tt,someSeries:nt,sortBy:rt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:lt,unmemoize:ct,until:ft,waterfall:pt,whilst:dt,all:he,allLimit:ge,allSeries:me,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:re,findSeries:ie,flatMap:Z,flatMapLimit:J,flatMapSeries:X,forEach:ce,forEachSeries:fe,forEachLimit:de,forEachOf:I,forEachOfSeries:M,forEachOfLimit:L,inject:G,foldl:G,foldr:Ue,select:be,selectLimit:Se,selectSeries:Ce,wrapSync:c,during:dt,doDuring:ae}},3998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var r=s(n(2551)),i=n(1742),o=s(n(3059));function s(e){return e&&e.__esModule?e:{default:e}}const a=new function(){const e=this;this.resolveConfigVariables=function(e,t){let n=0,i=0,o=!0;function s(e){const t=e.split(/[/\\:?=&\s]/);for(let n=0;n<t.length;n++)if("$"===t[n][0]){const i=t[n].substring(1);let s=a(i);if(void 0!==s){const a=e.replace(t[n],s);r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveString configString",t[n],i,s,"old value=",e,"value=",a),o=!0,e=a}}return e}function a(t){let n=e[t];return void 0===n&&(e.custom?(n=e.custom[t],void 0===n&&r.default.system.warn("ConfigUtil.resolveString",`Missing [${t}] variable from finsemble.custom configuration object`)):r.default.system.error("ConfigUtil.resolveString",`Missing "custom" node from finsemble configuration - unable to get variable resoution for variable: ${t}`)),n}function u(e,t,n){r.default.system.verbose("forceObjectsToLogger","resolveArray","pass",t,"recursionLevel",n,"configArray:",e);for(let r=0;r<e.length;r++){const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&l(i,t,n+1)}}function l(e,t,n){e=e||{},r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveObject","pass",t,"recursionLevel",n,"configObject:",e),Object.keys(e).forEach((r=>{const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&l(i,t,n+1)}))}for(;o&&i++<100;)o=!1,l(t,++n,1);i>=100&&r.default.system.error("forceObjectsToLogger","resolveConfigVariables exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)},this.getExpandedRawManifest=function(t,n){function o(t,s,a){r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getRawManifest",s,a),s.getManifest((n=>{r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",n),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",n),t(n)}),(e=>{e&&(r.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e),n&&n()),s.getParentUuid((e=>{const n=i.System.Application.wrap(e);r.default.system.debug("forceObjectsToLogger","uuid",e,"parentApplication",n),a<10?o(t,n,++a):t("could not find manifest in parent applications")}))}))}r.default.system.debug("ConfigUtil.getExpandedRawManifest starting"),i.System.ready((()=>{const e=i.System.Application.getCurrent();o(t,e,1)}))},this.readConfigFile=function(e,t){r.default.system.debug(`fetching ${e}`),fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`Failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e)}))},this.getInitialManifest=function(t){i.System.ready((()=>{i.System.Application.getCurrent().getManifest((n=>{n.finsemble=n.finsemble||{},e.resolveConfigVariables(n.finsemble,n.finsemble),n.finsemble.applicationRoot||r.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const i=`${n.finsemble.moduleRoot}/configs/core/config.json`;e.readConfigFile(i,((o,s)=>{o?r.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${n.finsemble.moduleRoot}; Full Path=${i}`,o):(Object.keys(s).forEach((e=>{if("importConfig"===e){n.finsemble.importConfig=n.finsemble.importConfig||[];for(let e=0;e<s.importConfig.length;e++)n.finsemble.importConfig.unshift(s.importConfig[e])}else if("importThirdPartyConfig"===e){n.finsemble.importThirdPartyConfig=n.finsemble.importThirdPartyConfig||[];for(let e=0;e<s.importThirdPartyConfig.length;e++)n.finsemble.importThirdPartyConfig.unshift(s.importThirdPartyConfig[e])}else n.finsemble[e]=s[e]})),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",n)),t(n)}))}))}))},this.promptAndSaveJSONToLocalFile=function(e,t){r.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),i=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",o),s.click()},this.configFormatForExport=function(e,t){r.default.system.debug("configFormatForExport starting",e,t);let n=o.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n},this.getDefault=function(e,t,n){let r=n;if(e){try{const n=t.split(".");let i=e;for(let e=1;e<n.length;e++)i=i[n[e]];r=i}catch(e){r=n}void 0===r&&(r=n)}return r},this.getFile=async function(e,t=Function.prototype){r.default.system.debug(`fetching import ${e}`);let n=null;return await fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e),n=e})),n}};t.ConfigUtilInstance=a},3802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(5939),i=u(n(2551)),o=u(n(8021)),s=u(n(1879)),a=n(4232);function u(e){return e&&e.__esModule?e:{default:e}}let l;class c extends r.EventEmitter{constructor(e,t,n){if(super(),!n||!n.System)throw new Error("Monitors class requires dependency injection. Ensure that System is being passed in.");({System:l}=n),this.cachedMonitorInfo=null,this.limitedMonitorRefreshQueue=new o.default({concurrency:1}),this.bindAllFunctions(),this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(e))),l.addEventListener("monitor-info-changed",(()=>{this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))})),l.addEventListener("session-changed",(e=>{e&&("object"!=typeof e||!e.hasOwnProperty("reason")||"unlock"!==e.reason&&"remote-connect"!==e.reason&&"unknown"!==e.reason)||this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))}))}bindAllFunctions(){let e=this;for(let t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){let n=e[t];n instanceof Function&&n!==c&&(e[t]=e[t].bind(e))}}asyncIt(e,t){return t(e),e}rationalizeMonitor(e){e.monitorRect.width=e.monitorRect.right-e.monitorRect.left,e.monitorRect.height=e.monitorRect.bottom-e.monitorRect.top,e.availableRect.width=e.availableRect.right-e.availableRect.left,e.availableRect.height=e.availableRect.bottom-e.availableRect.top}calculateMonitorScale(e,t){return(t.right-t.left)/(e.right-e.left)}monitorInfoIsChanged(e,t){if(!e||!t)return!0;if(e.nonPrimaryMonitors.length!==t.nonPrimaryMonitors.length)return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.availableRect,t.primaryMonitor.availableRect))return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.monitorRect,t.primaryMonitor.monitorRect))return!0;e.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0)),t.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0));let n=!1;return e.nonPrimaryMonitors.forEach(((e,r)=>{const i=t.nonPrimaryMonitors[r];(0,a.checkIfBoundsAreEqual)(e.availableRect,i.availableRect)&&(0,a.checkIfBoundsAreEqual)(e.monitorRect,i.monitorRect)||(n=!0)})),n}async refreshMonitors(e=Function.prototype){this.limitedMonitorRefreshQueue.clear();const t=await l.getMonitorInfo();if(!this.monitorInfoIsChanged(this.cachedMonitorInfo,t))return i.default.system.info("Skipped refreshMonitors because monitors do not change."),e(this.allMonitors);this.allMonitors=[];let{primaryMonitor:n}=t;if(Object.entries(n).length){n.whichMonitor="primary",n.position=0,this.allMonitors.push(Object.assign({},n));for(let e=0;e<t.nonPrimaryMonitors.length;e++){let n=t.nonPrimaryMonitors[e];n.whichMonitor=e,n.position=e+1,this.allMonitors.push(n)}for(let e=0;e<this.allMonitors.length;e++){let t=this.allMonitors[e];this.rationalizeMonitor(t)}this.cachedMonitorInfo=(0,s.default)(t),e(this.allMonitors),this.ready=!0,1===this.limitedMonitorRefreshQueue.pending&&this.emit("monitors-changed",{monitors:this.allMonitors})}else i.default.system.info("There is no primary monitor in 'monitorInfo' - the system is still in the process of updating the monitor information. Returning from monitorsAndScaling -> refreshMonitors")}getAllMonitors(e=Function.prototype){return this.ready?this.asyncIt(JSON.parse(JSON.stringify(this.allMonitors)),e):e?void this.refreshMonitors(e):"not ready"}getMonitorFromScaledXY(e,t,n=Function.prototype){return new Promise((r=>{if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromScaledXY(e,t,n)})),"not ready";let i=null;for(var o=this.allMonitors,s=0;s<o.length;s++){var a=o[s],{monitorRect:u}=a;if(e>=u.left&&e<u.right&&t>=u.top&&t<u.bottom){i=a;break}}r(i),n(i)}))}getMonitorFromUnscaledXY(e,t,n=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromUnscaledXY(e,t,n)})),"not ready";for(var r=this.allMonitors,i=0;i<r.length;i++){var o=r[i],s=o.monitor.scaledRect;if(e>=s.left&&e<s.right&&t>=s.top&&t<s.bottom)return this.asyncIt(o,n)}return this.asyncIt(null,n)}async translatePointFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointFromScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var{monitor:r}=e;r||(r=(await this.getMonitorFromScaledXY(n.x,n.y)).data);let i=null;if(r){var o=n.x-r.monitorRect.left,s=n.y-r.monitorRect.top,a=o*r.deviceScaleFactor,u=s*r.deviceScaleFactor;i={x:a+r.monitor.scaledRect.left,y:u+r.monitor.scaledRect.top}}return t(i),Promise.resolve(i)}translatePointToScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointToScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var r=e.monitor||this.getMonitorFromUnscaledXY(n.x,n.y);if(!r)return this.asyncIt(null,t);var i=n.x-r.monitor.scaledRect.left,o=n.y-r.monitor.scaledRect.top,s=i/r.deviceScaleFactor,a=o/r.deviceScaleFactor,u={x:s+r.monitorRect.left,y:a+r.monitorRect.top};return this.asyncIt(u,t)}async translateRectToScaled(e,t=Function.prototype){let n;if(!this.ready)return this.refreshMonitors((()=>{this.translateRectToScaled(e,t)})),"not ready";var r=this.translatePointToScaled({x:e.left,y:e.top}),i=this.translatePointToScaled({x:e.right,y:e.bottom});return!r&&i&&(n=await this.getMonitorFromScaledXY(i),r=this.translatePointToScaled({monitor:n,point:{x:e.left,y:e.top}})),!i&&r&&(n=await this.getMonitorFromScaledXY(i),i=this.translatePointToScaled({monitor:n,point:{x:e.right,y:e.bottom}})),this.asyncIt({top:r?r.y:null,left:r?r.x:null,bottom:i?i.y:null,right:i?i.x:null,height:r&&i?i.y-r.y:null,width:r&&i?i.x-r.x:null},t)}translateRectFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translateRectFromScaled(e,t)})),"not ready";var n=this.translatePointFromScaled({x:e.left,y:e.top}),r=this.translatePointFromScaled({x:e.right,y:e.bottom});return!n&&r&&(n=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(r),point:{x:e.left,y:e.top}})),!r&&n&&(r=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(n),point:{x:e.right,y:e.bottom}})),this.asyncIt({top:n?n.y:null,left:n?n.x:null,bottom:r?r.y:null,right:r?r.x:null,height:n&&r?r.y-n.y:null,width:n&&r?r.x-n.x:null},t)}}var d=c;t.default=d},9886:(e,t)=>{"use strict";function r(e,t){const n=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<n.length;++t){const r=n[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(r in e))return null;e=e[r]}return e}function i(e,t){const n=[];for(const r in e){const i=`${t}.`;r.includes(i)&&(n.push(r),delete e[r])}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.byString=r,t.initObject=function e(t,r,i){let o;if(r||(r=null),"object"!=typeof t)return o=r?`${r}.${n}`:n,void(i[o]=r);for(const n in t)"object"==typeof t[n]&&"undefined"!==t[n]?(o=r?`${r}.${n}`:n,i[o]=r,e(t[n],o,i)):(o=r?`${r}.${n}`:n,i[o]=r)},t.mapField=function e(t,n,i){if(i[n])return;const o=(n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),s=n;if(!i.hasOwnProperty(s)){let e=null;o.length>1&&(o.pop(),e=o.join(".")),i[s]=e}const a=r(t,s);if("undefined"!==a&&"object"==typeof a)for(const n in a)e(t,`${s}.${n}`,i)},t.checkForObjectChange=function(e,t,n){const o=r(e,t);return null!==o&&("object"==typeof o||"object"!=typeof o&&"object"==typeof t?i(n,t):null)},t.setPath=void 0,t.setPath=(e,t,n)=>t.split(".").reduce(((e,r)=>e[r]=t.split(".").pop()===r?n:e[r]||{}),e)},1014:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new function(){let e=3;this.diagLevel=function(){return e},this.setDiagLevel=function(t){e=t},this.validationEnabled=function(){return e>=4}};t.default=n},3699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(2551)),i=n(3998),o=n(1742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var l=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(10).default),u.getValue({field:"finsemble"},((t,n)=>{a=i.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(a)})))},this.alert=function(e,t,n,r,i){const o=this;i&&i.url?this.alertInternal(e,t,n,r,i,i.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,r,i,s)}))},this.alertInternal=function(n,i,a,u,l,c){let d=!1;const f=`UserNotification.alert.${a}`,p=(l=l||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":f in e?d=!1:(d=!0,e[f]=!0);break;case"MAX-COUNT":{let e=0;const n=l.maxCount||1;f in t&&(e=t[f]),t[f]=++e,e<=n&&(d=!0);break}default:d=!0}if(r.default.log("UserNotification.alert",n,d,i,a,u,l),d){const e={url:c,message:u,timeout:p};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=l},3712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(1014))&&r.__esModule?r:{default:r},o=new function(){function e(e,t,n){const r=function(){try{throw Error("")}catch(e){return e}}(),i=r.stack.split("\n")[5],o=i.indexOf("at "),s=i.slice(o+2,i.length),a=r.stack.split("\n")[6],u=a.indexOf("at "),l=a.slice(u+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${l}`)}this.args=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%2!=0)for(let r=0;r<n;r+=2){let n=!1;const i=arguments[r];let o=arguments[r+1];if("="===o.slice(-1)&&(o=o.slice(0,-1),n=!0),typeof i!==o&&!(n&&void 0===i||void 0!==i&&"any"===o)){e(r/2+1,i,o),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t},this.args2=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%3!=0)for(let r=0;r<n;r+=3){let n=!1;const i=arguments[r],o=arguments[r+1];let s=arguments[r+2];if("="===s.slice(-1)&&(s=s.slice(0,-1),n=!0),typeof o!==s&&!(n&&void 0===o||void 0!==o&&"any"===s)){e(i,o,s),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t}};t.default=o},1921:(e,t,n)=>{(t=n(352)(!1)).push([e.id,"/**\r\n * The contents of this file are dynamically injected as a <style> tag\r\n * within the scrim container element.\r\n */\r\n:root {\r\n\t--accent-primary-1: #36788b;\r\n\t--accent-negative: #f26666;\r\n\t--scrim-positive-background-color: var(--accent-primary-1);\r\n\t--scrim-negative-background-color: var(--accent-negative);\r\n}\r\n\r\n.fsbl-share-scrim {\r\n\tposition: fixed;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\tz-index: 1000000;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tjustify-content: center;\r\n\talign-content: center;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n\ttransition: all 0.3s ease;\r\n\topacity: 0.85;\r\n\tbackground-color: var(--scrim-positive-background-color);\r\n}\r\n\r\n.fsbl-share-scrim .error-message {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-content: center;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tpadding: 1em;\r\n\tbackground-color: var(--scrim-negative-background-color);\r\n}\r\n\r\n.fsbl-share-scrim img {\r\n\tdisplay: flex;\r\n\theight: 10%;\r\n\twidth: 10%;\r\n\tz-index: 1000000;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tjustify-content: center;\r\n\talign-content: center;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n}\r\n\r\n.fsbl-share-scrim.no {\r\n\tbackground-color: var(--scrim-negative-background-color);\r\n}\r\n",""]),e.exports=t},352:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,o=e[1]||"",s=e[3];if(!s)return o;if(t&&"function"==typeof btoa){var a=(n=s,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),u=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[o].concat(u).concat([a]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<e.length;a++){var u=[].concat(e[a]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},3034:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,s),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,r);break;case 4:c[l].fn.call(c[l].context,t,r,i);break;default:if(!u)for(f=1,u=new Array(d-1);f<d;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||i&&!a[u].once||r&&a[u].context!==r)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},5939:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,o,s,l;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,c=h(u,l);for(n=0;n<l;++n)r(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},8096:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[X]}function o(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===te}(e)||Array.isArray(e)||!!e[Z]||!!e.constructor[Z]||p(e)||h(e))}function s(e){return i(e)||r(23,e),e[X].t}function a(e,t,n){void 0===n&&(n=!1),0===u(e)?(n?Object.keys:ne)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function u(e){var t=e[X];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:p(e)?2:h(e)?3:0}function l(e,t){return 2===u(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===u(e)?e.get(t):e[t]}function d(e,t,n){var r=u(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e){return Y&&e instanceof Map}function h(e){return Q&&e instanceof Set}function g(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=re(e);delete t[X];for(var n=ne(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function y(e,t){return void 0===t&&(t=!1),w(e)||i(e)||!o(e)||(u(e)>1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return y(t,!0)}),!0)),e}function v(){r(2)}function w(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=ie[e];return t||r(18,e),t}function S(e,t){ie[e]||(ie[e]=t)}function C(){return V}function _(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function L(e){A(e),e.p.forEach(I),e.p=null}function A(e){e===V&&(V=e.l)}function E(e){return V={p:[],l:V,h:e,m:!0,_:0}}function I(e){var t=e[X];0===t.i||1===t.i?t.j():t.O=!0}function O(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.g||b("ES5").S(t,e,i),i?(n[X].P&&(L(t),r(4)),o(e)&&(e=T(t,e),t.l||D(t,e)),t.u&&b("Patches").M(n[X],e,t.u,t.s)):e=T(t,n,[]),L(t),t.u&&t.v(t.u,t.s),e!==J?e:void 0}function T(e,t,n){if(w(t))return t;var r=t[X];if(!r)return a(t,(function(i,o){return M(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return D(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=m(r.k):r.o;a(3===r.i?new Set(i):i,(function(t,o){return M(e,r,i,t,o,n)})),D(e,i,!1),n&&e.u&&b("Patches").R(r,n,e.u,e.s)}return r.o}function M(e,t,n,r,s,a){if(i(s)){var u=T(e,s,a&&t&&3!==t.i&&!l(t.D,r)?a.concat(r):void 0);if(d(n,r,u),!i(u))return;e.m=!1}if(o(s)&&!w(s)){if(!e.h.F&&e._<1)return;T(e,s),t&&t.A.l||D(e,s)}}function D(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&y(t,n)}function k(e,t){var n=e[X];return(n?g(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function j(e){e.P||(e.P=!0,e.l&&j(e.l))}function R(e){e.o||(e.o=m(e.t))}function P(e,t,n){var r=p(t)?b("MapSet").N(t,n):h(t)?b("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:C(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=oe;n&&(i=[r],o=se);var s=Proxy.revocable(i,o),a=s.revoke,u=s.proxy;return r.k=u,r.j=a,u}(t,n):b("ES5").J(t,n);return(n?n.A:C()).p.push(r),r}function W(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[X],i=u(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=F(t,i),r.I=!1}else n=F(t,i);return a(n,(function(t,i){r&&c(r.t,t)===i||d(n,t,e(i))})),3===i?new Set(n):n}(e)}function F(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function x(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[X];return oe.get(t,e)},set:function(t){var n=this[X];oe.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][X];if(!i.P)switch(i.i){case 5:r(i)&&j(i);break;case 4:n(i)&&j(i)}}}function n(e){for(var t=e.t,n=e.k,r=ne(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==X){var s=t[o];if(void 0===s&&!l(t,o))return!0;var a=n[o],u=a&&a[X];if(u?u.t!==s:!f(a,s))return!0}}var c=!!t[X];return r.length!==ne(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var o={};S("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var o=re(n);delete o[X];for(var s=ne(o),a=0;a<s.length;a++){var u=s[a];o[u]=e(u,t||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,t),o={i:r?5:4,A:n?n.A:C(),P:!1,I:!1,D:{},l:n,t,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,X,{value:o,writable:!0}),i},S:function(e,n,o){o?i(n)&&n[X].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[X];if(n){var i=n.t,o=n.k,s=n.D,u=n.i;if(4===u)a(o,(function(t){t!==X&&(void 0!==i[t]||l(i,t)?s[t]||e(o[t]):(s[t]=!0,j(n)))})),a(i,(function(e){void 0!==o[e]||l(o,e)||(s[e]=!1,j(n))}));else if(5===u){if(r(n)&&(j(n),s.length=!0),o.length<i.length)for(var c=o.length;c<i.length;c++)s[c]=!1;else for(var d=i.length;d<o.length;d++)s[d]=!0;for(var f=Math.min(o.length,i.length),p=0;p<f;p++)void 0===s[p]&&e(o[p])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}function B(){function e(t){if(!o(t))return t;if(Array.isArray(t))return t.map(e);if(p(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(h(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return l(t,Z)&&(n[Z]=t[Z]),n}function t(t){return i(t)?e(t):t}var n="add";S("Patches",{$:function(t,i){return i.forEach((function(i){for(var o=i.path,s=i.op,a=t,l=0;l<o.length-1;l++){var d=u(a),f=o[l];0!==d&&1!==d||"__proto__"!==f&&"constructor"!==f||r(24),"function"==typeof a&&"prototype"===f&&r(24),"object"!=typeof(a=c(a,f))&&r(15,o.join("/"))}var p=u(a),h=e(i.value),g=o[o.length-1];switch(s){case"replace":switch(p){case 2:return a.set(g,h);case 3:r(16);default:return a[g]=h}case n:switch(p){case 1:return a.splice(g,0,h);case 2:return a.set(g,h);case 3:return a.add(h);default:return a[g]=h}case"remove":switch(p){case 1:return a.splice(g,1);case 2:return a.delete(g);case 3:return a.delete(i.value);default:return delete a[g]}default:r(17,s)}})),t},R:function(e,r,i,o){switch(e.i){case 0:case 4:case 2:return function(e,r,i,o){var s=e.t,u=e.o;a(e.D,(function(e,a){var d=c(s,e),f=c(u,e),p=a?l(s,e)?"replace":n:"remove";if(d!==f||"replace"!==p){var h=r.concat(e);i.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:f}),o.push(p===n?{op:"remove",path:h}:"remove"===p?{op:n,path:h,value:t(d)}:{op:"replace",path:h,value:t(d)})}}))}(e,r,i,o);case 5:case 1:return function(e,r,i,o){var s=e.t,a=e.D,u=e.o;if(u.length<s.length){var l=[u,s];s=l[0],u=l[1];var c=[o,i];i=c[0],o=c[1]}for(var d=0;d<s.length;d++)if(a[d]&&u[d]!==s[d]){var f=r.concat([d]);i.push({op:"replace",path:f,value:t(u[d])}),o.push({op:"replace",path:f,value:t(s[d])})}for(var p=s.length;p<u.length;p++){var h=r.concat([p]);i.push({op:n,path:h,value:t(u[p])})}s.length<u.length&&o.push({op:"replace",path:r.concat(["length"]),value:s.length})}(e,r,i,o);case 3:return function(e,t,r,i){var o=e.t,s=e.o,a=0;o.forEach((function(e){if(!s.has(e)){var o=t.concat([a]);r.push({op:"remove",path:o,value:e}),i.unshift({op:n,path:o,value:e})}a++})),a=0,s.forEach((function(e){if(!o.has(e)){var s=t.concat([a]);r.push({op:n,path:s,value:e}),i.unshift({op:"remove",path:s,value:e})}a++}))}(e,r,i,o)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t}),r.push({op:"replace",path:[],value:e.t})}})}function $(){function e(e,t){function n(){this.constructor=e}s(e,t),e.prototype=(n.prototype=t.prototype,new n)}function t(e){e.o||(e.D=new Map,e.o=new Map(e.t))}function n(e){e.o||(e.o=new Set,e.t.forEach((function(t){if(o(t)){var n=P(e.A.h,t,e);e.p.set(t,n),e.o.add(n)}else e.o.add(t)})))}function i(e){e.O&&r(3,JSON.stringify(g(e)))}var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},u=function(){function n(e,t){return this[X]={i:2,l:t,A:t?t.A:C(),P:!1,I:!1,o:void 0,D:void 0,t:e,k:this,C:!1,O:!1},this}e(n,Map);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return g(this[X]).size}}),r.has=function(e){return g(this[X]).has(e)},r.set=function(e,n){var r=this[X];return i(r),g(r).has(e)&&g(r).get(e)===n||(t(r),j(r),r.D.set(e,!0),r.o.set(e,n),r.D.set(e,!0)),this},r.delete=function(e){if(!this.has(e))return!1;var n=this[X];return i(n),t(n),j(n),n.D.set(e,!1),n.o.delete(e),!0},r.clear=function(){var e=this[X];i(e),g(e).size&&(t(e),j(e),e.D=new Map,a(e.t,(function(t){e.D.set(t,!1)})),e.o.clear())},r.forEach=function(e,t){var n=this;g(this[X]).forEach((function(r,i){e.call(t,n.get(i),i,n)}))},r.get=function(e){var n=this[X];i(n);var r=g(n).get(e);if(n.I||!o(r))return r;if(r!==n.t.get(e))return r;var s=P(n.A.h,r,n);return t(n),n.o.set(e,s),s},r.keys=function(){return g(this[X]).keys()},r.values=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},r.entries=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},r[ee]=function(){return this.entries()},n}(),l=function(){function t(e,t){return this[X]={i:3,l:t,A:t?t.A:C(),P:!1,I:!1,o:void 0,t:e,k:this,p:new Map,O:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return g(this[X]).size}}),r.has=function(e){var t=this[X];return i(t),t.o?!!t.o.has(e)||!(!t.p.has(e)||!t.o.has(t.p.get(e))):t.t.has(e)},r.add=function(e){var t=this[X];return i(t),this.has(e)||(n(t),j(t),t.o.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[X];return i(t),n(t),j(t),t.o.delete(e)||!!t.p.has(e)&&t.o.delete(t.p.get(e))},r.clear=function(){var e=this[X];i(e),g(e).size&&(n(e),j(e),e.o.clear())},r.values=function(){var e=this[X];return i(e),n(e),e.o.values()},r.entries=function(){var e=this[X];return i(e),n(e),e.o.entries()},r.keys=function(){return this.values()},r[ee]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}();S("MapSet",{N:function(e,t){return new u(e,t)},T:function(e,t){return new l(e,t)}})}function U(){x(),$(),B()}function z(e){return e}function H(e){return e}n.r(t),n.d(t,{default:()=>me,Immer:()=>ae,applyPatches:()=>pe,castDraft:()=>z,castImmutable:()=>H,createDraft:()=>he,current:()=>W,enableAllPlugins:()=>U,enableES5:()=>x,enableMapSet:()=>$,enablePatches:()=>B,finishDraft:()=>ge,freeze:()=>y,immerable:()=>Z,isDraft:()=>i,isDraftable:()=>o,nothing:()=>J,original:()=>s,produce:()=>le,produceWithPatches:()=>ce,setAutoFreeze:()=>de,setUseProxies:()=>fe});var q,V,G="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Y="undefined"!=typeof Map,Q="undefined"!=typeof Set,K="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,J=G?Symbol.for("immer-nothing"):((q={})["immer-nothing"]=!0,q),Z=G?Symbol.for("immer-draftable"):"__$immer_draftable",X=G?Symbol.for("immer-state"):"__$immer_state",ee="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",te=""+Object.prototype.constructor,ne="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,re=Object.getOwnPropertyDescriptors||function(e){var t={};return ne(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ie={},oe={get:function(e,t){if(t===X)return e;var n=g(e);if(!l(n,t))return function(e,t,n){var r,i=N(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!o(r)?r:r===k(e.t,t)?(R(e),e.o[t]=P(e.A.h,r,e)):r},has:function(e,t){return t in g(e)},ownKeys:function(e){return Reflect.ownKeys(g(e))},set:function(e,t,n){var r=N(g(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=k(g(e),t),o=null==i?void 0:i[X];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(f(n,i)&&(void 0!==n||l(e.t,t)))return!0;R(e),j(e)}return e.o[t]===n&&"number"!=typeof n||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==k(e.t,t)||t in e.t?(e.D[t]=!1,R(e),j(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=g(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},se={};a(oe,(function(e,t){se[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),se.deleteProperty=function(e,t){return oe.deleteProperty.call(this,e[0],t)},se.set=function(e,t,n){return oe.set.call(this,e[0],t,n,e[0])};var ae=function(){function e(e){var t=this;this.g=K,this.F=!0,this.produce=function(e,n,i){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(i))}))}}var u;if("function"!=typeof n&&r(6),void 0!==i&&"function"!=typeof i&&r(7),o(e)){var l=E(t),c=P(t,e,void 0),d=!0;try{u=n(c),d=!1}finally{d?L(l):A(l)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return _(l,i),O(e,l)}),(function(e){throw L(l),e})):(_(l,i),O(u,l))}if(!e||"object"!=typeof e){if((u=n(e))===J)return;return void 0===u&&(u=e),t.F&&y(u,!0),u}r(21,e)},this.produceWithPatches=function(e,n){return"function"==typeof e?function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))}:[t.produce(e,n,(function(e,t){r=e,i=t})),r,i];var r,i},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),i(e)&&(e=W(e));var t=E(this),n=P(this,e,void 0);return n[X].C=!0,A(t),n},t.finishDraft=function(e,t){var n=(e&&e[X]).A;return _(n,t),O(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!K&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var o=b("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(n+1))}))},e}(),ue=new ae,le=ue.produce,ce=ue.produceWithPatches.bind(ue),de=ue.setAutoFreeze.bind(ue),fe=ue.setUseProxies.bind(ue),pe=ue.applyPatches.bind(ue),he=ue.createDraft.bind(ue),ge=ue.finishDraft.bind(ue);const me=le},4081:(e,t,n)=>{var r=n(1059)(n(158),"DataView");e.exports=r},5999:(e,t,n)=>{var r=n(3387),i=n(9252),o=n(1125),s=n(9021),a=n(8131);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},6811:(e,t,n)=>{var r=n(2215),i=n(6105),o=n(484),s=n(8046),a=n(603);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},945:(e,t,n)=>{var r=n(1059)(n(158),"Map");e.exports=r},5835:(e,t,n)=>{var r=n(3633),i=n(9382),o=n(8850),s=n(756),a=n(2769);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},7540:(e,t,n)=>{var r=n(1059)(n(158),"Promise");e.exports=r},476:(e,t,n)=>{var r=n(1059)(n(158),"Set");e.exports=r},4868:(e,t,n)=>{var r=n(5835),i=n(7554),o=n(8800);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},4987:(e,t,n)=>{var r=n(6811),i=n(3832),o=n(1676),s=n(3577),a=n(3343),u=n(488);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},4937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},8596:(e,t,n)=>{var r=n(158).Uint8Array;e.exports=r},8307:(e,t,n)=>{var r=n(1059)(n(158),"WeakMap");e.exports=r},929:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},2812:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},5680:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},2554:(e,t,n)=>{var r=n(5086),i=n(7016),o=n(3706),s=n(7638),a=n(9699),u=n(94),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),d=!n&&!c&&s(e),f=!n&&!c&&!d&&u(e),p=n||c||d||f,h=p?r(e.length,String):[],g=h.length;for(var m in e)!t&&!l.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||h.push(m);return h}},7041:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},2824:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},9280:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6122:(e,t,n)=>{var r=n(8039),i=n(1316),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},3993:(e,t,n)=>{var r=n(1316);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3977:(e,t,n)=>{var r=n(4386),i=n(3150);e.exports=function(e,t){return e&&r(t,i(t),e)}},5081:(e,t,n)=>{var r=n(4386),i=n(1530);e.exports=function(e,t){return e&&r(t,i(t),e)}},8039:(e,t,n)=>{var r=n(8689);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9548:(e,t,n)=>{var r=n(4987),i=n(2812),o=n(6122),s=n(3977),a=n(5081),u=n(728),l=n(6923),c=n(1375),d=n(1584),f=n(7461),p=n(1441),h=n(5551),g=n(5539),m=n(3394),y=n(5010),v=n(3706),w=n(7638),b=n(5948),S=n(3619),C=n(8255),_=n(3150),L=n(1530),A="[object Arguments]",E="[object Function]",I="[object Object]",O={};O[A]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[I]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[E]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,T,M,D,k){var N,j=1&n,R=2&n,P=4&n;if(T&&(N=D?T(t,M,D,k):T(t)),void 0!==N)return N;if(!S(t))return t;var W=v(t);if(W){if(N=g(t),!j)return l(t,N)}else{var F=h(t),x=F==E||"[object GeneratorFunction]"==F;if(w(t))return u(t,j);if(F==I||F==A||x&&!D){if(N=R||x?{}:y(t),!j)return R?d(t,a(N,t)):c(t,s(N,t))}else{if(!O[F])return D?t:{};N=m(t,F,j)}}k||(k=new r);var B=k.get(t);if(B)return B;k.set(t,N),C(t)?t.forEach((function(r){N.add(e(r,n,T,r,t,k))})):b(t)&&t.forEach((function(r,i){N.set(i,e(r,n,T,i,t,k))}));var $=W?void 0:(P?R?p:f:R?L:_)(t);return i($||t,(function(r,i){$&&(r=t[i=r]),o(N,i,e(r,n,T,i,t,k))})),N}},3776:(e,t,n)=>{var r=n(3619),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},2153:(e,t,n)=>{var r=n(2824),i=n(6648);e.exports=function e(t,n,o,s,a){var u=-1,l=t.length;for(o||(o=i),a||(a=[]);++u<l;){var c=t[u];n>0&&o(c)?n>1?e(c,n-1,o,s,a):r(a,c):s||(a[a.length]=c)}return a}},1845:(e,t,n)=>{var r=n(9160),i=n(6384);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},5328:(e,t,n)=>{var r=n(2824),i=n(3706);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},194:(e,t,n)=>{var r=n(4937),i=n(5401),o=n(2445),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},6640:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},4634:(e,t,n)=>{var r=n(194),i=n(1653);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},5372:(e,t,n)=>{var r=n(5365),i=n(1653);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,s,e,a))}},5365:(e,t,n)=>{var r=n(4987),i=n(5428),o=n(1108),s=n(1711),a=n(5551),u=n(3706),l=n(7638),c=n(94),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,y){var v=u(e),w=u(t),b=v?f:a(e),S=w?f:a(t),C=(b=b==d?p:b)==p,_=(S=S==d?p:S)==p,L=b==S;if(L&&l(e)){if(!l(t))return!1;v=!0,C=!1}if(L&&!C)return y||(y=new r),v||c(e)?i(e,t,n,g,m,y):o(e,t,b,n,g,m,y);if(!(1&n)){var A=C&&h.call(e,"__wrapped__"),E=_&&h.call(t,"__wrapped__");if(A||E){var I=A?e.value():e,O=E?t.value():t;return y||(y=new r),m(I,O,n,g,y)}}return!!L&&(y||(y=new r),s(e,t,n,g,m,y))}},2471:(e,t,n)=>{var r=n(5551),i=n(1653);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},4249:(e,t,n)=>{var r=n(9277),i=n(3481),o=n(3619),s=n(1223),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?f:a).test(s(e))}},2388:(e,t,n)=>{var r=n(5551),i=n(1653);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},8595:(e,t,n)=>{var r=n(194),i=n(2008),o=n(1653),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},6324:(e,t,n)=>{var r=n(3067),i=n(2501),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1506:(e,t,n)=>{var r=n(3619),i=n(3067),o=n(807),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},1241:(e,t,n)=>{var r=n(722),i=n(7975);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},722:(e,t,n)=>{var r=n(1845),i=n(8400),o=n(9160);e.exports=function(e,t,n){for(var s=-1,a=t.length,u={};++s<a;){var l=t[s],c=r(e,l);n(c,l)&&i(u,o(l,e),c)}return u}},8400:(e,t,n)=>{var r=n(6122),i=n(9160),o=n(9699),s=n(3619),a=n(6384);e.exports=function(e,t,n,u){if(!s(e))return e;for(var l=-1,c=(t=i(t,e)).length,d=c-1,f=e;null!=f&&++l<c;){var p=a(t[l]),h=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(l!=d){var g=f[p];void 0===(h=u?u(g,p,f):void 0)&&(h=s(g)?g:o(t[l+1])?[]:{})}r(f,p,h),f=f[p]}return e}},6920:(e,t,n)=>{var r=n(446),i=n(8689),o=n(1549),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},5086:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},430:(e,t,n)=>{var r=n(4937),i=n(7041),o=n(3706),s=n(1878),a=r?r.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},2383:(e,t,n)=>{var r=n(8725),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},2723:e=>{e.exports=function(e){return function(t){return e(t)}}},7446:e=>{e.exports=function(e,t){return e.has(t)}},9160:(e,t,n)=>{var r=n(3706),i=n(3140),o=n(9230),s=n(3270);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},3310:(e,t,n)=>{var r=n(8596);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},728:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},4352:(e,t,n)=>{var r=n(3310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},4694:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},9169:(e,t,n)=>{var r=n(4937),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},9752:(e,t,n)=>{var r=n(3310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6923:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},4386:(e,t,n)=>{var r=n(6122),i=n(8039);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=o?o(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),s?i(n,l,c):r(n,l,c)}return n}},1375:(e,t,n)=>{var r=n(4386),i=n(5278);e.exports=function(e,t){return r(e,i(e),t)}},1584:(e,t,n)=>{var r=n(4386),i=n(7508);e.exports=function(e,t){return r(e,i(e),t)}},8728:(e,t,n)=>{var r=n(158)["__core-js_shared__"];e.exports=r},8689:(e,t,n)=>{var r=n(1059),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},5428:(e,t,n)=>{var r=n(4868),i=n(9280),o=n(7446);e.exports=function(e,t,n,s,a,u){var l=1&n,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(e),p=u.get(t);if(f&&p)return f==t&&p==e;var h=-1,g=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var y=e[h],v=t[h];if(s)var w=l?s(v,y,h,t,e,u):s(y,v,h,e,t,u);if(void 0!==w){if(w)continue;g=!1;break}if(m){if(!i(t,(function(e,t){if(!o(m,t)&&(y===e||a(y,e,n,s,u)))return m.push(t)}))){g=!1;break}}else if(y!==v&&!a(y,v,n,s,u)){g=!1;break}}return u.delete(e),u.delete(t),g}},1108:(e,t,n)=>{var r=n(4937),i=n(8596),o=n(1316),s=n(5428),a=n(1382),u=n(6680),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var h=1&r;if(p||(p=u),e.size!=t.size&&!h)return!1;var g=f.get(e);if(g)return g==t;r|=2,f.set(e,t);var m=s(p(e),p(t),r,l,d,f);return f.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},1711:(e,t,n)=>{var r=n(7461),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in t:i.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=u;++d<c;){var y=e[f=l[d]],v=t[f];if(o)var w=u?o(v,y,f,t,e,a):o(y,v,f,e,t,a);if(!(void 0===w?y===v||s(y,v,n,o,a):w)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(g=!1)}return a.delete(e),a.delete(t),g}},408:(e,t,n)=>{var r=n(597),i=n(3039),o=n(7209);e.exports=function(e){return o(i(e,void 0,r),e+"")}},4528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},7461:(e,t,n)=>{var r=n(5328),i=n(5278),o=n(3150);e.exports=function(e){return r(e,o,i)}},1441:(e,t,n)=>{var r=n(5328),i=n(7508),o=n(1530);e.exports=function(e){return r(e,o,i)}},5662:(e,t,n)=>{var r=n(205);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1059:(e,t,n)=>{var r=n(4249),i=n(4759);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},7959:(e,t,n)=>{var r=n(8579)(Object.getPrototypeOf,Object);e.exports=r},5401:(e,t,n)=>{var r=n(4937),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},5278:(e,t,n)=>{var r=n(5680),i=n(9174),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},7508:(e,t,n)=>{var r=n(2824),i=n(7959),o=n(5278),s=n(9174),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},5551:(e,t,n)=>{var r=n(4081),i=n(945),o=n(7540),s=n(476),a=n(8307),u=n(194),l=n(1223),c="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",g=l(r),m=l(i),y=l(o),v=l(s),w=l(a),b=u;(r&&b(new r(new ArrayBuffer(1)))!=h||i&&b(new i)!=c||o&&b(o.resolve())!=d||s&&b(new s)!=f||a&&b(new a)!=p)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return h;case m:return c;case y:return d;case v:return f;case w:return p}return t}),e.exports=b},4759:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6919:(e,t,n)=>{var r=n(9160),i=n(7016),o=n(3706),s=n(9699),a=n(2008),u=n(6384);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,d=!1;++l<c;){var f=u(t[l]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(f,c)&&(o(e)||i(e))}},3387:(e,t,n)=>{var r=n(5155);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9252:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},1125:(e,t,n)=>{var r=n(5155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},9021:(e,t,n)=>{var r=n(5155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},8131:(e,t,n)=>{var r=n(5155);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5539:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},3394:(e,t,n)=>{var r=n(3310),i=n(4352),o=n(4694),s=n(9169),a=n(9752);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return s(e)}}},5010:(e,t,n)=>{var r=n(3776),i=n(7959),o=n(3067);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},6648:(e,t,n)=>{var r=n(4937),i=n(7016),o=n(3706),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},9699:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},3140:(e,t,n)=>{var r=n(3706),i=n(1878),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},205:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},3481:(e,t,n)=>{var r,i=n(8728),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},3067:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},2215:e=>{e.exports=function(){this.__data__=[],this.size=0}},6105:(e,t,n)=>{var r=n(3993),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},484:(e,t,n)=>{var r=n(3993);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8046:(e,t,n)=>{var r=n(3993);e.exports=function(e){return r(this.__data__,e)>-1}},603:(e,t,n)=>{var r=n(3993);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},3633:(e,t,n)=>{var r=n(5999),i=n(6811),o=n(945);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},9382:(e,t,n)=>{var r=n(5662);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},8850:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).get(e)}},756:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).has(e)}},2769:(e,t,n)=>{var r=n(5662);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},1382:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2202:(e,t,n)=>{var r=n(4883);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},5155:(e,t,n)=>{var r=n(1059)(Object,"create");e.exports=r},2501:(e,t,n)=>{var r=n(8579)(Object.keys,Object);e.exports=r},807:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1771:(e,t,n)=>{e=n.nmd(e);var r=n(4528),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},8579:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},3039:(e,t,n)=>{var r=n(929),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=o[s];return l[t]=n(u),r(e,this,l)}}},158:(e,t,n)=>{var r=n(4528),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},7554:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8800:e=>{e.exports=function(e){return this.__data__.has(e)}},6680:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7209:(e,t,n)=>{var r=n(6920),i=n(832)(r);e.exports=i},832:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},3832:(e,t,n)=>{var r=n(6811);e.exports=function(){this.__data__=new r,this.size=0}},1676:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3577:e=>{e.exports=function(e){return this.__data__.get(e)}},3343:e=>{e.exports=function(e){return this.__data__.has(e)}},488:(e,t,n)=>{var r=n(6811),i=n(945),o=n(5835);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},9230:(e,t,n)=>{var r=n(2202),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=s},6384:(e,t,n)=>{var r=n(1878);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},1223:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1879:(e,t,n)=>{var r=n(9548);e.exports=function(e){return r(e,4)}},9748:(e,t,n)=>{var r=n(9548);e.exports=function(e){return r(e,5)}},446:e=>{e.exports=function(e){return function(){return e}}},6897:(e,t,n)=>{var r=n(3619),i=n(8253),o=n(5053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,l,c,d,f,p,h=0,g=!1,m=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=u,r=l;return u=l=void 0,h=t,d=e.apply(r,n)}function w(e){return h=e,f=setTimeout(S,t),g?v(e):d}function b(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-h>=c}function S(){var e=i();if(b(e))return C(e);f=setTimeout(S,function(e){var n=t-(e-p);return m?a(n,c-(e-h)):n}(e))}function C(e){return f=void 0,y&&u?v(e):(u=l=void 0,d)}function _(){var e=i(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return w(p);if(m)return clearTimeout(f),f=setTimeout(S,t),v(p)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?s(o(n.maxWait)||0,t):c,y="trailing"in n?!!n.trailing:y),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=p=l=f=void 0},_.flush=function(){return void 0===f?d:C(i())},_}},1316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},597:(e,t,n)=>{var r=n(2153);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},89:(e,t,n)=>{var r=n(1845);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},7975:(e,t,n)=>{var r=n(6640),i=n(6919);e.exports=function(e,t){return null!=e&&i(e,t,r)}},1549:e=>{e.exports=function(e){return e}},7016:(e,t,n)=>{var r=n(4634),i=n(1653),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},3706:e=>{var t=Array.isArray;e.exports=t},1528:(e,t,n)=>{var r=n(9277),i=n(2008);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},7638:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=n(647),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},7184:(e,t,n)=>{var r=n(5372);e.exports=function(e,t){return r(e,t)}},5162:(e,t,n)=>{var r=n(5372);e.exports=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?r(e,t,void 0,n):!!i}},9277:(e,t,n)=>{var r=n(194),i=n(3619);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},2008:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5948:(e,t,n)=>{var r=n(2471),i=n(2723),o=n(1771),s=o&&o.isMap,a=s?i(s):r;e.exports=a},3619:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1653:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8255:(e,t,n)=>{var r=n(2388),i=n(2723),o=n(1771),s=o&&o.isSet,a=s?i(s):r;e.exports=a},1878:(e,t,n)=>{var r=n(194),i=n(1653);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},94:(e,t,n)=>{var r=n(8595),i=n(2723),o=n(1771),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},3150:(e,t,n)=>{var r=n(2554),i=n(6324),o=n(1528);e.exports=function(e){return o(e)?r(e):i(e)}},1530:(e,t,n)=>{var r=n(2554),i=n(1506),o=n(1528);e.exports=function(e){return o(e)?r(e,!0):i(e)}},3059:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",v="[object Date]",w="[object Error]",b="[object Function]",S="[object GeneratorFunction]",C="[object Map]",_="[object Number]",L="[object Object]",A="[object Promise]",E="[object RegExp]",I="[object Set]",O="[object String]",T="[object Symbol]",M="[object WeakMap]",D="[object ArrayBuffer]",k="[object DataView]",N="[object Float32Array]",j="[object Float64Array]",R="[object Int8Array]",P="[object Int16Array]",W="[object Int32Array]",F="[object Uint8Array]",x="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(q.source),Y=RegExp(V.source),Q=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",Le="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+Le+"]",Ee="["+Se+"]",Ie="\\d+",Oe="["+Ce+"]",Te="[^\\ud800-\\udfff"+Le+Ie+"\\u2700-\\u27bf"+Ce+_e+"]",Me="\\ud83c[\\udffb-\\udfff]",De="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+_e+"]",Re="(?:"+Oe+"|"+Te+")",Pe="(?:"+je+"|"+Te+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Fe="(?:['’](?:D|LL|M|RE|S|T|VE))?",xe="(?:"+Ee+"|"+Me+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+xe+"(?:\\u200d(?:"+[De,ke,Ne].join("|")+")"+Be+xe+")*",Ue="(?:"+["[\\u2700-\\u27bf]",ke,Ne].join("|")+")"+$e,ze="(?:"+[De+Ee+"?",Ee,ke,Ne,"[\\ud800-\\udfff]"].join("|")+")",He=RegExp("['’]","g"),qe=RegExp(Ee,"g"),Ve=RegExp(Me+"(?="+Me+")|"+ze+$e,"g"),Ge=RegExp([je+"?"+Oe+"+"+We+"(?="+[Ae,je,"$"].join("|")+")",Pe+"+"+Fe+"(?="+[Ae,je+Re,"$"].join("|")+")",je+"?"+Re+"+"+We,je+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ue].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Je=-1,Ze={};Ze[N]=Ze[j]=Ze[R]=Ze[P]=Ze[W]=Ze[F]=Ze[x]=Ze[B]=Ze[$]=!0,Ze[g]=Ze[m]=Ze[D]=Ze[y]=Ze[k]=Ze[v]=Ze[w]=Ze[b]=Ze[C]=Ze[_]=Ze[L]=Ze[E]=Ze[I]=Ze[O]=Ze[M]=!1;var Xe={};Xe[g]=Xe[m]=Xe[D]=Xe[k]=Xe[y]=Xe[v]=Xe[N]=Xe[j]=Xe[R]=Xe[P]=Xe[W]=Xe[C]=Xe[_]=Xe[L]=Xe[E]=Xe[I]=Xe[O]=Xe[T]=Xe[F]=Xe[x]=Xe[B]=Xe[$]=!0,Xe[w]=Xe[b]=Xe[M]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=rt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,lt=ut&&rt.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),dt=ct&&ct.isArrayBuffer,ft=ct&&ct.isDate,pt=ct&&ct.isMap,ht=ct&&ct.isRegExp,gt=ct&&ct.isSet,mt=ct&&ct.isTypedArray;function yt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function _t(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Lt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function At(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Et(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function It(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ot(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Mt=Wt("length");function Dt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function kt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):kt(e,Rt,n)}function jt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Rt(e){return e!=e}function Pt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:f}function Wt(e){return function(t){return null==t?i:t[e]}}function Ft(e){return function(t){return null==e?i:e[t]}}function xt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Bt(e,t){for(var n,r=-1,o=e.length;++r<o;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function $t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ut(e){return e?e.slice(0,an(e)+1).replace(re,""):e}function zt(e){return function(t){return e(t)}}function Ht(e,t){return At(t,(function(t){return e[t]}))}function qt(e,t){return e.has(t)}function Vt(e,t){for(var n=-1,r=e.length;++n<r&&Nt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Nt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Qt=Ft({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Kt=Ft({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Zt(e){return Ye.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Zt(e)?function(e){for(var t=Ve.lastIndex=0;Ve.test(e);)++t;return t}(e):Mt(e)}function sn(e){return Zt(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var un=Ft({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,r=(t=null==t?ot:ln.defaults(ot.Object(),t,ln.pick(ot,Ke))).Array,ie=t.Date,Se=t.Error,Ce=t.Function,_e=t.Math,Le=t.Object,Ae=t.RegExp,Ee=t.String,Ie=t.TypeError,Oe=r.prototype,Te=Ce.prototype,Me=Le.prototype,De=t["__core-js_shared__"],ke=Te.toString,Ne=Me.hasOwnProperty,je=0,Re=(n=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Pe=Me.toString,We=ke.call(Le),Fe=ot._,xe=Ae("^"+ke.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,$e=t.Symbol,Ue=t.Uint8Array,ze=Be?Be.allocUnsafe:i,Ve=en(Le.getPrototypeOf,Le),Ye=Le.create,et=Me.propertyIsEnumerable,rt=Oe.splice,it=$e?$e.isConcatSpreadable:i,st=$e?$e.iterator:i,at=$e?$e.toStringTag:i,lt=function(){try{var e=lo(Le,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Mt=ie&&ie.now!==ot.Date.now&&ie.now,Ft=t.setTimeout!==ot.setTimeout&&t.setTimeout,cn=_e.ceil,dn=_e.floor,fn=Le.getOwnPropertySymbols,pn=Be?Be.isBuffer:i,hn=t.isFinite,gn=Oe.join,mn=en(Le.keys,Le),yn=_e.max,vn=_e.min,wn=ie.now,bn=t.parseInt,Sn=_e.random,Cn=Oe.reverse,_n=lo(t,"DataView"),Ln=lo(t,"Map"),An=lo(t,"Promise"),En=lo(t,"Set"),In=lo(t,"WeakMap"),On=lo(Le,"create"),Tn=In&&new In,Mn={},Dn=xo(_n),kn=xo(Ln),Nn=xo(An),jn=xo(En),Rn=xo(In),Pn=$e?$e.prototype:i,Wn=Pn?Pn.valueOf:i,Fn=Pn?Pn.toString:i;function xn(e){if(na(e)&&!qs(e)&&!(e instanceof zn)){if(e instanceof Un)return e;if(Ne.call(e,"__wrapped__"))return Bo(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function $n(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new qn(e);this.size=t.size}function Qn(e,t){var n=qs(e),r=!n&&Hs(e),i=!n&&!r&&Qs(e),o=!n&&!r&&!i&&ca(e),s=n||r||i||o,a=s?$t(e.length,Ee):[],u=a.length;for(var l in e)!t&&!Ne.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||yo(l,u))||a.push(l);return a}function Kn(e){var t=e.length;return t?e[Vr(0,t-1)]:i}function Jn(e,t){return jo(Ii(e),sr(t,0,e.length))}function Zn(e){return jo(Ii(e))}function Xn(e,t,n){(n!==i&&!$s(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Ne.call(e,t)&&$s(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if($s(e[n][0],t))return n;return-1}function nr(e,t,n,r){return dr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Oi(t,ka(t),e)}function ir(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,o=t.length,s=r(o),a=null==e;++n<o;)s[n]=a?i:Ia(e,t[n]);return s}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,n,r,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ta(e))return e;var d=qs(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ii(e,a)}else{var f=po(e),p=f==b||f==S;if(Qs(e))return Si(e,u);if(f==L||f==g||p&&!o){if(a=l||p?{}:go(e),!u)return l?function(e,t){return Oi(e,fo(e),t)}(e,function(e,t){return e&&Oi(t,Na(t),e)}(a,e)):function(e,t){return Oi(e,co(e),t)}(e,rr(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case D:return Ci(e);case y:case v:return new i(+e);case k:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case j:case R:case P:case W:case F:case x:case B:case $:return _i(e,n);case C:return new i;case _:case O:return new i(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new i;case T:return r=e,Wn?Le(Wn.call(r)):{}}}(e,f,u)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(r){a.add(ar(r,t,n,r,e,s))})):ra(e)&&e.forEach((function(r,i){a.set(i,ar(r,t,n,i,e,s))}));var m=d?i:(c?l?no:to:l?Na:ka)(e);return wt(m||e,(function(r,i){m&&(r=e[i=r]),er(a,i,ar(r,t,n,i,e,s))})),a}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Le(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ie(o);return Mo((function(){e.apply(i,n)}),t)}function cr(e,t,n,r){var i=-1,o=_t,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=At(t,zt(n))),r?(o=Lt,s=!1):t.length>=200&&(o=qt,s=!1,t=new Gn(t));e:for(;++i<a;){var c=e[i],d=null==n?c:n(c);if(c=r||0!==c?c:0,s&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else o(t,d,r)||u.push(c)}return u}xn.templateSettings={escape:Q,evaluate:K,interpolate:J,variable:"",imports:{_:xn}},xn.prototype=$n.prototype,xn.prototype.constructor=xn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,zn.prototype=Bn($n.prototype),zn.prototype.constructor=zn,Hn.prototype.clear=function(){this.__data__=On?On(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(On){var n=t[e];return n===s?i:n}return Ne.call(t,e)?t[e]:i},Hn.prototype.has=function(e){var t=this.__data__;return On?t[e]!==i:Ne.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=On&&t===i?s:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},qn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},qn.prototype.has=function(e){return tr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Ln||qn),string:new Hn}},Vn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ao(this,e).get(e)},Vn.prototype.has=function(e){return ao(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new qn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Ln||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(e,t),this.size=n.size,this};var dr=Di(wr),fr=Di(br,!0);function pr(e,t){var n=!0;return dr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function hr(e,t,n){for(var r=-1,o=e.length;++r<o;){var s=e[r],a=t(s);if(null!=a&&(u===i?a==a&&!la(a):n(a,u)))var u=a,l=s}return l}function gr(e,t){var n=[];return dr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function mr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=mo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?mr(a,t-1,n,r,i):Et(i,a):r||(i[i.length]=a)}return i}var yr=ki(),vr=ki(!0);function wr(e,t){return e&&yr(e,t,ka)}function br(e,t){return e&&vr(e,t,ka)}function Sr(e,t){return Ct(t,(function(t){return Zs(e[t])}))}function Cr(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function _r(e,t,n){var r=t(e);return qs(e)?r:Et(r,n(e))}function Lr(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Le(e)?function(e){var t=Ne.call(e,at),n=e[at];try{e[at]=i;var r=!0}catch(e){}var o=Pe.call(e);return r&&(t?e[at]=n:delete e[at]),o}(e):function(e){return Pe.call(e)}(e)}function Ar(e,t){return e>t}function Er(e,t){return null!=e&&Ne.call(e,t)}function Ir(e,t){return null!=e&&t in Le(e)}function Or(e,t,n){for(var o=n?Lt:_t,s=e[0].length,a=e.length,u=a,l=r(a),c=1/0,d=[];u--;){var f=e[u];u&&t&&(f=At(f,zt(t))),c=vn(f.length,c),l[u]=!n&&(t||s>=120&&f.length>=120)?new Gn(u&&f):i}f=e[0];var p=-1,h=l[0];e:for(;++p<s&&d.length<c;){var g=f[p],m=t?t(g):g;if(g=n||0!==g?g:0,!(h?qt(h,m):o(d,m,n))){for(u=a;--u;){var y=l[u];if(!(y?qt(y,m):o(e[u],m,n)))continue e}h&&h.push(m),d.push(g)}}return d}function Tr(e,t,n){var r=null==(e=Eo(e,t=yi(t,e)))?e:e[Fo(Jo(t))];return null==r?i:yt(r,e,n)}function Mr(e){return na(e)&&Lr(e)==g}function Dr(e,t,n,r,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var a=qs(e),u=qs(t),l=a?m:po(e),c=u?m:po(t),d=(l=l==g?L:l)==L,f=(c=c==g?L:c)==L,p=l==c;if(p&&Qs(e)){if(!Qs(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Yn),a||ca(e)?Xi(e,t,n,r,o,s):function(e,t,n,r,i,o,s){switch(n){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case y:case v:case _:return $s(+e,+t);case w:return e.name==t.name&&e.message==t.message;case E:case O:return e==t+"";case C:var a=Xt;case I:var u=1&r;if(a||(a=nn),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;r|=2,s.set(e,t);var c=Xi(a(e),a(t),r,i,o,s);return s.delete(e),c;case T:if(Wn)return Wn.call(e)==Wn.call(t)}return!1}(e,t,l,n,r,o,s);if(!(1&n)){var h=d&&Ne.call(e,"__wrapped__"),b=f&&Ne.call(t,"__wrapped__");if(h||b){var S=h?e.value():e,A=b?t.value():t;return s||(s=new Yn),o(S,A,n,r,s)}}return!!p&&(s||(s=new Yn),function(e,t,n,r,o,s){var a=1&n,u=to(e),l=u.length;if(l!=to(t).length&&!a)return!1;for(var c=l;c--;){var d=u[c];if(!(a?d in t:Ne.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var g=a;++c<l;){var m=e[d=u[c]],y=t[d];if(r)var v=a?r(y,m,d,t,e,s):r(m,y,d,e,t,s);if(!(v===i?m===y||o(m,y,n,r,s):v)){h=!1;break}g||(g="constructor"==d)}if(h&&!g){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,r,o,s))}(e,t,n,r,Dr,o))}function kr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Le(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var l=(u=n[o])[0],c=e[l],d=u[1];if(a&&u[2]){if(c===i&&!(l in e))return!1}else{var f=new Yn;if(r)var p=r(c,d,l,e,t,f);if(!(p===i?Dr(d,c,3,r,f):p))return!1}}return!0}function Nr(e){return!(!ta(e)||(t=e,Re&&Re in t))&&(Zs(e)?xe:ge).test(xo(e));var t}function jr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?qs(e)?xr(e[0],e[1]):Fr(e):pu(e)}function Rr(e){if(!Co(e))return mn(e);var t=[];for(var n in Le(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Pr(e,t){return e<t}function Wr(e,t){var n=-1,i=Gs(e)?r(e.length):[];return dr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Fr(e){var t=uo(e);return 1==t.length&&t[0][2]?Lo(t[0][0],t[0][1]):function(n){return n===e||kr(n,e,t)}}function xr(e,t){return wo(e)&&_o(t)?Lo(Fo(e),t):function(n){var r=Ia(n,e);return r===i&&r===t?Oa(n,e):Dr(t,r,3)}}function Br(e,t,n,r,o){e!==t&&yr(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,r,o,s,a){var u=Oo(e,n),l=Oo(t,n),c=a.get(l);if(c)Xn(e,n,c);else{var d=s?s(u,l,n+"",e,t,a):i,f=d===i;if(f){var p=qs(l),h=!p&&Qs(l),g=!p&&!h&&ca(l);d=l,p||h||g?qs(u)?d=u:Ys(u)?d=Ii(u):h?(f=!1,d=Si(l,!0)):g?(f=!1,d=_i(l,!0)):d=[]:oa(l)||Hs(l)?(d=u,Hs(u)?d=va(u):ta(u)&&!Zs(u)||(d=go(l))):f=!1}f&&(a.set(l,d),o(d,l,r,s,a),a.delete(l)),Xn(e,n,d)}}(e,t,a,n,Br,r,o);else{var u=r?r(Oo(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Xn(e,a,u)}}),Na)}function $r(e,t){var n=e.length;if(n)return yo(t+=t<0?n:0,n)?e[t]:i}function Ur(e,t,n){t=t.length?At(t,(function(e){return qs(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;return t=At(t,zt(so())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=Li(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(Wr(e,(function(e,n,i){return{criteria:At(t,(function(t){return t(e)})),index:++r,value:e}})))}function zr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Cr(e,s);n(a,s)&&Jr(o,yi(s,e),a)}return o}function Hr(e,t,n,r){var i=r?jt:Nt,o=-1,s=t.length,a=e;for(e===t&&(t=Ii(t)),n&&(a=At(e,zt(n)));++o<s;)for(var u=0,l=t[o],c=n?n(l):l;(u=i(a,c,u,r))>-1;)a!==e&&rt.call(a,u,1),rt.call(e,u,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;yo(i)?rt.call(e,i,1):li(e,i)}}return e}function Vr(e,t){return e+dn(Sn()*(t-e+1))}function Gr(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=dn(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Do(Ao(e,t,iu),e+"")}function Qr(e){return Kn($a(e))}function Kr(e,t){var n=$a(e);return jo(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!ta(e))return e;for(var o=-1,s=(t=yi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var l=Fo(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var d=u[l];(c=r?r(d,l,u):i)===i&&(c=ta(d)?d:yo(t[o+1])?[]:{})}er(u,l,c),u=u[l]}return e}var Zr=Tn?function(e,t){return Tn.set(e,t),e}:iu,Xr=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return jo($a(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i<o;)s[i]=e[i+t];return s}function ni(e,t){var n;return dr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!la(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ii(e,t,iu,n)}function ii(e,t,n,r){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,u=null===t,l=la(t),c=t===i;o<s;){var d=dn((o+s)/2),f=n(e[d]),p=f!==i,h=null===f,g=f==f,m=la(f);if(a)var y=r||g;else y=c?g&&(r||p):u?g&&p&&(r||!h):l?g&&p&&!h&&(r||!m):!h&&!m&&(r?f<=t:f<t);y?o=d+1:s=d}return vn(s,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!$s(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:la(e)?f:+e}function ai(e){if("string"==typeof e)return e;if(qs(e))return At(e,ai)+"";if(la(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=_t,o=e.length,s=!0,a=[],u=a;if(n)s=!1,i=Lt;else if(o>=200){var l=t?null:Gi(e);if(l)return nn(l);s=!1,i=qt,u=new Gn}else u=t?[]:a;e:for(;++r<o;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,s&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(c)}else i(u,d,n)||(u!==a&&u.push(d),a.push(c))}return a}function li(e,t){return null==(e=Eo(e,t=yi(t,e)))||delete e[Fo(Jo(t))]}function ci(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof zn&&(n=n.value()),It(t,(function(e,t){return t.func.apply(t.thisArg,Et([e],t.args))}),n)}function pi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cr(s[o]||a,e[u],t,n));return ui(mr(s,1),t,n)}function hi(e,t,n){for(var r=-1,o=e.length,s=t.length,a={};++r<o;){var u=r<s?t[r]:i;n(a,e[r],u)}return a}function gi(e){return Ys(e)?e:[]}function mi(e){return"function"==typeof e?e:iu}function yi(e,t){return qs(e)?e:wo(e,t)?[e]:Wo(wa(e))}var vi=Yr;function wi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var bi=ct||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function _i(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=la(e),a=t!==i,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!s&&!c&&e<t||c&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!l)return-1}return 0}function Ai(e,t,n,i){for(var o=-1,s=e.length,a=n.length,u=-1,l=t.length,c=yn(s-a,0),d=r(l+c),f=!i;++u<l;)d[u]=t[u];for(;++o<a;)(f||o<s)&&(d[n[o]]=e[o]);for(;c--;)d[u++]=e[o++];return d}function Ei(e,t,n,i){for(var o=-1,s=e.length,a=-1,u=n.length,l=-1,c=t.length,d=yn(s-u,0),f=r(d+c),p=!i;++o<d;)f[o]=e[o];for(var h=o;++l<c;)f[h+l]=t[l];for(;++a<u;)(p||o<s)&&(f[h+n[a]]=e[o++]);return f}function Ii(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Oi(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=r?r(n[u],e[u],u,n,e):i;l===i&&(l=e[u]),o?ir(n,u,l):er(n,u,l)}return n}function Ti(e,t){return function(n,r){var i=qs(n)?vt:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Mi(e){return Yr((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&vo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Le(t);++r<o;){var u=n[r];u&&e(t,u,r,s)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!Gs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Le(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function ki(e){return function(t,n,r){for(var i=-1,o=Le(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function Ni(e){return function(t){var n=Zt(t=wa(t))?sn(t):i,r=n?n[0]:t.charAt(0),o=n?wi(n,1).join(""):t.slice(1);return r[e]()+o}}function ji(e){return function(t){return It(Za(Ha(t).replace(He,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function Pi(e){return function(t,n,r){var o=Le(t);if(!Gs(t)){var s=so(n,3);t=ka(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[s?t[a]:a]:i}}function Wi(e){return eo((function(t){var n=t.length,r=n,s=Un.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ie(o);if(s&&!u&&"wrapper"==io(a))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var l=io(a=t[r]),c="wrapper"==l?ro(a):i;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[io(c[0])].apply(u,c[3]):1==a.length&&bo(a)?u[l]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&qs(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Fi(e,t,n,o,s,a,u,c,d,f){var p=t&l,h=1&t,g=2&t,m=24&t,y=512&t,v=g?i:Ri(e);return function i(){for(var l=arguments.length,w=r(l),b=l;b--;)w[b]=arguments[b];if(m)var S=oo(i),C=Yt(w,S);if(o&&(w=Ai(w,o,s,m)),a&&(w=Ei(w,a,u,m)),l-=C,m&&l<f){var _=tn(w,S);return qi(e,t,Fi,i.placeholder,n,w,_,c,d,f-l)}var L=h?n:this,A=g?L[e]:e;return l=w.length,c?w=Io(w,c):y&&l>1&&w.reverse(),p&&d<l&&(w.length=d),this&&this!==ot&&this instanceof i&&(A=v||Ri(A)),A.apply(L,w)}}function xi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Bi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=si(n),r=si(r)),o=e(n,r)}return o}}function $i(e){return eo((function(t){return t=At(t,zt(so())),Yr((function(n){var r=this;return e(t,(function(e){return yt(e,r,n)}))}))}))}function Ui(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?Gr(t,e):t;var r=Gr(t,cn(e/on(t)));return Zt(t)?wi(sn(r),0,e).join(""):r.slice(0,e)}function zi(e){return function(t,n,o){return o&&"number"!=typeof o&&vo(t,n,o)&&(n=o=i),t=ha(t),n===i?(n=t,t=0):n=ha(n),function(e,t,n,i){for(var o=-1,s=yn(cn((t-e)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=e,e+=n;return a}(t,n,o=o===i?t<n?1:-1:ha(o),e)}}function Hi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ya(t),n=ya(n)),e(t,n)}}function qi(e,t,n,r,o,s,a,l,c,d){var f=8&t;t|=f?u:64,4&(t&=~(f?64:u))||(t&=-4);var p=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,l,c,d],h=n.apply(i,p);return bo(e)&&To(h,p),h.placeholder=r,ko(h,e,t)}function Vi(e){var t=_e[e];return function(e,n){if(e=ya(e),(n=null==n?0:vn(ga(n),292))&&hn(e)){var r=(wa(e)+"e").split("e");return+((r=(wa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Gi=En&&1/nn(new En([,-0]))[1]==c?function(e){return new En(e)}:lu;function Yi(e){return function(t){var n=po(t);return n==C?Xt(t):n==I?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qi(e,t,n,s,c,d,f,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Ie(o);var g=s?s.length:0;if(g||(t&=-97,s=c=i),f=f===i?f:yn(ga(f),0),p=p===i?p:ga(p),g-=c?c.length:0,64&t){var m=s,y=c;s=c=i}var v=h?i:ro(e),w=[e,t,n,s,c,m,y,d,f,p];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ai(c,u,t[4]):u,e[4]=c?tn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Ei(c,u,t[6]):u,e[6]=c?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&l&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,v),e=w[0],t=w[1],n=w[2],s=w[3],c=w[4],!(p=w[9]=w[9]===i?h?0:e.length:yn(w[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Ri(e);return function s(){for(var a=arguments.length,u=r(a),l=a,c=oo(s);l--;)u[l]=arguments[l];var d=a<3&&u[0]!==c&&u[a-1]!==c?[]:tn(u,c);return(a-=d.length)<n?qi(e,t,Fi,s.placeholder,i,u,d,i,i,n-a):yt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,p):t!=u&&33!=t||c.length?Fi.apply(i,w):function(e,t,n,i){var o=1&t,s=Ri(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=i.length,d=r(c+u),f=this&&this!==ot&&this instanceof t?s:e;++l<c;)d[l]=i[l];for(;u--;)d[l++]=arguments[++a];return yt(f,o?n:this,d)}}(e,t,n,s);else var b=function(e,t,n){var r=1&t,i=Ri(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return ko((v?Zr:To)(b,w),e,t)}function Ki(e,t,n,r){return e===i||$s(e,Me[n])&&!Ne.call(r,n)?t:e}function Ji(e,t,n,r,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Br(e,t,i,Ji,s),s.delete(t)),e}function Zi(e){return oa(e)?i:e}function Xi(e,t,n,r,o,s){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,h=2&n?new Gn:i;for(s.set(e,t),s.set(t,e);++f<u;){var g=e[f],m=t[f];if(r)var y=a?r(m,g,f,t,e,s):r(g,m,f,e,t,s);if(y!==i){if(y)continue;p=!1;break}if(h){if(!Tt(t,(function(e,t){if(!qt(h,t)&&(g===e||o(g,e,n,r,s)))return h.push(t)}))){p=!1;break}}else if(g!==m&&!o(g,m,n,r,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return Do(Ao(e,i,Vo),e+"")}function to(e){return _r(e,ka,co)}function no(e){return _r(e,Na,fo)}var ro=Tn?function(e){return Tn.get(e)}:lu;function io(e){for(var t=e.name+"",n=Mn[t],r=Ne.call(Mn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Ne.call(xn,"placeholder")?xn:e).placeholder}function so(){var e=xn.iteratee||ou;return e=e===ou?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=ka(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,_o(i)]}return t}function lo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Nr(n)?n:i}var co=fn?function(e){return null==e?[]:(e=Le(e),Ct(fn(e),(function(t){return et.call(e,t)})))}:mu,fo=fn?function(e){for(var t=[];e;)Et(t,co(e)),e=Ve(e);return t}:mu,po=Lr;function ho(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var s=Fo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&yo(s,i)&&(qs(e)||Hs(e))}function go(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(Ve(e))}function mo(e){return qs(e)||Hs(e)||!!(it&&e&&e[it])}function yo(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?Gs(n)&&yo(t,n.length):"string"==r&&t in n)&&$s(n[t],e)}function wo(e,t){if(qs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||X.test(e)||!Z.test(e)||null!=t&&e in Le(t)}function bo(e){var t=io(e),n=xn[t];if("function"!=typeof n||!(t in zn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=k||Ln&&po(new Ln)!=C||An&&po(An.resolve())!=A||En&&po(new En)!=I||In&&po(new In)!=M)&&(po=function(e){var t=Lr(e),n=t==L?e.constructor:i,r=n?xo(n):"";if(r)switch(r){case Dn:return k;case kn:return C;case Nn:return A;case jn:return I;case Rn:return M}return t});var So=De?Zs:yu;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)}function _o(e){return e==e&&!ta(e)}function Lo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Le(n))}}function Ao(e,t,n){return t=yn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yn(i.length-t,0),a=r(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(a),yt(e,this,u)}}function Eo(e,t){return t.length<2?e:Cr(e,ti(t,0,-1))}function Io(e,t){for(var n=e.length,r=vn(t.length,n),o=Ii(e);r--;){var s=t[r];e[r]=yo(s,n)?o[s]:i}return e}function Oo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var To=No(Zr),Mo=Ft||function(e,t){return ot.setTimeout(e,t)},Do=No(Xr);function ko(e,t,n){var r=t+"";return Do(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return wt(h,(function(n){var r="_."+n[0];t&n[1]&&!_t(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function No(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function jo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var s=Vr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Ro,Po,Wo=(Ro=Rs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Po.size&&Po.clear(),e})),Po=Ro.cache,Ro);function Fo(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xo(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof zn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Yr((function(e,t){return Ys(e)?cr(e,mr(t,1,Ys,!0)):[]})),Uo=Yr((function(e,t){var n=Jo(t);return Ys(n)&&(n=i),Ys(e)?cr(e,mr(t,1,Ys,!0),so(n,2)):[]})),zo=Yr((function(e,t){var n=Jo(t);return Ys(n)&&(n=i),Ys(e)?cr(e,mr(t,1,Ys,!0),i,n):[]}));function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ga(n);return i<0&&(i=yn(r+i,0)),kt(e,so(t,3),i)}function qo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ga(n),o=n<0?yn(r+o,0):vn(o,r-1)),kt(e,so(t,3),o,!0)}function Vo(e){return null!=e&&e.length?mr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var Yo=Yr((function(e){var t=At(e,gi);return t.length&&t[0]===e[0]?Or(t):[]})),Qo=Yr((function(e){var t=Jo(e),n=At(e,gi);return t===Jo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Or(n,so(t,2)):[]})),Ko=Yr((function(e){var t=Jo(e),n=At(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Or(n,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Yr(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return qr(e,At(t,(function(e){return yo(e,n)?+e:e})).sort(Li)),r}));function ts(e){return null==e?e:Cn.call(e)}var ns=Yr((function(e){return ui(mr(e,1,Ys,!0))})),rs=Yr((function(e){var t=Jo(e);return Ys(t)&&(t=i),ui(mr(e,1,Ys,!0),so(t,2))})),is=Yr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ui(mr(e,1,Ys,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Ys(e))return t=yn(e.length,t),!0})),$t(t,(function(t){return At(e,Wt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:At(n,(function(e){return yt(t,i,e)}))}var as=Yr((function(e,t){return Ys(e)?cr(e,t):[]})),us=Yr((function(e){return pi(Ct(e,Ys))})),ls=Yr((function(e){var t=Jo(e);return Ys(t)&&(t=i),pi(Ct(e,Ys),so(t,2))})),cs=Yr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,pi(Ct(e,Ys),i,t)})),ds=Yr(os),fs=Yr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ss(e,n)}));function ps(e){var t=xn(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var gs=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof zn&&yo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ms=Ti((function(e,t,n){Ne.call(e,n)?++e[n]:ir(e,n,1)})),ys=Pi(Ho),vs=Pi(qo);function ws(e,t){return(qs(e)?wt:dr)(e,so(t,3))}function bs(e,t){return(qs(e)?bt:fr)(e,so(t,3))}var Ss=Ti((function(e,t,n){Ne.call(e,n)?e[n].push(t):ir(e,n,[t])})),Cs=Yr((function(e,t,n){var i=-1,o="function"==typeof t,s=Gs(e)?r(e.length):[];return dr(e,(function(e){s[++i]=o?yt(t,e,n):Tr(e,t,n)})),s})),_s=Ti((function(e,t,n){ir(e,n,t)}));function Ls(e,t){return(qs(e)?At:Wr)(e,so(t,3))}var As=Ti((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Es=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vo(e,t[0],t[1])?t=[]:n>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,mr(t,1),[])})),Is=Mt||function(){return ot.Date.now()};function Os(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Qi(e,l,i,i,i,i,t)}function Ts(e,t){var n;if("function"!=typeof t)throw new Ie(o);return e=ga(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ms=Yr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Ms));r|=u}return Qi(e,r,t,n,i)})),Ds=Yr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(Ds));r|=u}return Qi(t,r,e,n,i)}));function ks(e,t,n){var r,s,a,u,l,c,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Ie(o);function g(t){var n=r,o=s;return r=s=i,d=t,u=e.apply(o,n)}function m(e){return d=e,l=Mo(v,t),f?g(e):u}function y(e){var n=e-c;return c===i||n>=t||n<0||p&&e-d>=a}function v(){var e=Is();if(y(e))return w(e);l=Mo(v,function(e){var n=t-(e-c);return p?vn(n,a-(e-d)):n}(e))}function w(e){return l=i,h&&r?g(e):(r=s=i,u)}function b(){var e=Is(),n=y(e);if(r=arguments,s=this,c=e,n){if(l===i)return m(c);if(p)return bi(l),l=Mo(v,t),g(c)}return l===i&&(l=Mo(v,t)),u}return t=ya(t)||0,ta(n)&&(f=!!n.leading,a=(p="maxWait"in n)?yn(ya(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){l!==i&&bi(l),d=0,r=c=s=l=i},b.flush=function(){return l===i?u:w(Is())},b}var Ns=Yr((function(e,t){return lr(e,1,t)})),js=Yr((function(e,t,n){return lr(e,ya(t)||0,n)}));function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||Vn),n}function Ps(e){if("function"!=typeof e)throw new Ie(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Vn;var Ws=vi((function(e,t){var n=(t=1==t.length&&qs(t[0])?At(t[0],zt(so())):At(mr(t,1),zt(so()))).length;return Yr((function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return yt(e,this,r)}))})),Fs=Yr((function(e,t){var n=tn(t,oo(Fs));return Qi(e,u,i,t,n)})),xs=Yr((function(e,t){var n=tn(t,oo(xs));return Qi(e,64,i,t,n)})),Bs=eo((function(e,t){return Qi(e,256,i,i,i,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Us=Hi(Ar),zs=Hi((function(e,t){return e>=t})),Hs=Mr(function(){return arguments}())?Mr:function(e){return na(e)&&Ne.call(e,"callee")&&!et.call(e,"callee")},qs=r.isArray,Vs=dt?zt(dt):function(e){return na(e)&&Lr(e)==D};function Gs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return na(e)&&Gs(e)}var Qs=pn||yu,Ks=ft?zt(ft):function(e){return na(e)&&Lr(e)==v};function Js(e){if(!na(e))return!1;var t=Lr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Lr(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ga(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=pt?zt(pt):function(e){return na(e)&&po(e)==C};function ia(e){return"number"==typeof e||na(e)&&Lr(e)==_}function oa(e){if(!na(e)||Lr(e)!=L)return!1;var t=Ve(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ke.call(n)==We}var sa=ht?zt(ht):function(e){return na(e)&&Lr(e)==E},aa=gt?zt(gt):function(e){return na(e)&&po(e)==I};function ua(e){return"string"==typeof e||!qs(e)&&na(e)&&Lr(e)==O}function la(e){return"symbol"==typeof e||na(e)&&Lr(e)==T}var ca=mt?zt(mt):function(e){return na(e)&&ea(e.length)&&!!Ze[Lr(e)]},da=Hi(Pr),fa=Hi((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Gs(e))return ua(e)?sn(e):Ii(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=po(e);return(t==C?Xt:t==I?nn:$a)(e)}function ha(e){return e?(e=ya(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=ha(e),n=t%1;return t==t?n?t-n:t:0}function ma(e){return e?sr(ga(e),0,p):0}function ya(e){if("number"==typeof e)return e;if(la(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var n=he.test(e);return n||me.test(e)?nt(e.slice(2),n?2:8):pe.test(e)?f:+e}function va(e){return Oi(e,Na(e))}function wa(e){return null==e?"":ai(e)}var ba=Mi((function(e,t){if(Co(t)||Gs(t))Oi(t,ka(t),e);else for(var n in t)Ne.call(t,n)&&er(e,n,t[n])})),Sa=Mi((function(e,t){Oi(t,Na(t),e)})),Ca=Mi((function(e,t,n,r){Oi(t,Na(t),e,r)})),_a=Mi((function(e,t,n,r){Oi(t,ka(t),e,r)})),La=eo(or),Aa=Yr((function(e,t){e=Le(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&vo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Na(s),u=-1,l=a.length;++u<l;){var c=a[u],d=e[c];(d===i||$s(d,Me[c])&&!Ne.call(e,c))&&(e[c]=s[c])}return e})),Ea=Yr((function(e){return e.push(i,Ji),yt(Ra,i,e)}));function Ia(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function Oa(e,t){return null!=e&&ho(e,t,Ir)}var Ta=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),e[t]=n}),tu(iu)),Ma=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),so),Da=Yr(Tr);function ka(e){return Gs(e)?Qn(e):Rr(e)}function Na(e){return Gs(e)?Qn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Le(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}(e)}var ja=Mi((function(e,t,n){Br(e,t,n)})),Ra=Mi((function(e,t,n,r){Br(e,t,n,r)})),Pa=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=At(t,(function(t){return t=yi(t,e),r||(r=t.length>1),t})),Oi(e,no(e),n),r&&(n=ar(n,7,Zi));for(var i=t.length;i--;)li(n,t[i]);return n})),Wa=eo((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,n){return Oa(e,n)}))}(e,t)}));function Fa(e,t){if(null==e)return{};var n=At(no(e),(function(e){return[e]}));return t=so(t),zr(e,n,(function(e,n){return t(e,n[0])}))}var xa=Yi(ka),Ba=Yi(Na);function $a(e){return null==e?[]:Ht(e,ka(e))}var Ua=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?za(t):t)}));function za(e){return Ja(wa(e).toLowerCase())}function Ha(e){return(e=wa(e))&&e.replace(ve,Qt).replace(qe,"")}var qa=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Ni("toLowerCase"),Ya=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Qa=ji((function(e,t,n){return e+(n?" ":"")+Ja(t)})),Ka=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Ni("toUpperCase");function Za(e,t,n){return e=wa(e),(t=n?i:t)===i?function(e){return Qe.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Yr((function(e,t){try{return yt(e,i,t)}catch(e){return Js(e)?e:new Se(e)}})),eu=eo((function(e,t){return wt(t,(function(t){t=Fo(t),ir(e,t,Ms(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Wi(),ru=Wi(!0);function iu(e){return e}function ou(e){return jr("function"==typeof e?e:ar(e,1))}var su=Yr((function(e,t){return function(n){return Tr(n,e,t)}})),au=Yr((function(e,t){return function(n){return Tr(e,n,t)}}));function uu(e,t,n){var r=ka(t),i=Sr(t,r);null!=n||ta(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Sr(t,ka(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Zs(e);return wt(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Et([this.value()],arguments))})})),e}function lu(){}var cu=$i(At),du=$i(St),fu=$i(Tt);function pu(e){return wo(e)?Wt(Fo(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hu=zi(),gu=zi(!0);function mu(){return[]}function yu(){return!1}var vu,wu=Bi((function(e,t){return e+t}),0),bu=Vi("ceil"),Su=Bi((function(e,t){return e/t}),1),Cu=Vi("floor"),_u=Bi((function(e,t){return e*t}),1),Lu=Vi("round"),Au=Bi((function(e,t){return e-t}),0);return xn.after=function(e,t){if("function"!=typeof t)throw new Ie(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},xn.ary=Os,xn.assign=ba,xn.assignIn=Sa,xn.assignInWith=Ca,xn.assignWith=_a,xn.at=La,xn.before=Ts,xn.bind=Ms,xn.bindAll=eu,xn.bindKey=Ds,xn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qs(e)?e:[e]},xn.chain=ps,xn.chunk=function(e,t,n){t=(n?vo(e,t,n):t===i)?1:yn(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(cn(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},xn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},xn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Et(qs(n)?Ii(n):[n],mr(t,1))},xn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?At(e,(function(e){if("function"!=typeof e[1])throw new Ie(o);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var i=e[r];if(yt(i[0],this,n))return yt(i[1],this,n)}}))},xn.conforms=function(e){return function(e){var t=ka(e);return function(n){return ur(n,e,t)}}(ar(e,1))},xn.constant=tu,xn.countBy=ms,xn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},xn.curry=function e(t,n,r){var o=Qi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},xn.curryRight=function e(t,n,r){var o=Qi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},xn.debounce=ks,xn.defaults=Aa,xn.defaultsDeep=Ea,xn.defer=Ns,xn.delay=js,xn.difference=$o,xn.differenceBy=Uo,xn.differenceWith=zo,xn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:ga(t))<0?0:t,r):[]},xn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:ga(t)))<0?0:t):[]},xn.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},xn.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},xn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&vo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ga(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ga(r))<0&&(r+=o),r=n>r?0:ma(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},xn.filter=function(e,t){return(qs(e)?Ct:gr)(e,so(t,3))},xn.flatMap=function(e,t){return mr(Ls(e,t),1)},xn.flatMapDeep=function(e,t){return mr(Ls(e,t),c)},xn.flatMapDepth=function(e,t,n){return n=n===i?1:ga(n),mr(Ls(e,t),n)},xn.flatten=Vo,xn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},xn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===i?1:ga(t)):[]},xn.flip=function(e){return Qi(e,512)},xn.flow=nu,xn.flowRight=ru,xn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},xn.functions=function(e){return null==e?[]:Sr(e,ka(e))},xn.functionsIn=function(e){return null==e?[]:Sr(e,Na(e))},xn.groupBy=Ss,xn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},xn.intersection=Yo,xn.intersectionBy=Qo,xn.intersectionWith=Ko,xn.invert=Ta,xn.invertBy=Ma,xn.invokeMap=Cs,xn.iteratee=ou,xn.keyBy=_s,xn.keys=ka,xn.keysIn=Na,xn.map=Ls,xn.mapKeys=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},xn.mapValues=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},xn.matches=function(e){return Fr(ar(e,1))},xn.matchesProperty=function(e,t){return xr(e,ar(t,1))},xn.memoize=Rs,xn.merge=ja,xn.mergeWith=Ra,xn.method=su,xn.methodOf=au,xn.mixin=uu,xn.negate=Ps,xn.nthArg=function(e){return e=ga(e),Yr((function(t){return $r(t,e)}))},xn.omit=Pa,xn.omitBy=function(e,t){return Fa(e,Ps(so(t)))},xn.once=function(e){return Ts(2,e)},xn.orderBy=function(e,t,n,r){return null==e?[]:(qs(t)||(t=null==t?[]:[t]),qs(n=r?i:n)||(n=null==n?[]:[n]),Ur(e,t,n))},xn.over=cu,xn.overArgs=Ws,xn.overEvery=du,xn.overSome=fu,xn.partial=Fs,xn.partialRight=xs,xn.partition=As,xn.pick=Wa,xn.pickBy=Fa,xn.property=pu,xn.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},xn.pull=Zo,xn.pullAll=Xo,xn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,so(n,2)):e},xn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,i,n):e},xn.pullAt=es,xn.range=hu,xn.rangeRight=gu,xn.rearg=Bs,xn.reject=function(e,t){return(qs(e)?Ct:gr)(e,Ps(so(t,3)))},xn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return qr(e,i),n},xn.rest=function(e,t){if("function"!=typeof e)throw new Ie(o);return Yr(e,t=t===i?t:ga(t))},xn.reverse=ts,xn.sampleSize=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ga(t),(qs(e)?Jn:Kr)(e,t)},xn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},xn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},xn.shuffle=function(e){return(qs(e)?Zn:ei)(e)},xn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&vo(e,t,n)?(t=0,n=r):(t=null==t?0:ga(t),n=n===i?r:ga(n)),ti(e,t,n)):[]},xn.sortBy=Es,xn.sortedUniq=function(e){return e&&e.length?oi(e):[]},xn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},xn.split=function(e,t,n){return n&&"number"!=typeof n&&vo(e,t,n)&&(t=n=i),(n=n===i?p:n>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?wi(sn(e),0,n):e.split(t,n):[]},xn.spread=function(e,t){if("function"!=typeof e)throw new Ie(o);return t=null==t?0:yn(ga(t),0),Yr((function(n){var r=n[t],i=wi(n,0,t);return r&&Et(i,r),yt(e,this,i)}))},xn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},xn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ga(t))<0?0:t):[]},xn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:ga(t)))<0?0:t,r):[]},xn.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},xn.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},xn.tap=function(e,t){return t(e),e},xn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ie(o);return ta(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ks(e,t,{leading:r,maxWait:t,trailing:i})},xn.thru=hs,xn.toArray=pa,xn.toPairs=xa,xn.toPairsIn=Ba,xn.toPath=function(e){return qs(e)?At(e,Fo):la(e)?[e]:Ii(Wo(wa(e)))},xn.toPlainObject=va,xn.transform=function(e,t,n){var r=qs(e),i=r||Qs(e)||ca(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Zs(o)?Bn(Ve(e)):{}}return(i?wt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},xn.unary=function(e){return Os(e,1)},xn.union=ns,xn.unionBy=rs,xn.unionWith=is,xn.uniq=function(e){return e&&e.length?ui(e):[]},xn.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},xn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},xn.unset=function(e,t){return null==e||li(e,t)},xn.unzip=os,xn.unzipWith=ss,xn.update=function(e,t,n){return null==e?e:ci(e,t,mi(n))},xn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ci(e,t,mi(n),r)},xn.values=$a,xn.valuesIn=function(e){return null==e?[]:Ht(e,Na(e))},xn.without=as,xn.words=Za,xn.wrap=function(e,t){return Fs(mi(t),e)},xn.xor=us,xn.xorBy=ls,xn.xorWith=cs,xn.zip=ds,xn.zipObject=function(e,t){return hi(e||[],t||[],er)},xn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jr)},xn.zipWith=fs,xn.entries=xa,xn.entriesIn=Ba,xn.extend=Sa,xn.extendWith=Ca,uu(xn,xn),xn.add=wu,xn.attempt=Xa,xn.camelCase=Ua,xn.capitalize=za,xn.ceil=bu,xn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ya(n))==n?n:0),t!==i&&(t=(t=ya(t))==t?t:0),sr(ya(e),t,n)},xn.clone=function(e){return ar(e,4)},xn.cloneDeep=function(e){return ar(e,5)},xn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},xn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},xn.conformsTo=function(e,t){return null==t||ur(e,t,ka(t))},xn.deburr=Ha,xn.defaultTo=function(e,t){return null==e||e!=e?t:e},xn.divide=Su,xn.endsWith=function(e,t,n){e=wa(e),t=ai(t);var r=e.length,o=n=n===i?r:sr(ga(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},xn.eq=$s,xn.escape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(V,Kt):e},xn.escapeRegExp=function(e){return(e=wa(e))&&ne.test(e)?e.replace(te,"\\$&"):e},xn.every=function(e,t,n){var r=qs(e)?St:pr;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},xn.find=ys,xn.findIndex=Ho,xn.findKey=function(e,t){return Dt(e,so(t,3),wr)},xn.findLast=vs,xn.findLastIndex=qo,xn.findLastKey=function(e,t){return Dt(e,so(t,3),br)},xn.floor=Cu,xn.forEach=ws,xn.forEachRight=bs,xn.forIn=function(e,t){return null==e?e:yr(e,so(t,3),Na)},xn.forInRight=function(e,t){return null==e?e:vr(e,so(t,3),Na)},xn.forOwn=function(e,t){return e&&wr(e,so(t,3))},xn.forOwnRight=function(e,t){return e&&br(e,so(t,3))},xn.get=Ia,xn.gt=Us,xn.gte=zs,xn.has=function(e,t){return null!=e&&ho(e,t,Er)},xn.hasIn=Oa,xn.head=Go,xn.identity=iu,xn.includes=function(e,t,n,r){e=Gs(e)?e:$a(e),n=n&&!r?ga(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Nt(e,t,n)>-1},xn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ga(n);return i<0&&(i=yn(r+i,0)),Nt(e,t,i)},xn.inRange=function(e,t,n){return t=ha(t),n===i?(n=t,t=0):n=ha(n),function(e,t,n){return e>=vn(t,n)&&e<yn(t,n)}(e=ya(e),t,n)},xn.invoke=Da,xn.isArguments=Hs,xn.isArray=qs,xn.isArrayBuffer=Vs,xn.isArrayLike=Gs,xn.isArrayLikeObject=Ys,xn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Lr(e)==y},xn.isBuffer=Qs,xn.isDate=Ks,xn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},xn.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(qs(e)||"string"==typeof e||"function"==typeof e.splice||Qs(e)||ca(e)||Hs(e)))return!e.length;var t=po(e);if(t==C||t==I)return!e.size;if(Co(e))return!Rr(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},xn.isEqual=function(e,t){return Dr(e,t)},xn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Dr(e,t,i,n):!!r},xn.isError=Js,xn.isFinite=function(e){return"number"==typeof e&&hn(e)},xn.isFunction=Zs,xn.isInteger=Xs,xn.isLength=ea,xn.isMap=ra,xn.isMatch=function(e,t){return e===t||kr(e,t,uo(t))},xn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,kr(e,t,uo(t),n)},xn.isNaN=function(e){return ia(e)&&e!=+e},xn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(e)},xn.isNil=function(e){return null==e},xn.isNull=function(e){return null===e},xn.isNumber=ia,xn.isObject=ta,xn.isObjectLike=na,xn.isPlainObject=oa,xn.isRegExp=sa,xn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=d},xn.isSet=aa,xn.isString=ua,xn.isSymbol=la,xn.isTypedArray=ca,xn.isUndefined=function(e){return e===i},xn.isWeakMap=function(e){return na(e)&&po(e)==M},xn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Lr(e)},xn.join=function(e,t){return null==e?"":gn.call(e,t)},xn.kebabCase=qa,xn.last=Jo,xn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ga(n))<0?yn(r+o,0):vn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):kt(e,Rt,o,!0)},xn.lowerCase=Va,xn.lowerFirst=Ga,xn.lt=da,xn.lte=fa,xn.max=function(e){return e&&e.length?hr(e,iu,Ar):i},xn.maxBy=function(e,t){return e&&e.length?hr(e,so(t,2),Ar):i},xn.mean=function(e){return Pt(e,iu)},xn.meanBy=function(e,t){return Pt(e,so(t,2))},xn.min=function(e){return e&&e.length?hr(e,iu,Pr):i},xn.minBy=function(e,t){return e&&e.length?hr(e,so(t,2),Pr):i},xn.stubArray=mu,xn.stubFalse=yu,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=_u,xn.nth=function(e,t){return e&&e.length?$r(e,ga(t)):i},xn.noConflict=function(){return ot._===this&&(ot._=Fe),this},xn.noop=lu,xn.now=Is,xn.pad=function(e,t,n){e=wa(e);var r=(t=ga(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ui(dn(i),n)+e+Ui(cn(i),n)},xn.padEnd=function(e,t,n){e=wa(e);var r=(t=ga(t))?on(e):0;return t&&r<t?e+Ui(t-r,n):e},xn.padStart=function(e,t,n){e=wa(e);var r=(t=ga(t))?on(e):0;return t&&r<t?Ui(t-r,n)+e:e},xn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(wa(e).replace(re,""),t||0)},xn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ha(e),t===i?(t=e,e=0):t=ha(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Sn();return vn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Vr(e,t)},xn.reduce=function(e,t,n){var r=qs(e)?It:xt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},xn.reduceRight=function(e,t,n){var r=qs(e)?Ot:xt,i=arguments.length<3;return r(e,so(t,4),n,i,fr)},xn.repeat=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ga(t),Gr(wa(e),t)},xn.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},xn.result=function(e,t,n){var r=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++r<o;){var s=null==e?i:e[Fo(t[r])];s===i&&(r=o,s=n),e=Zs(s)?s.call(e):s}return e},xn.round=Lu,xn.runInContext=e,xn.sample=function(e){return(qs(e)?Kn:Qr)(e)},xn.size=function(e){if(null==e)return 0;if(Gs(e))return ua(e)?on(e):e.length;var t=po(e);return t==C||t==I?e.size:Rr(e).length},xn.snakeCase=Ya,xn.some=function(e,t,n){var r=qs(e)?Tt:ni;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},xn.sortedIndex=function(e,t){return ri(e,t)},xn.sortedIndexBy=function(e,t,n){return ii(e,t,so(n,2))},xn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&$s(e[r],t))return r}return-1},xn.sortedLastIndex=function(e,t){return ri(e,t,!0)},xn.sortedLastIndexBy=function(e,t,n){return ii(e,t,so(n,2),!0)},xn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if($s(e[n],t))return n}return-1},xn.startCase=Qa,xn.startsWith=function(e,t,n){return e=wa(e),n=null==n?0:sr(ga(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},xn.subtract=Au,xn.sum=function(e){return e&&e.length?Bt(e,iu):0},xn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},xn.template=function(e,t,n){var r=xn.templateSettings;n&&vo(e,t,n)&&(t=i),e=wa(e),t=Ca({},t,r,Ki);var o,s,a=Ca({},t.imports,r.imports,Ki),u=ka(a),l=Ht(a,u),c=0,d=t.interpolate||we,f="__p += '",p=Ae((t.escape||we).source+"|"+d.source+"|"+(d===J?de:we).source+"|"+(t.evaluate||we).source+"|$","g"),h="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(p,(function(t,n,r,i,a,u){return r||(r=i),f+=e.slice(c,u).replace(be,Jt),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var g=Ne.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(z,"$1").replace(H,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Xa((function(){return Ce(u,h+"return "+f).apply(i,l)}));if(m.source=f,Js(m))throw m;return m},xn.times=function(e,t){if((e=ga(e))<1||e>d)return[];var n=p,r=vn(e,p);t=so(t),e-=p;for(var i=$t(r,t);++n<e;)t(n);return i},xn.toFinite=ha,xn.toInteger=ga,xn.toLength=ma,xn.toLower=function(e){return wa(e).toLowerCase()},xn.toNumber=ya,xn.toSafeInteger=function(e){return e?sr(ga(e),-9007199254740991,d):0===e?e:0},xn.toString=wa,xn.toUpper=function(e){return wa(e).toUpperCase()},xn.trim=function(e,t,n){if((e=wa(e))&&(n||t===i))return Ut(e);if(!e||!(t=ai(t)))return e;var r=sn(e),o=sn(t);return wi(r,Vt(r,o),Gt(r,o)+1).join("")},xn.trimEnd=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.slice(0,an(e)+1);if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,0,Gt(r,sn(t))+1).join("")},xn.trimStart=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,Vt(r,sn(t))).join("")},xn.truncate=function(e,t){var n=30,r="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ga(t.length):n,r="omission"in t?ai(t.omission):r}var s=(e=wa(e)).length;if(Zt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var u=n-on(r);if(u<1)return r;var l=a?wi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+r;if(a&&(u+=l.length-u),sa(o)){if(e.slice(u).search(o)){var c,d=l;for(o.global||(o=Ae(o.source,wa(fe.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;l=l.slice(0,f===i?u:f)}}else if(e.indexOf(ai(o),u)!=u){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r},xn.unescape=function(e){return(e=wa(e))&&G.test(e)?e.replace(q,un):e},xn.uniqueId=function(e){var t=++je;return wa(e)+t},xn.upperCase=Ka,xn.upperFirst=Ja,xn.each=ws,xn.eachRight=bs,xn.first=Go,uu(xn,(vu={},wr(xn,(function(e,t){Ne.call(xn.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),xn.VERSION="4.17.21",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn})),wt(["drop","take"],(function(e,t){zn.prototype[e]=function(n){n=n===i?1:yn(ga(n),0);var r=this.__filtered__&&!t?new zn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,p),type:e+(r.__dir__<0?"Right":"")}),r},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),wt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}})),zn.prototype.compact=function(){return this.filter(iu)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new zn(this):this.map((function(n){return Tr(n,e,t)}))})),zn.prototype.reject=function(e){return this.filter(Ps(so(e)))},zn.prototype.slice=function(e,t){e=ga(e);var n=this;return n.__filtered__&&(e>0||t<0)?new zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ga(t))<0?n.dropRight(-t):n.take(t-e)),n)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(p)},wr(zn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=xn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(xn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof zn,l=a[0],c=u||qs(t),d=function(e){var t=o.apply(xn,Et([e],a));return r&&f?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=s&&!f,g=u&&!p;if(!s&&c){t=g?t:new zn(this);var m=e.apply(t,a);return m.__actions__.push({func:hs,args:[d],thisArg:i}),new Un(m,f)}return h&&g?e.apply(this,a):(m=this.thru(d),h?r?m.value()[0]:m.value():m)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(qs(i)?i:[],e)}return this[n]((function(n){return t.apply(qs(n)?n:[],e)}))}})),wr(zn.prototype,(function(e,t){var n=xn[t];if(n){var r=n.name+"";Ne.call(Mn,r)||(Mn[r]=[]),Mn[r].push({name:t,func:n})}})),Mn[Fi(i,2).name]=[{name:"wrapper",func:i}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vn(t,e+s);break;case"takeRight":e=yn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,d=c.length,f=0,p=vn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return fi(e,this.__actions__);var h=[];e:for(;u--&&f<p;){for(var g=-1,m=e[l+=t];++g<d;){var y=c[g],v=y.iteratee,w=y.type,b=v(m);if(2==w)m=b;else if(!b){if(1==w)continue e;break e}}h[f++]=m}return h},xn.prototype.at=gs,xn.prototype.chain=function(){return ps(this)},xn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===i&&(this.__values__=pa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},xn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var r=Bo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},xn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Un(t,this.__chain__)}return this.thru(ts)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,st&&(xn.prototype[st]=function(){return this}),xn}();ot._=ln,(r=function(){return ln}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},4883:(e,t,n)=>{var r=n(5835);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},8253:(e,t,n)=>{var r=n(158);e.exports=function(){return r.Date.now()}},5892:(e,t,n)=>{var r=n(1241),i=n(408)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},9174:e=>{e.exports=function(){return[]}},647:e=>{e.exports=function(){return!1}},8172:(e,t,n)=>{var r=n(6897),i=n(3619);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:o,maxWait:t,trailing:s})}},5053:(e,t,n)=>{var r=n(2383),i=n(3619),o=n(1878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):s.test(e)?NaN:+e}},3270:(e,t,n)=>{var r=n(430);e.exports=function(e){return null==e?"":r(e)}},2169:(e,t,n)=>{"use strict";const r=n(4561);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new r;let n=0;const i=async(e,r,...i)=>{n++;const o=(async()=>e(...i))();r(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(r,...o)=>new Promise((s=>{((r,o,...s)=>{t.enqueue(i.bind(null,r,o,...s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},8021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(3034);class i extends Error{constructor(e){super(e),this.name="TimeoutError"}}class o{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){var n;const r={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&(null===(n=this._queue[this.size-1])||void 0===n?void 0:n.priority)>=t.priority)return void this._queue.push(r);const i=function(e,t,n){let r=0,i=e.length;for(;i>0;){const n=Math.trunc(i/2);let s=r+n;o=e[s],t.priority-o.priority<=0?(r=++s,i-=n+1):i=n}var o;return r}(this._queue,r);this._queue.splice(i,0,r)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}const s=()=>{},a=new i;class u extends r{constructor(e){var t,n,r,i;if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:o,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(i=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==i?i:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,r)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const i=void 0===this._timeout&&void 0===t.timeout?e():function(e,t,n,r){let i;const o=new Promise(((o,s)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");t!==Number.POSITIVE_INFINITY?(r={customTimers:{setTimeout,clearTimeout},...r},i=r.customTimers.setTimeout.call(void 0,(()=>{try{o(n())}catch(e){s(e)}}),t),(async()=>{try{o(await e)}catch(e){s(e)}finally{r.customTimers.clearTimeout.call(void 0,i)}})()):o(e)}));return o.clear=()=>{clearTimeout(i),i=void 0},o}(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&r(a)})),o=await i;n(o),this.emit("completed",o)}catch(e){r(e),this.emit("error",e)}this._next()}),t),this._tryToStartAnother(),this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onSizeLessThan(e){if(!(this._queue.size<e))return new Promise((t=>{const n=()=>{this._queue.size<e&&(this.removeListener("next",n),t())};this.on("next",n)}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}},2956:(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t),n.d(t,{Cmd:()=>j,DEPRECATED_mergeChildReducers:()=>ue,combineReducers:()=>ae,getCmd:()=>P,getModel:()=>W,install:()=>G,isLoop:()=>R,liftState:()=>x,loop:()=>F,mergeChildReducers:()=>le,reduceReducers:()=>ce});var i,o=Array.prototype.concat,s=function(e){return o.apply([],e)};function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=Symbol("isCmd"),h=Symbol("dispatch"),g=Symbol("getState"),m="RUN",y="ACTION",v="SET_TIMEOUT",w="SET_INTERVAL",b="LIST",S="MAP",C="NONE";function _(e){return!!e&&!!e[p]}function L(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return A(e,{dispatch:t,wrappedDispatch:t,getState:n,loopConfig:r})}function A(e,t){switch(e.type){case m:return function(e,t){var n,i,o=t.dispatch,s=t.getState,a=t.loopConfig,u=e.successActionCreator||function(){};n=e.failActionCreator?function(t){return a.DONT_LOG_ERRORS_ON_HANDLED_FAILURES||console.error(t),e.failActionCreator(t)}:console.error;try{var l=e.func.apply(void 0,function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(n){return n===h?e:n===g?t:n}))}(e.args,o,s));if((i=l)&&"object"===r(i)&&"function"==typeof i.then&&!e.forceSync)return l.then(u,n).then((function(e){return e?[e]:[]}));var c=u(l);return c?Promise.resolve([c]):null}catch(t){if(!e.failActionCreator)throw console.error(t),t;var d=n(t);return d?Promise.resolve([d]):null}}(e,t);case y:return Promise.resolve([e.actionToDispatch]);case v:case w:return function(e,t){var n,r=function(){var n=A(e.nestedCmd,t);n&&n.then((function(e){e.forEach((function(e){return t.wrappedDispatch(e)}))}))};return n=e.type===w?setInterval(r,e.delayMs):setTimeout(r,e.delayMs),e.scheduledActionCreator?Promise.resolve([e.scheduledActionCreator(n)]):null}(e,t);case b:return e.sequence?function(e,t){var n=e.cmds,r=e.batch,i=void 0!==r&&r,o=n.length?n[0]:null;if(!o)return null;var a=new Promise((function(e){var r=A(o,t);(r=r||Promise.resolve([])).then((function(r){(i?Promise.resolve():Promise.all(r.map((function(e){return t.wrappedDispatch(e)})))).then((function(){var o=A(k(n.slice(1),{batch:i,sequence:!0}),t);o?o.then((function(t){e(r.concat(t))})):e(r)}))}))})).then(s);return i?a:a.then((function(){return[]}))}(e,t):function(e,t){var n=e.cmds,r=e.batch,i=void 0!==r&&r,o=n.map((function(e){var n=A(e,t);return!n||i?n:n.then((function(e){return Promise.all(e.map((function(e){return t.wrappedDispatch(e)})))}))})).filter((function(e){return e}));return 0===o.length?null:Promise.all(o).then(s).then((function(e){return i?e:[]}))}(e,t);case S:var n=A(e.nestedCmd,d(d({},t),{},{wrappedDispatch:function(n){return t.wrappedDispatch(e.tagger.apply(e,u(e.args).concat([n])))}}));return n?n.then((function(t){return t.map((function(t){return e.tagger.apply(e,u(e.args).concat([t]))}))})):null;case C:return null;default:throw new Error("Invalid Cmd type ".concat(e.type))}}function E(e){var t=e.result,n=e.success;return n&&this.successActionCreator?this.successActionCreator(t):!n&&this.failActionCreator?this.failActionCreator(t):null}function I(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.testInvariants)throw Error("Redux Loop: Detected usage of Cmd.run's testInvariants option in production code. This should only be used in tests.");n.testInvariants;var r=a(n,["testInvariants"]);return Object.freeze(d((f(t={},p,!0),f(t,"type",m),f(t,"func",e),f(t,"simulate",E),t),r))}function O(){return this.actionToDispatch}function T(e,t,n,r,i){var o;return Object.freeze((f(o={},p,!0),f(o,"type",r),f(o,"nestedCmd",e),f(o,"delayMs",t),f(o,"scheduledActionCreator",n.scheduledActionCreator),f(o,"simulate",M),o))}function M(e,t){var n=this.nestedCmd.simulate(t),r=null;return Array.isArray(n)?r=n:n&&(r=[n]),this.scheduledActionCreator?[this.scheduledActionCreator(e)].concat(r):r}function D(e){return s(this.cmds.map((function(t,n){return t.simulate(e[n])})).filter((function(e){return e})))}function k(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.testInvariants)throw Error("Redux Loop: Detected usage of Cmd.list's testInvariants option in production code. This should only be used in tests.");n.testInvariants;var r=a(n,["testInvariants"]);return Object.freeze(d((f(t={},p,!0),f(t,"type",b),f(t,"cmds",e),f(t,"simulate",D),t),r))}function N(e){var t=this,n=this.nestedCmd.simulate(e);return Array.isArray(n)?n.map((function(e){return t.tagger.apply(t,u(t.args).concat([e]))})):n?this.tagger.apply(this,u(this.args).concat([n])):null}const j={run:I,action:function(e){var t;return Object.freeze((f(t={},p,!0),f(t,"type",y),f(t,"actionToDispatch",e),f(t,"simulate",O),t))},setTimeout:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return T(e,t,n,v)},setInterval:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return T(e,t,n,w)},clearTimeout:function(e){return I(clearTimeout,{args:[e]})},clearInterval:function(e){return I(clearInterval,{args:[e]})},list:k,map:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return Object.freeze((f(n={},p,!0),f(n,"type",S),f(n,"tagger",t),f(n,"nestedCmd",e),f(n,"args",i),f(n,"simulate",N),n))},none:Object.freeze((f(i={},p,!0),f(i,"type",C),f(i,"simulate",(function(){return null})),i)),dispatch:h,getState:g};var R=function(e){return Array.isArray(e)&&2===e.length&&_(e[1])&&!_(e[0])},P=function(e){return R(e)?e[1]:null},W=function(e){return R(e)?e[0]:e},F=function(e,t){return[e,t]},x=function(e){return R(e)?e:F(e,j.none)},B=function(e,t){return"\nException thrown when running Cmds from action: ".concat(e,".\n\nThrown exception: \n").concat(t,"\n")};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V={DONT_LOG_ERRORS_ON_HANDLED_FAILURES:!1,ENABLE_THUNK_MIGRATION:!1};function G(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},V,e);return function(e){return function(n,r,i){var o=H(x(r),2),s=o[0],a=o[1],u=[],l=function(e){return function(t,n){var r=e(t,n),i=H(x(r),2),o=i[0],s=i[1];return u.push({originalAction:n,cmd:s}),o}},c=e(l(n),s,i);function d(e){var n=e.originalAction,r=L(e.cmd,f,c.getState,t);return r?r.then((function(e){if(e.length)return Promise.all(e.map(f))})).catch((function(e){throw console.error(B(n.type,e)),e})):null}function f(e){if(t.ENABLE_THUNK_MIGRATION&&"function"==typeof e)return e(f,c.getState);var n,r,i=c.dispatch(e),o=u;return u=[],(n=o,r=n.map(d).filter((function(e){return e})),0===r.length?Promise.resolve():1===r.length?r[0]:Promise.all(r).then((function(){}))).then((function(){return i}))}return d({originalAction:{type:"@@ReduxLoop/INIT"},cmd:a}),U(U({},c),{},{dispatch:f,replaceReducer:function(e){return c.replaceReducer(l(e))}})}}}function Y(e){switch(e.length){case 0:return j.none;case 1:return e[0];default:return j.list(e)}}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){return function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var s=[],a=!1,u=Object.keys(e).reduce((function(t,r){var o=e[r];if(!o)return a||(t=K({},t),a=!0),delete t[r],t;var u=o.apply(void 0,[t[r],n].concat(i));return R(u)&&(s.push(P(u)),u=W(u)),t[r]!==u&&a?t[r]=u:t[r]!==u&&(t=K(K({},t),{},J({},r,u)),a=!0),t}),t);return F(u,Y(s))}}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(){return console.warning("mergeChildReducers is deprecated. Use reduceReducers or combineReducers instead."),re.apply(void 0,arguments)}function re(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var s,a=e;R(a)&&(s=P(a),a=W(a));var u=s?[s]:[],l=!1,c=Object.keys(n).reduce((function(e,r){var o=n[r];if(!o)return l||(e=ee({},e),l=!0),delete e[r],e;var s=o.apply(void 0,[e[r],t].concat(i));return R(s)&&(u.push(P(s)),s=W(s)),e[r]!==s&&l?e[r]=s:e[r]!==s&&(e=ee(ee({},e),{},te({},r,s)),l=!0),e}),a);return F(c,Y(u))}function ie(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const se=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var s=t.reduce((function(e,t){var r=t.apply(void 0,[e.newState,n].concat(i));return R(r)?{newState:W(r),cmds:[].concat(ie(e.cmds),[P(r)])}:{newState:r,cmds:e.cmds}}),{newState:e,cmds:[]}),a=s.newState,u=s.cmds;return F(a,Y(u))}};function ae(){return Z.apply(void 0,arguments)}function ue(){return re.apply(void 0,arguments)}function le(){return ne.apply(void 0,arguments)}function ce(){return se.apply(void 0,arguments)}},586:(e,t,n)=>{var r=n(6589),i=n(2708),o=i;o.v1=r,o.v4=i,e.exports=o},8726:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]}},6338:(e,t,n)=>{var r,i=n.g.crypto||n.g.msCrypto;if(i&&i.getRandomValues){var o=new Uint8Array(16);r=function(){return i.getRandomValues(o),o}}if(!r){var s=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),s[t]=e>>>((3&t)<<3)&255;return s}}e.exports=r},6589:(e,t,n)=>{var r=n(6338),i=n(8726),o=r(),s=[1|o[0],o[1],o[2],o[3],o[4],o[5]],a=16383&(o[6]<<8|o[7]),u=0,l=0;e.exports=function(e,t,n){var r=t&&n||0,o=t||[],c=void 0!==(e=e||{}).clockseq?e.clockseq:a,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,p=d-u+(f-l)/1e4;if(p<0&&void 0===e.clockseq&&(c=c+1&16383),(p<0||d>u)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,l=f,a=c;var h=(1e4*(268435455&(d+=122192928e5))+f)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=255&h;var g=d/4294967296*1e4&268435455;o[r++]=g>>>8&255,o[r++]=255&g,o[r++]=g>>>24&15|16,o[r++]=g>>>16&255,o[r++]=c>>>8|128,o[r++]=255&c;for(var m=e.node||s,y=0;y<6;++y)o[r+y]=m[y];return t||i(o)}},2708:(e,t,n)=>{var r=n(6338),i=n(8726);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},4561:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},2380:(e,t,n)=>{var r=n(1921);e.exports="string"==typeof r?r:r.toString()},4361:function(e,t,n){"use strict";var r,i,o,s,a,u,l,c,d,f,p,h,g,m=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},y=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const w=n(8832),b=v(n(2551)),S=n(6192),C=n(1298),_=n(1298),L=v(n(306));class A{constructor(e){r.set(this,void 0),i.set(this,void 0),m(this,r,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};y(this,r,"f").transmit(C.HEARTBEAT_CHANNEL,t),m(this,i,setInterval((()=>{y(this,r,"f").transmit(C.HEARTBEAT_CHANNEL,t)}),C.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(y(this,i,"f")),m(this,i,void 0,"f")}}r=new WeakMap,i=new WeakMap;class E{constructor(e,t,n="app"){o.set(this,void 0),m(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){y(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return y(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return y(this,o,"f").channelAddContextListener(this.id,e,t)}}o=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){s.set(this,!1),a.set(this,void 0),u.set(this,!1),l.set(this,""),c.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),d.set(this,{}),f.set(this,{}),p.set(this,[]),h.set(this,void 0),g.set(this,void 0),m(this,h,e,"f"),m(this,a,new A(e),"f"),m(this,g,t,"f");const n=()=>!0===S.Globals?.FSBL?.Clients?.WindowClient?.options?.customData?.interop?.autoConnect;if(S.Globals?.FSBL?.addEventListener?S.Globals?.FSBL.addEventListener("onReady",(()=>{n()&&this.connectWhenFSBLIsReady()})):window.addEventListener("FSBLReady",(()=>{n()&&this.connectWhenFSBLIsReady()})),window.Event){const e=new Event("fdc3Ready");window&&window.dispatchEvent(e)}}meta(){return{uuid:y(this,l,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(y(this,f,"f")[t?.type]??[]).concat(y(this,f,"f")["*"]??[]).forEach((({handler:n,channel:r})=>{e.meta.channel!==r&&(e.meta.channel||r)||n(t)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,r=y(this,d,"f")[t];n&&(r||[]).forEach((e=>e(n)))}handleIncoming(e){switch(b.default.log("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e)}}releaseQueue(){const e=e=>(void 0!==e?.meta?.uuid&&(e.meta.uuid=y(this,l,"f")),e);y(this,p,"f").forEach((async t=>{const{message:n,handler:r,resolve:i}=t,{err:o,response:s}=await y(this,h,"f").query(C.SERVER_CHANNEL,e(n),r);i({err:o,receiveMessage:s?.data})})),m(this,p,[],"f")}async connectWhenFSBLIsReady(){y(this,u,"f")||(m(this,u,!0,"f"),await y(this,g,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(y(this,s,"f")){const{err:r,response:i}=await y(this,h,"f").query(C.SERVER_CHANNEL,e,t);n({err:r,receiveMessage:i?.data})}else y(this,p,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=y(this,g,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;b.default.log(`fdc3.connect StartupData for ${t}`,e),m(this,l,t,"f");const r={type:"register",meta:this.meta(),payload:{clientChannel:y(this,c,"f"),windowName:t,authenticationToken:n}};y(this,h,"f").query(C.SERVER_CHANNEL,r,(e=>{e?b.default.error("connect error",e):(y(this,h,"f").addResponder(y(this,c,"f"),((e,t)=>{if(e||!t){const t=_.errorAsString(e??"No request received on responder");b.default.error(`FinsembleDesktopAgent can't listen on channel ${y(this,c,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),m(this,s,!0,"f"),this.releaseQueue())})),y(this,a,"f").start(y(this,l,"f"))}stop(){y(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{y(this,h,"f").removeResponder(y(this,c,"f")),m(this,s,!1,"f")}))}async getCurrentContext(e){const t={type:"currentContextRequest",meta:this.meta(),payload:{contextType:e}},{err:n,receiveMessage:r}=await this.exchange(t);return n?null:"currentContext"===r?.type&&r.payload.context?r.payload.context:null}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:r,receiveMessage:i}=await this.exchange(n);return r?null:"currentContext"===i?.type?i.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t}};this.exchange(n)}async getSystemChannels(){const e={type:"systemChannelRequest",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e);return t?[]:("systemChannels"===n?.type?n?.payload?.channels:[]).map((e=>new E(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.OpenError.ResolverUnavailable;if(o.payload.error)throw o.payload.error}async findIntent(e,t){const n={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.appIntent)throw"Invalid response returned from InteropService for findIntent. No appIntent and no error.";return o.payload.appIntent}async findIntentsByContext(e){const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:n}=await this.exchange(t),r=n;if(r.payload.error)throw r.payload.error;return r.payload.intents||[]}async raiseIntent(e,t,n){const r={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:i,receiveMessage:o}=await this.exchange(r),s=o;if(i)throw w.ResolveError.ResolverUnavailable;if(s.payload.error)throw s.payload.error;if(!s.payload.data)throw"Invalid response returned from InteropService for raiseIntent. No data.";return s.payload.data}async raiseIntentForContext(e,t){const n={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.data)throw"Invalid response returned from InteropService for raiseIntentForContext. No data.";return o.payload.data}addIntentListener(e,t){y(this,d,"f")[e]=_.mmAdd(y(this,d,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),y(this,d,"f")[e]=_.mmRemove(y(this,d,"f"),e,t)}}}channelAddContextListener(e,t,n){const r=n?t:"*";n||(n=t);const i={handler:n,channel:e};y(this,f,"f")[r]=_.mmAdd(y(this,d,"f"),r,i);let o={type:"subscribeContext",meta:this.meta(),payload:{contextType:r}};return e&&(o.meta.channel=e),this.exchange(o),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:r}};e&&(t.meta.channel=e),y(this,f,"f")[r]=_.mmRemove(y(this,d,"f"),r,i),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new E(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),r=n;if(t)throw t;if(r.payload.error)throw r.payload.error;if(!r.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return r.payload.data.map((e=>new E(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:L.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,g=new WeakMap},7703:function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InteropAdmin=void 0;const s=o(n(9319)),a=o(n(2551)),u=n(1298),l=n(8832);class c{constructor(){r.set(this,window.name)}async addAppDefinitions(e){const t={type:"addAppDefinitions",meta:{uuid:i(this,r,"f")},payload:{apps:e}};await s.default.query(u.SERVER_CHANNEL,t)}async removeAppDefinitions(e){const t={type:"removeAppDefinitions",meta:{uuid:i(this,r,"f")},payload:{apps:e}};await s.default.query(u.SERVER_CHANNEL,t)}async setAuthenticationToken(e){const t={type:"setAuthenticationToken",meta:{uuid:i(this,r,"f")},payload:{authenticationToken:e}};await s.default.query(u.SERVER_CHANNEL,t)}async registerUIResolverListener(e){s.default.addResponder(u.INTENT_RESOLVER_CHANNEL,(async(t,n)=>{let r,i;if(t)Promise.reject(`registerUIResolverListener failed. It can only be invoked once, system wide (router error: ${t})`);else{const t=n?.data;try{r=await e(t)}catch(e){a.default.log(`registerUIResolverListener IntentResolution rejected ${e}`),i={error:l.ResolveError.ResolverUnavailable}}n?.sendQueryResponse(null,i||r)}}));const t={type:"registerUIResolver",meta:{uuid:i(this,r,"f")}};await s.default.query(u.SERVER_CHANNEL,t)}}t.InteropAdmin=c,r=new WeakMap,t.default=c},1298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.HEARTBEAT_INTERVAL=t.HEARTBEAT_CHANNEL=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=function(e,t,n){return(e[t]||[]).concat([n])},t.concatNoDups=function(e,t){const n=Array.isArray(t)?t:[t],r=e?n.concat(e):n;return Array.from(new Set(r))},t.mmRemove=function(e,t,n){return(e[t]||[]).filter((e=>e===n))},t.errorAsString=function(e){return e?.message??e??null},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.HEARTBEAT_CHANNEL="FSBL.FDC3.Interop.Server",t.HEARTBEAT_INTERVAL=4e3,t.AnonymousAuthenticationToken={authenticationKeyType:"unauthenticated",meta:{name:"Anonymous app"}}},7e3:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDesktop=void 0;const l=n(3854),c=n(1742),d=n(8774),f=n(5688),p=u(n(3699)),h=s(n(8379)),g=n(6192),m=n(3998),y=s(n(5959)),v=u(n(5020)),w=u(n(2551)),b=u(n(7703)),S=u(n(9319)),C=n(6925),_=n(7274),L=n(7580),A=u(n(710)),E=u(n(5376)),I=u(n(3190)),O=u(n(9562)),T=u(n(9499)),M=u(n(8970)),D=u(n(3862)),k=u(n(6008)),N=u(n(7346)),j=u(n(10)),R=u(n(8718)),P=u(n(9321)),W=u(n(2807)),F=u(n(4068)),{APPLICATION_STATE_CHANNEL:x}=h;let B=!1,$="windowName was not set",U={},z={type:"Unknown component type"};const H=e=>{(e=>{window.addEventListener("beforeunload",(t=>{e.clickedMailTo?(e.clickedMailTo=!1,t.preventDefault()):e.windowClose()})),document.querySelector("body")?.addEventListener("click",(t=>{"a"===t.target.tagName.toLowerCase()&&t.target.href.includes("mailto")&&(e.clickedMailTo=!0)}))})(e)};t.FSBLDesktop=class{constructor(){this.FinsembleWindow=f.FinsembleWindow,this.ConfigUtils=m.ConfigUtilInstance,this.RESTUtils=y,this.UserNotification=p.default,this.SystemManagerClient=v.default,this.clickedMailTo=!1,this.isInitialized=!1,this.displayStartupTimeoutError=!0,this.dependencyManager=l.FSBLDependencyManagerSingleton,this.System=c.System,r.set(this,C.Startup.getInstance()),this.remoteRedux={remoteReduxClientEnhancer:d.remoteReduxClientEnhancer},this.internal={interopAdmin:new b.default},this.Clients={RouterClient:S.default,AuthenticationClient:A.default,WindowClient:E.default,DistributedStoreClient:I.default,LauncherClient:O.default,DragAndDropClient:T.default,LinkerClient:M.default,StorageClient:D.default,WorkspaceClient:k.default,DialogManager:N.default,ConfigClient:j.default,HotkeyClient:R.default,SearchClient:P.default,NotificationClient:W.default,SmartDesktopClient:F.default,Logger:w.default}}getFSBLInfo(e){return new Promise((t=>{a(this,r,"f").onReady((()=>{this.Clients.ConfigClient.getValue({field:"finsemble"},((n,r)=>{const i={FSBLVersion:r.system.FSBLVersion,gitHash:r.system.gitHash};e&&e(i),t(i)}))}))}))}addEventListener(e,t){a(this,r,"f").onReady(t)}shutdownApplication(){S.default.transmit("Application.shutdown",{})}restartApplication(e){S.default.transmit("Application.restart",e||{})}onShutdown(){w.default.deprecated("FSBL.onShutdown(). This has been non-functional for many versions.")}windowClose(){for(const e in this.Clients){const t=this.Clients[e];t.onClose&&t.onClose()}for(const e in g.Globals._FSBLCache.windows)g.Globals._FSBLCache.windows[e].handleWrapRemoveRequest();S.default.disconnectAll()}signalSuccessfulStart(e,t){c.System.isBrowserView()||(S.default.publish(`Finsemble.${e}.componentReady`,{name:e}),v.default.publishBootStatus(t,"components","completed")),w.default.system.log("publishBootStatus",t,"components","completed",U.customData)}startApp(){return new Promise((async e=>{if(B)return console.warn("FSBL.startApp called twice."),e(null);B=!0,await c.System.ready();const{finWindow:t}=await(async e=>{const t=await L.getSystemStartupData(),n=t?.customData?.authenticationToken,r=c.System.Window.getCurrent();return $=r.name,U=L.getManifestFromStartupData(t)??{},z=t?.customData?.component,e.setStartupData({windowName:$,authenticationToken:n}),{finWindow:r}})(a(this,r,"f"));w.default.system.debug(`WINDOW LIFECYCLE:STARTUP: System.ready invoked in ${$}`),console.debug(`WINDOW LIFECYCLE:STARTUP: System.ready invoked in ${$}`);const n=L.getRouterConfig({windowName:$,systemManifest:U});await S.default.start(n),w.default.system.debug(`WINDOW LIFECYCLE:STARTUP: Router is ready in ${$}`),console.debug(`WINDOW LIFECYCLE:STARTUP: Router is ready in ${$}`),S.default.transmit(`${$}.onSpawned`,{name:$},{suppressWarnings:!0});try{const{wrap:e}=await f.FinsembleWindow.getInstance({name:$,uuid:t.uuid});g.Globals.finsembleWindow=e}catch(e){"Cannot Wrap Service Manager or Services"!==e&&w.default.system.error(`Unable to get Finsemble Window Instance for ${$}`,e)}const i=await(async e=>new Promise((t=>{const n=S.default.subscribe(x,((r,i)=>{S.default.unsubscribe(n);const o="authenticated"!==i.data.state&&"ready"!==i.data.state,s=z?.component?.neededClients??(o?["ConfigClient","LauncherClient","DistributedStoreClient","WindowClient","AuthenticationClient","searchClient","storageClient"]:(e=>Object.entries(e.Clients).flatMap((e=>{const[t,n]=e;return n.initialize?[t]:[]})))(e));t(s)}))})))(this);await(async(e,t)=>new Promise((n=>{const r=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1)));for(let t=0;t<r.length;t++){const n=e.Clients[r[t]];n.windowName=$,n.initialize&&n.initialize()}w.default.system.debug("COMPONENT LIFECYCLE:STARTUP:Using the following Finsemble clients for startup:",t),console.log("COMPONENT LIFECYCLE:STARTUP:Using the following Finsemble clients for startup:",t),l.FSBLDependencyManagerSingleton.startup.waitFor({clients:t},(()=>{n()}))})))(this,i),document.getElementsByTagName("html")[0].classList.add("finsemble"),a(this,r,"f").ready(),w.default.start(),w.default.debug(`WINDOW LIFECYCLE:STARTUP: FSBL Online in ${$}`),_.start(U,z.type),this.signalSuccessfulStart($,z.type),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{H(this)})):H(this),window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return w.default.error(e.message,`File: ${e.filename}`,`Line: ${e.lineno}`,`Column: ${e.colno}`,`Error Stack: \n ${t}`),!1})),window.addEventListener("unhandledrejection",(e=>{w.default.error("Unhandled rejection","reason",e.reason)})),e(null)}))}stopApp(){B=!1,this.windowClose()}},r=new WeakMap},7580:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const i=r(n(2551)),o=n(1742),s=n(3998),a={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},u=e=>{if(!e)return i.default.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&o&&r;return i.default.system.debug(`Transport crossDomain=${u} (${n}:${r}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=e?.finsemble,{sameDomainTransport:r="SharedWorker",crossDomainTransport:o="IPCBus"}=n??{},s=u(t)?o:r;return i.default.system.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),console.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),s},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:r})=>n?((e,n)=>{if(i.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const r=e.finsemble,i=r?.router?.transportSettings??r?.IAC??{},o=r?.notificationURL??`${r.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:r.moduleRoot,transportName:t.getRecommendedTransport(e),transportSettings:i,notificationURL:o}}return i.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...a,windowName:n}})(n,e):{...a,windowName:e,transportSettings:r??{}},t.getSystemStartupData=async()=>new Promise((e=>{o.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=e?.manifest;return t?.finsemble&&s.ConfigUtilInstance.resolveConfigVariables(t.finsemble,t.finsemble),t}},7274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.start=void 0;const i=n(1742),o=r(n(2551));t.start=(e,t)=>{"smartDesktopDesigner"!==t&&((e=>{const t=e?.finsemble?.documentRoot;if(t){const e=new URL("./assets/css/theme.css",t),n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href",e.href),document.head.appendChild(n),FSBL.Clients.RouterClient.addListener("Finsemble-ui-change.themeUpdate",((e,t)=>{const n=t?.data;if(n)for(const[e,t]of Object.entries(n))document.documentElement.style.setProperty(e,String(t));else o.default.error("FSBL.entry.ts: Expected CSS for Finsemble-ui-change.themeUpdate but got error",e)}))}else o.default.system.error("Could not find manifest entry: finsemble.documentRoot")})(e),FSBL.Clients.RouterClient.addListener("Finsemble-ui-change.taskbarIconUpdate",(()=>{FSBL.Clients.Logger.system.log("Finsemble-ui-change: dynamic taskbar icon change -- resetting component icon"),FSBL.Clients.ConfigClient.getValue({field:"startup_app"},((e,{applicationIcon:t})=>{e?FSBL.Clients.Logger.system.error(`error updating taskbar icon: ${e}`):i.System.Window.getCurrent().setTaskbarIcon({iconURL:t})}))})))}},6925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const r=n(1298),i=n(6192),o=n(586),s=n(4971);class a{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:r.AnonymousAuthenticationToken,windowName:`Unknown window-${o.v4()}`}}static getInstance(){return a.instance?a.instance:a.instance=s.singleton("Startup",a)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}ready(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()})),i.Globals.dispatchEvent&&i.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=a,a.instance=null},7348:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(7664),u=o(n(9886)),l=s(n(2551)),c=window;t.default=class{constructor(e,t){this.values={},this.listeners=[],this.registeredDispatchListeners=[],this.mapping={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e&&l.default.system.error("DistributedStoreClient",e),!t.data.store)return;t.data.field||(t.data.field=null);const n=this.name+(t.data.field?`.${t.data.field}`:""),r=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(n,r)},this.routerClient=t,this.isGlobal=e.global,this.name=e.store?e.store:"finsemble",e.values&&(this.values=e.values),this.lst=this.listeners,u.initObject(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,this.handleDispatchedMessages.bind(this))}handleDispatchedMessages(e,t){for(let e=0;e<this.registeredDispatchListeners.length;e++)this.registeredDispatchListeners[e](t.data)}setValue(e,t){if(e.field||l.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||l.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};return c.distributedStoreClient.routerClient.query("storeService.setValue",n,(e=>{if(t)return t(e)}))}const n=u.checkForObjectChange(this.values,e.field,this.mapping);return u.setPath(this.values,e.field,e.value),u.mapField(this.values,e.field,this.mapping),n&&this.sendRemovals(n),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t?t(null):null}publishObjectUpdates(e,t){const n=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,u.byString(this.values,e)),e=n[e]}sendRemovals(e){for(let t=0;t<e.length;t++)this.triggerListeners(`${this.name}.${e[t]}`,u.byString(this.values,e[t]))}setValues(e,t){return e?Array.isArray(e)?void a.each(e,((e,t)=>{this.setValue(e,t)}),(e=>t?t(e):null)):l.default.system.error("DistributedStore.setValues:params must be an array"):l.default.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return t?t("no field provided"):"no field provided";if(this.isGlobal)return this.getGlobalValue(e,t);const n=u.byString(this.values,e.field);return void 0!==n?t?t(null,n):n:t?t("couldn't find a value"):null}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return this.getValue(e,t);if(this.isGlobal)return this.getGlobalValues(e,t);const n={};for(let t=0;t<e.length;t++){const r=e[t],i="string"==typeof r?r:r.field,o=u.byString(this.values,i);n[i]=o}return t?t(null,n):n}getGlobalValue(e,t){c.distributedStoreClient.routerClient.query("storeService.getValue",{store:this.name,field:e.field},((e,n)=>e?t(e):t(e,n.data)))}getGlobalValues(e,t){c.distributedStoreClient.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,n)=>e?t(e):t(e,n.data)))}removeValue(e,t){if(!e.field){if(void 0===e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");a.map(e,this.removeValue,((e,n)=>t(e,n)))}destroy(e){const t={store:this.name,global:this.isGlobal};c.distributedStoreClient.removeStore(t,(t=>t?e(t):e(null,!0)))}changeSub(e){this.subs||(this.subs=[]),this.subs[e]||(this.isGlobal&&c.distributedStoreClient.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,n){"function"==typeof e&&(t=e,e={});let{field:r}=e;const i=this.name+(r?`.${r}`:"");return this.listeners[i]?this.listeners[i].push(t):this.listeners[i]=[t],this.changeSub(i),n?n():null}addListeners(e,t,n){if(!Array.isArray(e))return this.addListener(e,t,n);for(let n=0;n<e.length;n++){let i=null;const o=e[n];var r;"string"==typeof o?i=o:o.field&&(({field:i}=o),r=e[n].listener);const s=this.name+(i?`.${i}`:"");r||t&&"function"==typeof t&&(r=t),this.listeners[s]?this.listeners[s].push(r):this.listeners[s]=[r],this.changeSub(s)}return n?n():null}removeListener(e,t,n){"function"==typeof e&&(n=t,t=e,e={});let{field:r}=e;const i=this.name+(r?`.${r}`:"");if(this.listeners[i])for(let e=0;e<this.listeners[i].length;e++)if(this.listeners[i][e]===t)return this.listeners[i].splice(e,1),n?n(null,!0):null;return n?n(null,!1):null}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&this.removeListener(e,t,n),n("missing fields");let r=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var i;"string"==typeof s?o=s:s.field&&(({field:o}=s),i=e[n].listener);const a=this.name+(o?`.${o}`:"");if(!i){if(!t||"function"!=typeof t)continue;i=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===i&&(this.listeners[a].splice(e,1),r++)}return r<e.length?n("All listeners could not be found",!1):n?n(null,!0):null}triggerListeners(e,t){if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?(l.default.system.debug("DistributedStore.triggerListeners",e,t),this.listeners[e][n](null,{field:e,value:t})):l.default.system.warn("DistributedStoreClient:triggerListeners: listener is not a function",e,n,this.listeners[e][n])}}},710:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationClient=void 0;const i=r(n(3712)),o=n(2669),s=n(5688),a=n(4232);class u extends o._BaseClient{constructor(e){super(e),this.publishAuthorization=(e,t)=>{i.default.args(e,"string",t,"object"),this.routerClient.transmit("AuthenticationService.authorization",{user:e,credentials:t})},this.getCurrentCredentials=e=>{this.routerClient.query("authentication.currentCredentials",null,((t,n)=>{const r=t?null:n.data;e(t,r)}))},this.transmitSignOnToAuthService=e=>{i.default.args(e,"object"),this.logger.system.debug("AUTHORIZATION: Transmitting SignOn To AuthService"),this.routerClient.transmit("authentication.dialogSignOnToAuthService",e)},this.appSignOn=(e,t,n)=>{this.logger.system.debug(`AUTHORIZATION: Signing on to app ${e}`),i.default.args(e,"string",t,"object",n,"function"),this.routerClient.query("authentication.appSignOn",{signOnKey:e,params:t},{timeout:-1},((e,t)=>{n&&n(e,t.data)}))},this.appRejectAndRetrySignOn=(e,t,n)=>{this.logger.system.warn("AUTHORIZATION: appRejectAndRetrySignOn",e),i.default.args(e,"string",t,"object",n,"function"),this.routerClient.query("authentication.appRejectAndRetrySignOn",{signOnKey:e,params:t},{timeout:-1},((e,t)=>{n&&n(e,t.data)}))},this.appAcceptSignOn=e=>{this.logger.system.info("AUTHORIZATION: Accepted application sign on.",e),i.default.args(e,"string"),this.routerClient.transmit("authentication.appAcceptSignOn",{signOnKey:e})},this.appRejectSignOn=e=>{this.logger.system.error("AUTHORIZATION: Rejected application sign on.",e),i.default.args(e,"string"),this.routerClient.transmit("authentication.appRejectSignOn",{signOnKey:e})},this.completeOAUTH=(e,t,n)=>{if(this.logger.system.log("completeOAUTH",t),i.default.args(t,"object="),!t){t={};const e=new URLSearchParams(window.location.search);for(const n of e.entries())t[n[0]]=n[1]}const r=()=>{this.routerClient.query("authentication.completeOAUTH",{err:e,params:t},((e,t)=>{let{data:r}=t;n?.(e,r)}))};t.state?r():this.isInAService?this.logger.system.error("OAUTH Error. This functionality is not yet available in services."):this.finsembleWindow.getOptions(((e,n)=>{t.state=n.customData.OAuthState,r()}))},this.start=e=>{if(a.iAmAServiceWindow())return this.isInAService=!0,void(e&&e());s.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{"Cannot Wrap Service Manager or Services"===t?this.isInAService=!0:this.finsembleWindow=n,e&&e()}))},this.beginAuthentication=this.beginAuthentication.bind(this)}beginAuthentication(e,t){this.routerClient.query("authentication.beginAuthentication",e,((e,n)=>{t(e,n.data)}))}}t.AuthenticationClient=u;var l=new u({onReady:e=>{l.start(e)},name:"authenticationClient"});t.default=l},2669:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const i=r(n(9319)),o=r(n(2551)),s=n(1742),a=n(3854);t._BaseClient=class{constructor(e){this.status="offline",this.startupTime=0,this.initialized=!1,this.startupDependencies={services:[],clients:[]},this.finsembleWindow=null,this.windowName="",this.clientReadyQueue=[],this.processClientReadyQueue=()=>{for(const e of this.clientReadyQueue)e();this.clientReadyQueue=[]},this.onReady=e=>{this.clientReadyQueue.push(e),"online"===this.status&&this.processClientReadyQueue()},this.setClientOnline=()=>{this.status="online";const e=`STARTUP:CLIENT ONLINE:${this.finWindow?.name}:${this.name}`;this.startupTime=window.performance.now()-this.startupTime;const t=()=>{this.logger.system.debug(e),this.processClientReadyQueue(),a.FSBLDependencyManagerSingleton.setClientOnline(this.name)};this._onReady?this._onReady(t):t()},this.initialize=(e=Function.prototype)=>{this.initialized||(this.initialized=!0,this.startupTime=performance.now(),this.finWindow=s.System.Window.getCurrent(),this.windowName=this.finWindow.name,this.logger.system.debug("Baseclient Init Router Ready",this.name),a.FSBLDependencyManagerSingleton.startup.waitFor(this.startupDependencies,(()=>{e(),this.setClientOnline()})))},this.onClose=e=>{e&&e()},this.name=e.name,this._onReady=e.onReady,this.startupDependencies=e.startupDependencies||{services:[],clients:[]},this.logger=o.default,this.routerClient=i.default}}},10:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(3712)),s=n(2669),a=r(n(5020)),u=r(n(2551));class l extends s._BaseClient{constructor(e){super(e),this.listeners=[],this.changeSub=e=>{this.subs||(this.subs={}),this.subs[e]||(this.routerClient.query("configService.addListener",e,(t=>{t&&u.default.system.error("Error adding listener to config service",t),this.routerClient.subscribe(e,this.handleChanges)})),this.subs[e]=!0)},this.handleChanges=(e,t)=>{e&&u.default.system.error(e),t.data.field||(t.data.field=null);const n=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(t.data.field?t.data.field:"configService",n)},this.triggerListeners=(e,t)=>{if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?this.listeners[e][n](null,{field:e,value:t}):u.default.system.warn("ConfigClient:triggerListeners: listener is not a function",e)},this.set=(e,t)=>{u.default.system.debug("ConfigClient.Set",e),"function"==typeof e?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.set",e,((e,n)=>{t(e,n?n.data:null)}))},this.processAndSet=this.processAndSet.bind(this),this.getValue=this.getValue.bind(this),this.getValues=this.getValues.bind(this),this.setValue=this.setValue.bind(this),this.setValues=this.setValues.bind(this),this.removeValue=this.removeValue.bind(this),this.removeValues=this.removeValues.bind(this),this.addListener=this.addListener.bind(this),this.addListeners=this.addListeners.bind(this),this.removeListener=this.removeListener.bind(this),this.removeListeners=this.removeListeners.bind(this),this.setPreference=this.setPreference.bind(this),this.getPreferences=this.getPreferences.bind(this),this.unsetPreference=this.unsetPreference.bind(this)}getValue(e,t=Function.prototype){return"string"==typeof e&&(e={field:e}),new Promise(((n,r)=>{if(!e.field){const e="no field provided";return r(e),t(e)}this.routerClient.query("configService.getValue",{field:e.field},((e,i)=>e?(r(e),t(e)):(n({err:e,data:i.data}),t(e,i.data))))}))}getValues(e,t=Function.prototype){return"function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e)?this.getValue(e,t):new Promise((n=>{this.routerClient.query("configService.getValues",{fields:e},((e,r)=>e?t(e):(n({err:e,data:r.data}),t(e,r.data))))}))}setValue(e,t){const n={field:e.field,value:e.value};return this.routerClient.query("configService.setValue",n,(e=>t?t(e):null))}setValues(e,t){return e?Array.isArray(e)?this.routerClient.query("configService.setValues",e,(e=>t?t(e):null)):u.default.system.error("ConfigClient.SetValues. Params must be an array"):u.default.system.error("ConfigClient.SetValues. No params given")}removeValue(e,t=Function.prototype){if(void 0!==e){if(e.field||"string"!=typeof e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t=Function.prototype){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");i.map(e,this.removeValue,((e,n)=>t(e,n)))}addListener(e,t,n){let r=null;"function"==typeof e&&(t=e,e={field:r}),({field:r}=e);const i="configService"+(r?`.${r}`:"");return this.listeners[i]?this.listeners[i].push(t):this.listeners[i]=[t],this.changeSub(i),n?n():null}addListeners(e,t,n){if(!Array.isArray(e))return this.addListener({field:e.field},t,n);for(let n=0;n<e.length;n++){let i=null;const o=e[n];var r;"string"==typeof o?i=o:o.field&&(({field:i}=o),r=o.listener);const s="configService"+(i?`.${i}`:"");r||t&&"function"==typeof t&&(r=t),this.listeners[s]?this.listeners[s].push(r):this.listeners[s]=[r],this.changeSub(s)}return n?n():null}removeListener(e,t,n){let r=null;"function"==typeof e&&(n=t,t=e,e={field:r}),({field:r}=e);const i=this.name+(r?`.${r}`:"");if(this.listeners[i])for(let e=0;e<this.listeners[i].length;e++)if(this.listeners[i][e]===t)return this.listeners[i].pop(e),n?n(null,!0):null;return n?n(null,!1):null}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&this.removeListener(e,t,n),n?.("missing fields");let r=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var i;"string"==typeof s?o=s:s.field&&(({field:o}=s),i=e[n].listener);const a="configService"+(o?`.${o}`:"");if(!i){if(!t||"function"!=typeof t)continue;i=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===i&&(this.listeners[a].pop(n),r++)}return r<e.length?n?.("All listeners could not be found",!1):n?n(null,!0):null}get(e,t){u.default.system.debug("ConfigClient.Get",e),u.default.system.deprecated("This functionality has been deprecated. It will be removed in a future Finsemble release. Use getValue instead.",e),1===arguments.length?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.get",e,((e,n)=>{t(e,n?n.data:null)}))}processAndSet(e,t){if(u.default.system.debug("ConfigClient.processAndSet",e),o.default.args(e,"object",t,"function=")&&o.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";u.default.system.warn("ConfigClient.processAndSet:",e),t&&t(e,null)}else this.routerClient.query("config.processAndSet",e,((e,n)=>{t&&t(e,n?n.data:null)}))}setPreference(e,t){this.routerClient.query("PreferencesService.setPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}async getPreferences(e){await a.default.waitForStartup("preferencesService"),this.routerClient.query("PreferencesService.getPreferences",{},((t,n)=>{u.default.system.debug("ConfigClient.getPreferences response",n),e&&e(t,n?n.data:null)}))}async unsetPreference(e,t){u.default.system.debug("ConfigClient.unsetPreference",e),this.routerClient.query("PreferencesService.unsetPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}}const c=new l({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=c},7346:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(9562)),s=r(n(5376)),a=r(n(3190)),u=r(n(3712)),l=n(2669),c=n(5688),d=r(n(2551)),f=n(1742),p=n(4232);s.default.initialize(),o.default.initialize(),a.default.initialize();class h extends l._BaseClient{constructor(e){super(e),this.getParametersFromInDialog=()=>{const{inputParams:e}=s.default.getSpawnData();return d.default.system.debug(`DialogManagerClient:getParametersFromInDialog: ${JSON.stringify(e)}`),e},this.respondAndExitFromInDialog=e=>{u.default.args(e,"any"),d.default.system.debug(`DialogManagerClient:respondAndExitFromInDialog: ${JSON.stringify(e)}`);const{responseChannel:t}=s.default.getSpawnData();this.routerClient.transmit(t,e)},this.getAvailableDialog=(e,t)=>{this.DialogStore.getValue("dialogs.available",((n,r)=>{for(const n in r){const i=r[n];if(i.componentType===e)return t(i)}t(null)}))},this.generateDialogReadyChannel=e=>`Dialog.${e.windowName+e.uuid}.ready`,this.showDialog=()=>{const e=this.generateDialogReadyChannel(o.default.myWindowIdentifier);this.routerClient.transmit(e,{userInputTimeout:void 0===this.userInputTimeout?1e4:this.userInputTimeout})},this.sendQueryToDialog=(e,t,n)=>{function r(t){console.warn(`No response from dialog ${e.windowName} after ${t/1e3} seconds. Check to make sure your dialog is sending back data.`)}this.moveDialogFromAvailableToOpened(e);const i=`Dialog.${e.windowName+e.uuid}.Show`,s=this.generateDialogReadyChannel(e);let a;const u=(n,i)=>{a=setTimeout(r.bind(null,i.data.userInputTimeout),i.data.userInputTimeout),d.default.perf.info("DialogManagerClient:sendQueryToDialog:Dialog: ShowWindow Start"),o.default.showWindow(e,{monitor:t.monitor||"mine",left:"center",top:"center"},((e,t)=>{c.FinsembleWindow.getInstance({name:t.finWindow.name},((e,t)=>{t.bringToFront(),t.focus()})),d.default.perf.info("DialogManagerClient:sendQueryToDialog:ShowWindow finish")})),this.routerClient.removeListener(s,u)};this.routerClient.addListener(s,u),d.default.perf.info("DialogManagerClient:sendQueryToDialog ShowWindow Query begin."),this.routerClient.query(i,t,((t,r)=>{clearTimeout(a),this.moveDialogFromOpenedToAvailable(e),n(t,r.data)}))},this.moveDialogFromOpenedToAvailable=e=>{this.DialogStore.getValue("dialogs",((t,n)=>{const r=n.opened,i=n.available;delete r[e.windowName],i[e.windowName]=e,this.DialogStore.setValue({field:"dialogs.opened",value:r}),this.DialogStore.setValue({field:"dialogs.available",value:i})}))},this.moveDialogFromAvailableToOpened=e=>{this.DialogStore.getValue("dialogs",((t,n)=>{const r=n.available,i=n.opened;delete r[e.windowName],i[e.windowName]=e,this.DialogStore.setValue({field:"dialogs.available",value:r}),this.DialogStore.setValue({field:"dialogs.opened",value:i})}))},this.registerModal=()=>{this.isModal&&(f.System.getMonitorInfo((e=>{const t=e.virtualScreen;t.width=t.right-t.left,t.height=t.bottom-t.top,this.finsembleWindow.setBounds({bounds:t})})),this.DialogStore.setValue({field:"modalIdentifier",value:o.default.myWindowIdentifier}))},this.showModal=e=>{this.DialogStore.getValue("modalIdentifier",(async(t,n)=>{if(null==n)return;const{wrap:r}=await c.FinsembleWindow.getInstance({uuid:n.uuid,name:n.windowName});r.updateOptions({options:{opacity:.4}},(()=>{r.show((()=>{r.bringToFront((()=>{this.finsembleWindow.focus((()=>{this.finsembleWindow.bringToFront(),e&&"function"==typeof e&&e()}))}))}))}))}))},this.open=(e,t,n)=>{this.getAvailableDialog(e,(r=>{r?this.sendQueryToDialog(r,t,n):o.default.spawn(e,{options:{customData:{foreign:{clients:{dialogManager:{isDialog:!0}}}}}},(()=>{this.open(e,t,n)}))}))},this.DialogStore=null,this.isDialog=!1,this.isModal=!1,this.RESPONDER_CHANNEL=null,this.openerMessage=null,this.registerDialogCallback=e=>{this.routerClient.addResponder(this.RESPONDER_CHANNEL,((t,n)=>{this.openerMessage=n,e(t,n)}))},this.hideModal=()=>{this.DialogStore.getValue("modalIdentifier",(async(e,t)=>{if(null==t)return;const{wrap:n}=await c.FinsembleWindow.getInstance({uuid:t.uuid,name:t.windowName});n.hide()}))},this.respondToOpener=e=>{d.default.system.info("DialogManagerClient:RespondToOpener:",e),this.openerMessage.sendQueryResponse(null,e),!1!==e.hideModalOnClose&&this.hideModal(),this.finsembleWindow.hide(),this.openerMessage=null},this.registerWithStore=e=>{if(this.isDialog){const t=o.default.myWindowIdentifier;this.RESPONDER_CHANNEL=`Dialog.${t.windowName+t.uuid}.Show`,this.DialogStore.setValue({field:`dialogs.available.${t.windowName}`,value:t},e)}else e()},this.checkIfWindowIsDialog=e=>{let t=null;try{this.isDialog=s.default?.options?.customData?.foreign?.clients?.dialogManager?.isDialog}catch(e){t=e}e&&e(t)},this.createStore=e=>{a.default.createStore({store:"DialogStore",values:{dialogs:{opened:{},available:{}}},global:!0},((t,n)=>{this.DialogStore=n,e()}))},this.getFinsembleWindow=e=>{if(!this.isDialog)return e();c.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{this.finsembleWindow=n,e()}))},this.spawnDialog=this.spawnDialog.bind(this)}spawnDialog(e,t,n,r){u.default.args(e,"object",t,"object",n,"function");const i=p.getRandomWindowName("DialogChannel");e.data={inputParams:t,responseChannel:i},e.left||0===e.left||e.right||0===e.right||(e.left="center"),e.top||0===e.top||e.bottom||0===e.bottom||(e.top="center"),this.routerClient.addListener(i,((e,t)=>{n(e,t.data),this.routerClient.removeListener(i,r)})),o.default.spawn("dialogTemplate",e,((e,t)=>{e&&(d.default.system.error("ERROR",e),n(e,t)),r&&r(e,t)}))}}var g=new h({startupDependencies:{clients:["distributedStoreClient","windowClient"]},onReady(e){g.checkIfWindowIsDialog(),i.series([g.createStore.bind(g),g.registerWithStore.bind(g),g.getFinsembleWindow.bind(g),e=>{o.default.onReady(e)},e=>{s.default.onReady(e)}],e)},name:"dialogManager"});t.default=g},3190:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(2669),o=r(n(7348));let s;const a=window;let u;const l={};function c(e,t){return u.routerClient.query("storeService.getStore",e,(function(e,n){return e?t(e):t(e,new s(n.data,u.routerClient))}))}function d(e,t){u.routerClient.query("storeService.removeStore",e,((e,n)=>t(e,!e&&n.data)))}class f extends i._BaseClient{constructor(e){super(e),this.load=function(e){e()},u=this,this.ls=l}getStore(e,t){return e.global?c(e,t):e.store&&l[e.store]?t(null,l[e.store]):c(e,t)}createStore(e,t=Function.prototype){let n=new Promise(((n,r)=>{if(e.global)return this.routerClient.query("storeService.createStore",e,((e,i)=>{if(e)return r(e),t(e);const o=new s(i.data,u.routerClient);return n({err:e,data:o}),t(e,o)}));if(l[e.store])return n({err:null,data:l[e.store]}),t(null,l[e.store]);const i=new s(e,u.routerClient);return l[i.name]=i,n({err:null,data:i}),t(null,i)}));return n.catch((e=>{console.log(e)})),n}removeStore(e,t){return e.global?d(e,t):l[e.store]?(delete l[e.store],t(null,!0)):void d(e,t)}}var p=new f({startupDependencies:{},onReady(e){s=o.default,p.load(e)},name:"distributedStoreClient"});a.distributedStoreClient=p,t.default=p},9499:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(2551)),s=r(n(3712)),a=n(2669),u=r(n(8970)),l=r(n(9562)),c=r(n(5376)),d=r(n(3190)),f=n(5688),p=n(6420),h=n(1742),g=n(2380),m=n(1639).Z,y=n(5090).Z,v="DragAndDropClient.prepareDrag",w="DragAndDropClient.dragStart",b="DragAndDropClient.dragEnd",S={DROP:"drop",SPAWN:"spawn",LINKER:"linker"};class C extends a._BaseClient{constructor(e){super(e),s.default.args(e,"object=")&&e&&s.default.args2("params.onReady",e.onReady,"function="),this.emitters={},this.sourceData=[],this.receivers={},this.receiveResponder=!1,this.linkerListener=!1,this.openLinkerDataByDefault=!0,this.SHARE_METHOD=S,this.bindAllFunctions()}bindAllFunctions(){const e=this;for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){const n=e[t];n instanceof Function&&n!==C&&(e[t]=e[t].bind(e))}}setEmitters(e){if(!Array.isArray(e.emitters))return;const t=this;e.emitters.forEach((e=>{t.emitters[e.type]=e})),this.routerClient.publish(`${this.windowName}Finsemble.Sharer`,{emitterEnabled:!!Object.keys(t.emitters).length,receiverEnabled:!!Object.keys(t.receivers).length}),this.receiveResponder||(this.routerClient.addResponder(`${this.windowName}.Share`,((e,n)=>{t.emit.call(t,e,n)})),this.receiveResponder=!0)}addReceivers(e){if(!Array.isArray(e.receivers))return;const t=this;e.receivers.forEach((e=>{const n=e.type.toString();t.receivers[n]?t.receivers[n].push(e):t.receivers[n]=[e]})),this.routerClient.publish(`${this.windowName}Finsemble.Sharer`,{emitterEnabled:!!Object.keys(t.emitters).length,receiverEnabled:!!Object.keys(t.receivers).length});const n=c.default.getSpawnData();n&&n.sharedData&&c.default.getComponentState({field:"Finsemble.DealtWithSpawnSharedData"},((e,r)=>{r||c.default.setComponentState({field:"Finsemble.DealtWithSpawnSharedData",value:"done"},(()=>{t.handleSharedData(n.sharedData,S.SPAWN)}))})),!this.linkerListener&&this.openLinkerDataByDefault&&(u.default.subscribe("Finsemble.DragAndDropClient",((e,n)=>{n.originatedHere()||Object.keys(e).forEach((n=>{if(t.canReceiveData(n)){const r={};r[n]=e[n],t.handleSharedData(r,S.LINKER)}}))})),this.linkerListener=!0)}updateReceivers(e){if(!Array.isArray(e.receivers))return;const t=this;e.receivers.forEach((e=>{const n=e.type.toString();t.receivers[n]||(t.receivers[n]=[]);const r=t.receivers[n];for(let t=0;t<r.length;t++)r[t].handler===e.oldHandler&&(r[t].handler=e.handler);t.receivers[n].push(e.handler)})),t.linkerListener||(u.default.subscribe("Finsemble.DragAndDropClient",((e,n)=>{n.originatedHere()||t.handleSharedData(e,S.LINKER)})),t.linkerListener=!0)}removeReceivers(e){if(!Array.isArray(e.receivers))return;const t=this;e.receivers.forEach((e=>{const n=e.type.toString();if(!t.receivers[n])return;const r=t.receivers[n];for(let t=0;t<r.length;t++)if(r[t].handler===e.handler){r.splice(t,1);break}}))}dragStart(e){const t={FSBL:!0,window:this.windowName};this.routerClient.transmit(v,Object.keys(this.emitters)),e.dataTransfer.setData("text/plain",JSON.stringify(t))}dragStartWithData(e,t){this.routerClient.transmit(w,Object.keys(t));const n={FSBL:!0,containsData:!0,window:this.windowName,data:t};e.dataTransfer.setData("text/plain",JSON.stringify(n))}handleSharedData(e,t){const n=this;Object.keys(n.receivers).forEach((r=>{const i=n.receivers[r],s={};Object.keys(e).forEach((t=>{o.default.system.info("DragAndDropClient:handleSharedData:Data value:",t),i[0].type instanceof RegExp?t.match(i.type)&&(s[t]=e[t]):i[0].type==t&&(s[t]=e[t])})),Object.keys(s).length&&i.forEach((e=>{e.handler(null,{data:s,shareMethod:t})}))}))}drop(e){const t=this;e.dataTransfer||(e.dataTransfer=e.originalEvent.dataTransfer);let n=e.dataTransfer.getData("text/plain");if(n){try{n=JSON.parse(n)}catch(e){return}if(n.FSBL)if(e.preventDefault(),e.stopPropagation(),n.containsData)t.handleSharedData(n.data,S.DROP);else{const e=n.window,r=this.sourceData,i=[];for(let e=0;e<r.length;e++){const n=r[e];t.canReceiveData(n)&&i.push(n)}t.routerClient.query(`${e}.Share`,i,((e,n)=>{t.handleSharedData(n.data,S.DROP)}))}}}emit(e,t){const n={},r=this;i.each(t.data,((e,t)=>{const i=r.emitters[e];i.data&&"function"==typeof i.data?(n[e]=i.data(),t()):(n[e]=i.data,t())}),(()=>{t.sendQueryResponse(null,n)}))}getComponentsThatCanReceiveType(e,t){o.default.deprecated("DragAndDropClient.getComponentsThatCanReceiveType has been deprecated. Use LauncherClient.getComponentsThatCanReceiveDataTypes instead."),l.default.getComponentsThatCanReceiveDataTypes({dataTypes:[e]},((n,r)=>{t(n,r&&r[e]?r[e].componentTypes:[])}))}openSharedData(e,t){p.openSharedData(e,t)}addWindowHighlight(e){const t=document.createElement("div");t.id="fsbl-share-scrim",t.className="fsbl-share-scrim";const n=document.createElement("style");n.innerHTML=g;const r=document.createElement("img");e?(r.src=m,r.className="ff-share",document.addEventListener("dragover",this.dragover),document.addEventListener("drop",this.drop)):(t.className="fsbl-share-scrim no",r.src=y,r.className="ff-delete-circle"),t.appendChild(n),t.appendChild(r),document.body.appendChild(t),this.finsembleWindow.updateOptions({options:{opacity:1}})}removeWindowHighlight(){const e=document.getElementById("fsbl-share-scrim");e&&e?.parentNode?.removeChild(e),document.removeEventListener("dragover",this.dragover),document.removeEventListener("drop",this.drop),this.finsembleWindow.updateOptions({options:{opacity:1}})}canReceiveData(e,t=null){Array.isArray(e)||(e=[e]);const n=this;let r=!1;t||(t=Object.keys(n.receivers),r=!0);for(let i=0;i<e.length;i++){const o=e[i];for(let e=0;e<t.length;e++){if(!r){if(o===t[e])return!0;continue}let i=n.receivers[t[e]];if(i.length)if(i=i[0],i.type instanceof RegExp){if(o.match(i.type))return!0}else if(o===i.type)return!0}}return!1}dragover(e){return e.preventDefault(),!1}addListeners(e){const t=this;window.addEventListener("dragend",(()=>{t.routerClient.transmit(b,{})})),this.routerClient.addListener(v,((e,t)=>{t.originatedHere()&&(h.System.isBrowserView()?this.routerClient.transmit(w,Object.keys(this.emitters)):h.System.hasBrowserView()||this.routerClient.transmit(w,t.data))})),this.routerClient.addListener(w,((e,n)=>{this.sourceData=n.data,!t.canReceiveData(this.sourceData)||n.originatedHere()?t.addWindowHighlight(!1):t.addWindowHighlight(!0)})),this.routerClient.addListener(b,(()=>{t.removeWindowHighlight()})),e(),d.default.createStore({store:"Finsemble-Share",global:!0},((e,n)=>{t.store=n}))}getFinsembleWindow(e){f.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{this.finsembleWindow=n,e()}))}}var _=new C({startupDependencies:{clients:["windowClient","distributedStoreClient"]},onReady(e=Function.prototype){i.parallel([e=>{_.addListeners(e)},e=>{u.default.onReady(e)},e=>{l.default.onReady(e)},e=>{_.getFinsembleWindow(e)}],((t,n)=>e(t,n)))},name:"dragAndDropClient"});t.default=_},8718:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(5939),o=n(2669),s=r(n(9319)),a=r(n(2551)),u=n(7063).F,l=window,c=new i.EventEmitter;function d(e,t=u){const n=[];return e.keys.forEach((e=>{if("string"!=typeof e)return a.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const r=t[e];if(!r)return a.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);n.push(r)})),n}const f=function(e){this.cb=e,this.shift=!1,this.ctrl=!1,this.cmd=!1,this.capsLock=!1,this.initialize()};f.prototype.keyup=function(e){switch(e.key){case"Shift":return this.shift=!1,void this.cb({key:e.key,e,keystroke:this});case"Control":case"Alt":return this.ctrl=!1,void this.cb({key:e.key,e,keystroke:this});case"Meta":case"Win":return this.cmd=!1,void this.cb({key:e.key,e,keystroke:this})}this.key&&this.cb({key:this.key,e,keystroke:this})},f.prototype.keydown=function(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.cb({key:e.key,e,keystroke:this})}},f.prototype.keypress=function(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)},f.prototype.initialize=function(){const e=this;document.addEventListener("keyup",(t=>{e.keyup(t)})),document.addEventListener("keydown",(t=>{e.downValue=t.key,e.keydown(t)})),document.addEventListener("keypress",(t=>{e.keypress(t)})),window.addEventListener("blur",(t=>{e.ctrl=!1,e.cb({key:"Control",e:t,keystroke:e})}))};const p=[];class h extends o._BaseClient{constructor(e){super(e),this.onClose=e=>{this.removeAllHotkeys(e)},this.keyMap=u,this.listenForHotkeys=this.listenForHotkeys.bind(this),this.routerClient=s.default,this.localListeners={}}addLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addLocalHotkey"),a.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e);const r=d({keys:e}).sort().toString(),i=()=>{document.hasFocus()&&t()};this.localListeners[r]||(this.localListeners[r]={}),this.localListeners[r][t]=i,c.addListener(r,i),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}addBrowserHotkey(e,t){this.KeyStroke||(this.KeyStroke=new f((e=>{const{key:t,keystroke:n}=e,r=[t];n.ctrl&&r.push("control"),n.shift&&r.push("shift"),n.alt&&r.push("alt"),n.cmd&&r.push("command");const i=r.sort().toString();p.forEach((e=>{const t=e.keyString.toUpperCase(),n=i.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))})));const n=d({keys:e}).sort().toString();p.push({keyString:n,handler:t})}removeLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeLocalHotkey"),a.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e);const r=d({keys:e}).sort().toString(),i=this.localListeners[r][t];c.removeListener(r,i),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}addGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addGlobalHotkey"),a.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const r=d({keys:e}).sort().join("+");c.addListener(r,t),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}removeGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeGlobalHotkey"),a.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const r=d({keys:e}).sort().join("+");c.removeListener(r,t),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}listenForHotkeys(){const e=this;this.routerClient.addListener("HotkeyTriggered",((t,n)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):n.data.windows.includes(e.windowName)&&c.emit(n.data.keys)}))}removeAllHotkeys(e){c.removeAllListeners(),this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName},e)}}const g=new h({onReady(e){g.listenForHotkeys(),e&&e()},name:"hotkeyClient"});l.Keystroke=f,t.default=g},9562:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(2669),u=s(n(5376)),l=o(n(6420)),c=s(n(3712)),d=n(1742),f=s(n(2551)),p=n(5688),h=window,g={};class m extends a._BaseClient{constructor(e){super(e),c.default.args(e,"object=")&&e&&c.default.args2("params.onReady",e.onReady,"function="),this.windowClient=e.clients.windowClient}getComponentList(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.componentList",{},((n,r)=>{e(n,r.data),t({err:n,data:r.data})}))}))}getComponentDefaultConfig(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.componentList",{},((r,i)=>{const o=i.data[e];t(r,o),n({err:r,data:o})}))}))}getMonitorInfo(e={},t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfo"),"all"===e.monitor?n.getMonitorInfoAll(t):new Promise((r=>{l.getMyWindowIdentifier((i=>{e.windowIdentifier||(e.windowIdentifier=i),n.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data),f.default.system.log("MONITOR: launcherClient.getMonitorInfo query response data",n.data),r({err:e,data:n.data})}))}))}))}getMonitorInfoAll(e=Function.prototype){return c.default.args(e,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfoAll"),new Promise(((t,n)=>{this.routerClient.query("Launcher.getMonitorInfoAll",{},((r,i)=>{r&&(n({err:r}),e(r)),t({err:r,data:i.data}),e(r,i.data)}))}))}registerComponent(e,t=Function.prototype){return new Promise((n=>{this.routerClient.query("LauncherService.registerComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))}))}unRegisterComponent(e,t=Function.prototype){return e.componentType?new Promise((n=>{this.routerClient.query("LauncherService.unRegisterComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))})):t("No componentType provided")}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,t,n){const r=this;let i=this.locatorToIdentifier(t),o=`${i.windowName}:${i.uuid}`;i.windowName||(o=i.componentType),!1!==g[o]?(n.position||(n.position="absolute"),this.showWindow(t,n,(function(t,n){if(!n)return;const{finWindow:i}=n;var s=function(){g[o]=!0,r.windowClient.isMouseOverDOMElement(e,(e=>{g[o]=!e})),i.removeEventListener("blurred",s)};i.addEventListener("blurred",s)}))):g[o]=!0}showWindow(e,t,n=Function.prototype){c.default.args(e,"object",t,"object=",n,"function=");const r=this;return t||(t={}),(t=l.clone(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e),new Promise((e=>{l.getMyWindowIdentifier((i=>{t.relativeWindow||(t.relativeWindow=i),r.routerClient.query("Launcher.showWindow",t,(async(t,r)=>{if(t)return e({err:t}),n(t);const i=r.data.windowIdentifier;r.data.windowIdentifier.name=r.data.windowIdentifier.windowName;const{wrap:o}=await p.FinsembleWindow.getInstance({name:i.windowName});r.data.finWindow=o,e({err:t,data:r.data}),n(t,r.data)}))}))}))}spawn(e,t,n=Function.prototype){const r=this;return c.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=l.clone(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),f.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`),new Promise((i=>{l.getMyWindowIdentifier((o=>{t.launchingWindow=o,r.callSpawn(t,((t,r)=>{f.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,t),i({err:t,response:r}),n(t,r)}))}))}))}callSpawn(e,t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.perf.debug("CallSpawn","start","from spawn to callback",e),new Promise((r=>{function i(e,n){t(e,n),r({err:e,data:n})}n.routerClient.query("Launcher.spawn",e,(async(e,t)=>{if(f.default.system.debug("CallSpawn","Initial launcher callback params",e,t),f.default.perf.debug("CallSpawn","Initial launcher callback",t),e)return i(e,t.data),f.default.system.error("LauncherClient.callSpawn",e);t.data.windowIdentifier.name=t.data.windowIdentifier.windowName;var r=t.data;if(r.windowDescriptor.native)return i(e,r);const o=r.windowIdentifier,{wrap:s}=await p.FinsembleWindow.getInstance({name:o.windowName});r.finWindow=s;const a=`Finsemble.${r.windowIdentifier.windowName}.componentReady`,u=n.routerClient.subscribe(a,((t,o)=>{if(t)return f.default.system.error(t);o&&0===Object.keys(o.data).length||(f.default.perf.debug("CallSpawn","stop"),i(e,r),n.routerClient.unsubscribe(u))}))}))}))}getMonitor(e,t=Function.prototype){return f.default.system.deprecated("This method is deprecated and will be removed in a future release. Method getMonitorInfo should be used instead."),c.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}getMyWindowIdentifier(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{l.getMyWindowIdentifier((n=>{e(n),t(n)}))}))}getActiveDescriptors(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.getActiveDescriptors",{},((n,r)=>{n&&f.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}getActiveAndPendingWindowNames(e=Function.prototype){return new Promise((t=>{this.routerClient.query("Launcher.getActiveAndPendingWindowNames",{},((n,r)=>{n&&f.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}async getPendingWindows(){const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return e&&f.default.system.error("Error retrieving pending windows:",e),{err:e,data:t.data}}addUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}removeUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}bringWindowsToFront(e={},t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}hyperFocus(e,t=Function.prototype){return f.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.windowList||e.groupName||e.componentType||(e.windowList=[this.myWindowIdentifier]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.hyperFocus",e),t(),Promise.resolve()}minimizeWindows(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.minimizeWindows",e),t(),Promise.resolve()}createWindowGroup(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),c.default.args(e.groupName,"string"),new Promise((n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}this.routerClient.query("LauncherService.createWindowGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}addWindowsToGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),c.default.args(e.groupName,"string"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}getGroupsForWindow(e,t=Function.prototype){return c.default.args(t,"function="),"function"==typeof e&&(t=e,e=null),new Promise((n=>{e&&e.windowIdentifier?this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,r)=>{n({err:e,data:r.data}),t(e,r.data)})):this.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}addToGroups(e,t=Function.prototype){return c.default.args(t,"function="),c.default.args(e.groupNames,"array"),e.windowIdentifier||(e.windowIdentifier=this.myWindowIdentifier),new Promise((n=>{this.routerClient.query("LauncherService.addWindowToGroups",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){const t=this;if(void 0!==h.FSBL){function n(){t.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${t.windowName}`,((e,n)=>{Array.isArray(n.data)&&t.windowClient.setComponentState({field:"finsemble:windowGroups",value:n.data})}))}h.FSBL.addEventListener("onReady",(()=>{t.windowClient.onReady((()=>{t.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{if(!e&&r)return t.addToGroups({groupNames:r},n);n()}))}))}))}setInterval((()=>{t.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName,componentType:"finsemble",isBrowserView:d.System.isBrowserView()})}),1e3),this.getMyWindowIdentifier((n=>{t.myWindowIdentifier=n,e&&e()}))}}let y;function v(e){return(e=e||{}).windowClient||(e.windowClient=u.default),new m({clients:e,onReady(e){f.default.system.debug("launcherClient ready",window.name),f.default.perf.debug("LauncherClientReadyTime","stop"),y.start(e)},name:"launcherClient"})}y=v(),y.constructInstance=v,t.default=y},8970:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(3712)),s=n(2669),a=r(n(5376)),u=r(n(9562)),l=r(n(3190)),c=r(n(2551)),d=r(n(7184));c.default.system.debug("Starting LinkerClient");const f=c.default.system.info,p=c.default.system.debug;function h(e){return e.windowName.replace(/\./g,"_")}function g(e,t){return t&&t(null,e),e}class m extends s._BaseClient{constructor(e){super(e),this.stateChangeListeners=[],this.allChannels=[],this.channels={},this.clients={},this.channelListenerList=[],this.dataListenerList={},this.handleListeners=(e,t)=>{const n=this.dataListenerList[t.data.type];if(n&&n.length>0)for(let e=0;e<n.length;e++)n[e](t.data.data,{data:t.data.data,header:t.header,originatedHere:t.originatedHere})},this.onClose=e=>{const t=h(this.windowClient.getWindowIdentifier());this.clients[t]&&(this.clients[t]=null,this.updateClientInStore(t)),this.linkerStore.removeListener({field:`clients.${t}`},this.clientsKeyValueChangeStoreListener,((e,n)=>{n||c.default.system.warn("Linker Client Onclose: clientsKeyValueChangeStoreListener removeListener failed",t)})),this.linkerStore.removeListener({field:{}},this.anyFieldChangeStoreListener,((e,t)=>{t||c.default.system.warn("Linker Client Onclose: anyFieldChangeStoreListener removeListener failed")})),c.default.system.debug("LINKER-4 cleanup",t),e&&e()},this.groups=this.channels,this.allGroups=this.allChannels,this.onLinksUpdate={push:e=>{this.stateChangeListeners.push(((t,n)=>{n&&(n.groups=n.channels),e(t,{groups:n})}))}},this.linkerWindow=null,this.loading=!1,o.default.args(e,"object=")&&e&&o.default.args2("params.onReady",e.onReady,"function="),this.launcherClient=e.clients.launcherClient,this.windowClient=e.clients.windowClient,this.distributedStoreClient=e.clients.distributedStoreClient,this.clientsKeyValueChangeStoreListener=this.clientsKeyValueChangeStoreListener.bind(this),this.anyFieldChangeStoreListener=this.anyFieldChangeStoreListener.bind(this)}getChannel(e){return this.allChannels.filter((t=>t.name===e)).length>0}createChannel(e,t){return c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.createChannel","PARAMS",e),o.default.args(e,"object"),e.name?this.getChannel(e.name)?(p(`LinkerClient.createChannel: Channel ${e.name} Already Exists`),g(this.allChannels,t)):(this.allChannels.push(e),this.allGroups=this.allChannels,this.linkerStore.setValue({field:"channels",value:this.allChannels}),g(this.allChannels,t)):(p("LinkerClient.createChannel: Name is required"),g(this.allChannels,t))}removeChannel(e,t){if(f("LinkerClient.removeChannel","NAME",e),c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),o.default.args(e,"string"),!this.getChannel(e))return p(`Channel ${e}does not exist`,null),g(this.allChannels,t);const n=this.allChannels;for(let t=0;t<n.length;t++)if(e===n[t].name){n.splice(t,1);break}this.linkerStore.setValue({field:"channels",value:this.allChannels});const{clients:r}=this;for(const t in r){const n=r[t];for(const t in n.channels)if(e===t){delete n[t];break}}return this.linkerStore.setValue({field:"clients",value:this.clients}),g(this.allChannels,t)}updateClientInStore(e){this.linkerStore.setValue({field:`clients.${e}`,value:this.clients[e]})}linkToChannel(e,t,n){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.linkToChannel","CHANNEL",e,"COMPONENT",t),o.default.args(e,"string",t),t||(t=this.windowClient.getWindowIdentifier());const r=h(t);if(this.clients[r]||(this.clients[r]={client:t,channels:{}}),Array.isArray(e))for(let t=0;t<e.length;t++)this.clients[r].channels[e[t]]=!0;else this.clients[r].channels[e]=!0;return this.updateClientInStore(r),g(this.getState(t),n)}unlinkFromChannel(e,t,n){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unlinkFromChannel","CHANNEL",e,"WINDOW IDENTIFIER",t),o.default.args(e,"string",t),t||(t=this.windowClient.getWindowIdentifier());const r=h(t),i=this.clients[r];if(Array.isArray(e))for(let t=0;t<e.length;t++)delete i.channels[e[t]];else if(e){if(!i||!i.channels[e]){const i=this.clients[r];return p(`Component was not in specified channel ${e}`,i,i.channels[e]),g(this.getState(t),n)}delete i.channels[e]}else for(const e in i.channels)delete i.channels[e];return this.updateClientInStore(r),g(this.getState(t),n)}getAllChannels(e){return f("LinkerClient.getAllChannels"),g(this.allChannels,e)}getState(e,t){c.default.system.warn("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.getState","WINDOW IDENTIFIER",e);const n={channels:[],allChannels:this.allChannels};if(e||(e=this.windowClient.getWindowIdentifier()),!Object.keys(this.clients).length)return g(n,t);const r=h(e),i=this.clients[r];return i?(n.channels=this.allChannels.filter((e=>i.channels&&!0===i.channels[e.name])),c.default.system.debug("LINKER-3",this.allChannels,"state.channels",n.channels,"key",r,"windowIdentifier",e,"componentEntry",i),i.active||(i.active=!0,this.linkerStore.setValue({field:`clients.${r}`,value:i})),g(n,t)):g(n,t)}unsubscribe(e,t){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unsubscribe","DATA TYPE",e),o.default.args(e,"string"),this.dataListenerList[e]&&(t?this.dataListenerList[e]=this.dataListenerList[e].filter((e=>e!==t)):delete this.dataListenerList[e])}publish(e,t){f("LinkerClient.publish","PARAMS",e),o.default.args(e.dataType,"string",e.data,"any");let{channels:n}=e;n||(n=Object.keys(this.channels));for(let t=0;t<n.length;t++){const r=n[t];this.routerClient.transmit(`${r}.${e.dataType}`,{type:e.dataType,data:e.data}),this.routerClient.transmit(r,{type:e.dataType,data:e.data})}return g({},t)}subscribe(e,t){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.subscribe","DATA TYPE",e),o.default.args(e,"string",t,"function"),this.dataListenerList[e]?this.dataListenerList[e].includes(t)||this.dataListenerList[e].push(t):this.dataListenerList[e]=[t]}getLinkedComponents(e,t){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.getLinkedComponents","PARAMS",e);const n=[];if(e||(e={}),e.channels&&!Array.isArray(e.channels)&&(o.default.args(e.channels,"string"),e.channels=[e.channels]),e.componentTypes&&!Array.isArray(e.componentTypes)&&(o.default.args(e.componentTypes,"string"),e.componentTypes=[e.componentTypes]),e.componentTypes&&o.default.args(e.componentTypes,"array"),e.windowIdentifier){const t=h(e.windowIdentifier),n=Object.keys(this.clients[t].channels);e.channels?e.channels=e.channels.filter((e=>n.includes(e))):e.channels=n}e.channels||(e.channels=this.getAllChannels().map((e=>e.name)));for(const t in this.clients){let r=this.clients[t];if(!r)continue;r.channels||(r=r[Object.keys(r)[0]]);const i=Object.keys(r.channels).filter((t=>e?.channels?.includes(t))).length;let o=!0;e.componentTypes&&(o=e.componentTypes.includes(r.client.componentType)),r.active&&i&&o&&n.push({windowName:r.client.windowName,componentType:r.client.componentType,uuid:r.client.uuid,channels:Object.keys(r.channels)})}return g(n,t)}updateListeners(){for(let e=this.channelListenerList.length-1;e>=0;e--){const t=this.channelListenerList[e];Object.keys(this.channels).filter((e=>e==t)).length||(this.routerClient.removeListener(t,this.handleListeners),this.channelListenerList.splice(e,1))}const e=Object.keys(this.channels);for(let t=0;t<e.length;t++){const n=e[t];this.channelListenerList.includes(n)||(this.routerClient.addListener(n,this.handleListeners),this.channelListenerList.push(n))}const t=this.getState();for(let e=0;e<this.stateChangeListeners.length;e++)this.stateChangeListeners[e](null,t)}onStateChange(e){this.stateChangeListeners.push(e)}persistState(e){console.info("saving state",e),this.windowClient.setComponentState({field:"Finsemble_Linker",value:e})}clientsKeyValueChangeStoreListener(e,t){if(p("My Channels Updated"),!t.value)return;const n=t.value.channels||t.value.groups,r=d.default(n,this.channels);n&&!r&&(this.persistState(n),this.channels=n,this.updateListeners())}anyFieldChangeStoreListener(e,t){const{values:n}=t.value;this.allChannels=n.channels,n.groups&&(this.allChannels=n.groups),c.default.system.debug("LINKER-2",this.allChannels),this.allGroups=this.allChannels,this.clients=n.clients}start(e){this.dontPersistYet=!0,p("LinkerClient Loading Channels");const t=this.windowClient.getWindowIdentifier(),n=h(t);this.distributedStoreClient.getStore({store:"Finsemble_Linker",global:!0},((r,i)=>{this.linkerStore=i,i.getValues(["channels",`clients.${n}`],((r,i)=>{i&&i.channels&&(this.allChannels=i.channels,c.default.system.debug("LINKER-1",this.allChannels),this.allGroups=this.allChannels),this.windowClient.getComponentState({field:"Finsemble_Linker"},((r,o)=>{this.channels=[],this.clients[n]={client:t,active:!0,channels:{}},o?(this.channels=o,this.clients[n].channels=o):i[`clients.${n}`]?.channels&&(this.clients[n].channels=i[`clients.${n}`].channels),this.updateClientInStore(n);const s=this.windowClient.getSpawnData();if(s&&s.linker){let e=s.linker.channels;s.linker.groups&&(e=s.linker.groups),this.linkToChannel(e,t)}else this.updateListeners();e()}))})),i.addListener({field:`clients.${n}`},this.clientsKeyValueChangeStoreListener),i.addListener({},this.anyFieldChangeStoreListener)}))}hyperFocus(e){this.launcherClient.hyperFocus({windowList:this.getLinkedComponents({channels:e})})}bringAllToFront(e){const{channel:t,restoreWindows:n}=e;this.launcherClient.bringWindowsToFront({restoreWindows:n,windowList:this.getLinkedComponents({channels:t})})}createGroup(e,t){return this.createChannel(e,t)}deleteGroup(e,t){return this.removeChannel(e,t)}addToGroup(e,t,n){const r=this.linkToChannel(e,t);return n&&n(null,r),r}removeFromGroup(e,t,n){const r=this.unlinkFromChannel(e,t);return n&&n(null,r),r}getAllGroups(e){const t=this.getAllChannels();return e&&e(t),t}getGroups(e,t){const n=this.getState(e);return n.groups=n.channels,g(n,t)}unSubscribe(e,t){this.unsubscribe(e,t)}getLinkedWindows(e,t){return e||(e={}),e.groups=e.channels,e.windowIdentifier=e.client,this.getLinkedComponents(e,t)}windowIdentifier(e,t){return g(this.windowClient.getWindowIdentifier(),t)}openLinkerWindow(e){if(o.default.args(e,"function"),this.loading)return;const t=()=>{this.routerClient.query("Finsemble.LinkerWindow.Show",{groups:this.getGroups().groups,windowIdentifier:this.windowClient.getWindowIdentifier(),windowBounds:this.windowClient.getWindowBounds()},(()=>{}))};this.linkerWindow?this.linkerWindow.isShowing((e=>{e?this.linkerWindow.hide():t()})):t()}}function y(e){return(e=e||{}).windowClient||(e.windowClient=a.default),e.launcherClient||(e.launcherClient=u.default),e.distributedStoreClient||(e.distributedStoreClient=l.default),new m({clients:e,startupDependencies:{clients:["windowClient","distributedStoreClient","launcherClient"]},onReady(t){p("Linker onReady"),setTimeout((()=>{i.parallel([e=>{v.start(e)},t=>{e.launcherClient.onReady(t)}],t)}),0)},name:"linkerClient"})}const v=y();v.constructInstance=y,t.default=v},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalLogger=void 0;const{debug:n,warn:r,log:i,error:o}=console,s=()=>{},a=s,u={warn:r,info:s,log:i,debug:n,error:o,verbose:a,deprecated:o},l={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},c={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:l,system:l,perf:l};function d(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=d,this.setting=()=>c,this.callStack=()=>function(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}(),this.unregisterClient=()=>{},this.setRouterClient=()=>{},this.warn=r,this.info=s,this.log=i,this.debug=n,this.error=o,this.verbose=a,this.system=u,this.perf=u,this.deprecated=o}}},2551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerConstructor=void 0;const r=n(1742),i=n(5729),o=n(6925),s={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1},a={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},u=n(8172);t.LoggerConstructor=function(e){const i=this;let l;i.RouterClient=e&&e.RouterClient;let c=!1,d=!1;const f=i;let p,h,g=0,m=0;this.startupTime=0;let y=[];if("undefined"==typeof window)return;let v=r.System.Window.getCurrent().name;window.top!==window&&(v=`${v}.Frame`),this.onLogStateChangeCallback=[];let w={console:a,dev:s,system:s,perf:s};function b(e,t,n){this.category=e,!l&&r.System.isBrowserView()&&(l=r.System.getViewId()),this.logClientName=l?`${v}: view-${l}`:v,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+g}function S(e,t){e&&e.dev&&(w=e,i.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){f.system.debug("Logger updateQueueBasedOnState",e,g,"QUEUE LENGTH",y.length,w);const t=[];for(let n=0,{length:r}=y;n<r;n++)if(w[y[n].category][y[n].logType]&&!w[y[n].category].LocalOnly)e&&(y[n].logTimestamp=y[n].logTimestamp+g),t.push(y[n]);else if(w[y[n].category][y[n].logType]&&w[y[n].category].LocalOnly){const e=y[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}y=t}(t)}function C(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}this.onStateChanged=e=>{-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)},this.setClientName=function(e){console.error("logger.setClientName() is deprecated"),v=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),v},this.clearMessageList=function(){y=[]},this.callStack=function(){return C()},this.setting=function(){return w};const _=console.error,L=console.warn,A=console.info,E=console.log,I=console.debug;function O(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?O(t):t)),[])}function T(e,t){try{e.apply(console,O(t))}catch(e){(t=[]).push(C())}}let M=()=>{y.length>0&&(i.RouterClient.transmit("logger.service.logMessages",y),f.clearMessageList())};function D(e,n,r){let i,o=!1,s=!0;"forceObjectsToLogger"===r[0]&&(o=!0,s=!1,r.splice(0,1)),r=r.map((e=>s&&function(e){const t=[],n=[e];let r=0,i=0;for(;n.length&&i<1e3;){i++;const e=n.pop();if("boolean"==typeof e)r+=4;else if("string"==typeof e)r+=2*e.length;else if("number"==typeof e)r+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return r}(e)>5e4?(T(A,["Message too large to send to the logger.",r]),"Log argument greater than 50KB. Check local Console to see output of the object."):e));try{for(let e=0;e<r.length;e++)r[e]instanceof Error&&(r[e]=r[e].toString());i=new b(e,n,JSON.stringify(r))}catch(t){r.splice(0,r.length),r.push(C()),i=new b(e,n,`*** Logging Error: ${JSON.stringify(r)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(i)?function(e){if(y.length<2e4)y.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",y.length);let e,n=0;for(;e=y.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(i):++m<=5&&T(A,[`"Filtered Logger Message (${m} of first 5 shown)`,i]),d&&M()}function k(){const{windowName:e}=o.Startup.getInstance().getStartupData();v=e,window.top!==window&&(v=`${v}.Frame`);const t=`finsemble.logger.client.${v}`;!l&&r.System.isBrowserView()&&(l=r.System.getViewId()),f.system.debug("logger.service.registering",v),r.System.Window.getCurrent().getOptions((n=>{const r=n?.customData?.component?.centralLoggerNamePrefix;i.RouterClient.query("logger.service.register",{clientName:v,clientChannel:t,windowName:e,viewId:l,centralLoggerNamePrefix:r},((e,t)=>{if(e)setTimeout(k,750);else{for(const e of y)e.viewId=l;d=!0,f.system.debug("logger.service.registered"),p=t.data,"routerService"!==v?(g=h,S(p,!0)):S(p,!1),D("system","Debug",["Logger Registered"]),M()}}))})),i.RouterClient.addListener(t,((e,t)=>{f.system.debug("logger.client.setLogState",t.data),p=t.data,S(p,!1)}))}M=u(M,"routerService"===v?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),w.dev.Error&&!w.dev.LocalOnly&&D("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),T(_,e)},this.warn=function(){if(w.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),w.dev.Warn&&!w.dev.LocalOnly&&D("dev","Warn",e),w.dev.Warn&&w.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),T(L,e))}},this.info=function(){if(w.dev.Info){const e=Array.prototype.slice.call(arguments);w.dev.Info&&!w.dev.LocalOnly&&D("dev","Info",e),w.dev.Info&&w.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),T(A,e))}},this.log=function(){if(w.dev.Log){const e=Array.prototype.slice.call(arguments);w.dev.Log&&!w.dev.LocalOnly&&D("dev","Log",e),w.dev.Log&&w.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),T(E,e))}},this.debug=function(){if(w.dev.Debug){const e=Array.prototype.slice.call(arguments);w.dev.Debug&&!w.dev.LocalOnly&&D("dev","Debug",e),w.dev.Debug&&w.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),T(I,e))}},this.verbose=function(){if(w.dev.Verbose){const e=Array.prototype.slice.call(arguments);w.dev.Verbose&&!w.dev.LocalOnly&&D("dev","Verbose",e),w.dev.Verbose&&w.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),T(I,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),w.system.Error&&!w.system.LocalOnly&&D("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),T(_,e)},this.system.warn=function(){if(w.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),w.system.Warn&&!w.system.LocalOnly&&D("system","Warn",e),w.system.Warn&&w.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),T(L,e))}},this.system.info=function(){if(w.system.Info){const e=Array.prototype.slice.call(arguments);w.system.Info&&!w.system.LocalOnly&&D("system","Info",e),w.system.Info&&w.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),T(A,e))}},this.system.log=function(){if(w.system.Log){const e=Array.prototype.slice.call(arguments);w.system.Log&&!w.system.LocalOnly&&D("system","Log",e),w.system.Log&&w.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),T(E,e))}},this.system.debug=function(){if(w.system.Debug){const e=Array.prototype.slice.call(arguments);w.system.Debug&&!w.system.LocalOnly&&D("system","Debug",e),w.system.Debug&&w.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),T(I,e))}},this.system.verbose=function(){if(w.system.Verbose){var e=Array.prototype.slice.call(arguments);w.system.Verbose&&!w.system.LocalOnly&&D("system","Verbose",e),w.system.Verbose&&w.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),T(I,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),w.perf.Error&&!w.perf.LocalOnly&&D("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),T(_,e)},this.perf.warn=function(){if(w.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),w.perf.Warn&&!w.perf.LocalOnly&&D("perf","Warn",e),w.perf.Warn&&w.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),T(L,e))}},this.perf.info=function(){if(w.perf.Info){const e=Array.prototype.slice.call(arguments);w.perf.Info&&!w.perf.LocalOnly&&D("perf","Info",e),w.perf.Info&&w.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),T(A,e))}},this.perf.log=function(){if(w.perf.Log){const e=Array.prototype.slice.call(arguments);w.perf.Log&&!w.perf.LocalOnly&&D("perf","Log",e),w.perf.Log&&w.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),T(E,e))}},this.perf.debug=function(){if(w.perf.Debug){const e=Array.prototype.slice.call(arguments);w.perf.Debug&&!w.perf.LocalOnly&&D("perf","Debug",e),w.perf.Debug&&w.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),T(I,e))}},this.perf.verbose=function(){if(w.perf.Verbose){const e=Array.prototype.slice.call(arguments);w.perf.Verbose&&!w.perf.LocalOnly&&D("perf","Verbose",e),w.perf.Verbose&&w.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),T(I,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){f.system.debug("logger.service.unregister",v,e,l),M();const n=e||{clientName:v,viewId:l};i.RouterClient.query("logger.service.unregister",n,t)},this.isLogMessage=function(e){return"logger.service.logMessages"===e},this.status="offline",this.setRouterClient=e=>{this.RouterClient=e},this.start=function(){let e;this.startupTime=performance.now(),i.RouterClient||(console.log("No instance of the RouterClient found for this instance of the Logger. Dynamically requiring it."),i.RouterClient=n(9319).default);const t=()=>{e=i.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(i.status="online",f.system.debug("Logger onReady",v),i.RouterClient.calibrateTimeWithRouterService((e=>{h=e,c||(i.startupTime=performance.now()-i.startupTime,k(),c=!0)})),i.RouterClient.unsubscribe(e))}))};"routerService"===window.name?i.RouterClient.query("logger.service.register",{},(e=>{e?setTimeout(t,750):t()})):i.RouterClient.onReady(t),r.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{i.unregisterClient()}))}},t.Logger="undefined"!=typeof window?new t.LoggerConstructor:new i.LocalLogger,t.default=t.Logger},2807:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationClient=t.ActionTypes=t.ROUTER_NAMESPACE=void 0;const i=n(2283);Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return i.ActionTypes}});const o=r(n(5320)),s=r(n(2521)),a=r(n(631)),u=r(n(5016)),l=n(4232),c=n(2669),d=r(n(10)),f=r(n(5376)),p=r(n(9562)),h=r(n(3014)),g="notification.",m="unsubscribe";t.ROUTER_NAMESPACE={ACTION_PREFIX:"notification.action."};class y extends c._BaseClient{constructor(e){super(e),this.subscriptions=[],this.Notification=o.default,this.ActionTypes=i.ActionTypes,this.Subscription=s.default,this.Action=a.default,this.Filter=u.default,this.actionTypes=i.ActionTypes,this.publicEventManager=new h.default({name:"notificationClient",sourceType:"notification"})}async applyOverrides(){const{data:e}=await d.default.getValue("finsemble.servicesConfig.notifications.applyNotificationOverrides");if(!e)return;const t=f.default.getWindowIdentifier().windowName,{data:n}=await p.default.getActiveDescriptors(),r=Object.keys(n).filter((e=>e===t)).map((e=>n[e]));let i,o="Unknown Source";function s(e,t){const{componentType:n}=f.default.getWindowIdentifier();t.finsembleSource=o,v.notify(JSON.parse(JSON.stringify({title:e,options:t})))}1!==r.length?this.logger.warn("Unable to fetch component to extract type or display name"):(i=r[0],o=i.customData?.component?.displayName||i.componentType);const a=window.Notification;s.requestPermission=a.requestPermission.bind(a),Object.defineProperty(s,"permission",{get:function(){return a.permission}}),window.Notification=s}setup(){window&&window.addEventListener&&window.addEventListener("unload",(()=>{this.unsubscribeAll()}))}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}query(e,t,n,r){return new Promise((async(i,o)=>{try{null==n&&(n=g),this.logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.routerClient.query(n+e,t,(()=>{}));s.err?(this.logger.system.error("Error: ",s.err),o(s.err)):(this.logger.system.log(`${e} raw response: `,s),r&&r(null,s.response.data.data),i(s.response.data.data))}catch(e){this.logger.system.error("Error: ",e),r&&r(e),o(e)}}))}async fetchHistory(e,t){return this.logger.system.info("FetchHistory() called with params: ",e,t),await this.query("fetch_history",{options:e,filter:t})}async getLastIssuedAt(e){return this.logger.system.info("getLastIssued called with params: ",e),await this.query("last_issued",e)}async performAction(e,t){return this.logger.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await this.query("perform_action",{notifications:e,action:t})}async markRead(e){this.logger.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_read",{notifications:e,isRead:!0})}async markUnread(e){this.logger.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_unread",{notifications:e,isRead:!1})}deleteNotifications(e){return this.logger.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(this.query("delete",e))}catch(e){n(e)}}))}async notify(e){this.logger.system.info("notify() called with params: ",e);try{await this.query("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await l.sleep(500),await this.notify(e)}}async subscribe(e,t){this.logger.system.info("subscribe() called with params: ",e,t);const n=await this.query("subscribe",JSON.parse(JSON.stringify(e)));return this.logger.system.info("Got a return value containing a channel",n),await this.monitorChannel(n.channel,t),this.subscriptions.push(n),n}async unsubscribe(e){this.logger.system.info("unsubscribe() called with params: ",e),await this.query(m,e),this.cleanupSubscription(e)}removeResponder(e,t){null==t&&(t=g),this.routerClient.removeResponder(t+e)}unsubscribeAll(){this.logger.system.info("unsubscribeAll() called"),this.subscriptions.forEach((e=>{this.query(m,e.id).then(),this.removeResponder(e.id)})),this.subscriptions=[]}async mute(e){return this.logger.system.info("mute() called with params: ",e),await this.query("mute",{filter:e})}async unmute(e){return this.logger.system.info("unmute() called with params: ",e),await this.query("unmute",{filter:e})}async getSources(){return this.logger.system.info("getSources() called"),await this.query("sources",{})}async getMuteFilters(){return this.logger.system.info("getSources() called"),await this.query("mute_filters",{})}async getPreferences(){return this.logger.system.info("getPreferences() called"),await this.query("preferences",{})}cleanupSubscription(e){const t=this.subscriptions.findIndex((t=>t.id===e));t>-1&&(this.removeResponder(this.subscriptions[t].channel),this.subscriptions.splice(t,1))}addResponder(e,t,n){null==n&&(n=g),this.logger.system.info(`Adding responder for endpoint: ${n+e}`),this.routerClient.addResponder(n+e,((n,r)=>{if(this.logger.system.info(`Message received on ${e}: `,r),n)this.logger.system.error(`Failed to setup ${e} responder`,n);else try{this.logger.system.info(`Processing message on channel ${e}: `,r);const n=t(r.data);this.logger.system.info(`Message response on ${e}: `,n),r.sendQueryResponse(null,{status:"success",data:n})}catch(n){this.logger.system.error("Failed to process query",n),r.sendQueryResponse(n)}}))}monitorChannel(e,t){return new Promise((n=>{this.logger.system.info("Listening for messages on channel",e),this.addResponder(e,(e=>{this.logger.system.info("Notification received: ",e.id);try{t(e)}catch(e){this.logger.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})),n()}))}}t.NotificationClient=y;const v=new y({onReady:function(e){v.applyOverrides(),v.setup(),this.logger.system.log("notificationClient Online"),e()},name:"notificationClient"});t.default=v},568:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClientConstructor=void 0;const i=r(n(2369)),o=r(n(3712)),s=r(n(3699)),a=n(1742),u=n(2551),l=n(6192),c=n(5729),d=n(586),f=[];let p=u.Logger;function h(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?h(e[n],null):t[n];return t}t.RouterClientConstructor=function(){let e,t;const n={},r={},u={},g={},m={},y={},v={},w={},b={},S={};let C,_=null,L=!1;const A=[];function E(){this.header={origin:C,type:"initialHandshake"}}function I(e,t){this.header={origin:C,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function O(e){this.header={origin:C,type:"addListener",channel:e}}function T(e,t,n){this.header={origin:C,type:"transmit",channel:e},this.data=t,this.options=n}function M(e){this.header={origin:C,type:"removeListener",channel:e}}function D(e){this.header={origin:C,type:"addResponder",channel:e}}function k(e,t,n){this.header={origin:C,type:"query",queryID:e,channel:t},this.data=n}function N(e,t,n){this.header={origin:C,type:"queryResponse",queryID:e,error:t},this.data=n}function j(e){this.header={origin:C,type:"removeResponder",channel:e}}function R(e,t){this.header={origin:C,type:"subscribe",subscribeID:e,topic:t}}function P(e,t){this.header={origin:C,type:"unsubscribe",subscribeID:e,topic:t}}function W(e,t){this.header={origin:C,type:"publish",topic:e},this.data=t}function F(e,t,n,r){this.header={origin:C,type:"notify",subscribeID:e,topic:t,error:n},this.data=r}function x(e,t,n){this.header={origin:C,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:C,type:"removePubSubResponder",topic:e}}function $(e){_?_.send(e):(p.system.info("RouterClient: Queuing message since router initialization not complete",e),f.push(e))}function U(){return this.header.origin===this.header.lastClient}function z(e,t){p.system.info("RouterClient: outgoing query response","CHANNEL",this.header.channel,"RESPONSE DATA",t,"QUERY ID",this.header.queryID),$(new N(this.header.queryID,e,t))}function H(e,t){const n=e[t.header.channel];void 0===n?p.system.warn(`RouterClient: no query responder define on channel ${t.header.channel} incoming from ${t.header.origin}`,t):t.header.error?(p.system.warn("RouterClient: queryResponder error",t),n(t.header.error,null),delete e[t.header.channel]):(t.originatedHere=U,t.sendQueryResponse=z.bind(t),p.system.info("RouterClient: incoming query","CHANNEL",t.header.channel,"FROM",t.header.origin,"QUERY MESSAGE",t),n(null,t))}function q(e,t){if(e)p.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{g[this.header.topic]=t;const n=y[this.header.topic];if(void 0!==n)for(let r=0;r<n.length;r++)p.system.info("RouterClient: sending pubsub notify","TOPIC",this.header.topic,"NOTIFY DATA",t),$(new F(n[r],this.header.topic,e,t))}}function V(e,t){var n,r,i;(function(e){let t=!1;return void 0===e&&(t=!0),t})(t)||$(new F(this.header.subscribeID,this.header.topic,e,t)),e?p.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",this.header.topic,"MESSAGE",this):(n=y,r=this.header.topic,i=this.header.subscribeID,r in n?n[r].push(i):n[r]=[i],p.system.info("RouterClient: incoming subscription added","TOPIC",this.header.topic,"MESSAGE",this))}function G(){!function(e,t,n){let r=!1;if(t in e){const i=y[t];for(let o=0;o<i.length;o++)if(n===i[o]){i.splice(o,1),0===i.length&&delete e[t],r=!0,p.system.info("RouterClient: PubSub removeListener","TOPIC",t,"FROM",n);break}}r||p.system.warn(`RouterClient: tried to remove non-existent listener on ${t} from ${JSON.stringify(n)}`)}(y,this.header.topic,this.header.subscribeID)}function Y(i){switch(p.system.verbose("Incoming Message Type",i.header.type,i),i.header.type){case"transmit":!function(e,t){const n=e[t.header.channel]||[],r=[];if(Array.isArray(n)&&0!==n.length){t.originatedHere=U,n.forEach((e=>{r.push(e)}));for(let e=0;e<r.length;e++)p.isLogMessage(t.header.channel)||p.system.info("RouterClient: incoming transmit","CHANNEL",t.header.channel,"FROM",t.header.origin,"MESSAGE",t),r[e](null,t)}else p.system.warn(`RouterClient: no listener for incoming transmit on channel ${t.header.channel} from ${t.header.origin}`,t)}(n,i);break;case"query":H(r,i);break;case"queryResponse":!function(e,t){const n=e[t.header.queryID];void 0===n?p.system.warn("RouterClient: no handler for incoming query response","QUERY ID",t.header.queryID):(function(e,t){const n=e[t];void 0!==n&&clearTimeout(n)}(S,t.header.queryID),t.header.error?(p.system.debug("RouterClient: incoming queryResponse error",t.header,"QUERY ID",t.header.queryID),n(t.header.error,t)):(p.system.info("RouterClient: incoming query response","RESPONSE MESSAGE",t,"QUERY ID",t.header.queryID),n(null,t)),delete e[t.header.queryID])}(b,i);break;case"notify":!function(e,t){const n=e[t.header.subscribeID];void 0===n?p.system.warn("RouterClient: no subscription handler defined for incoming notify for subscriberID",t.header.subscribeID,t):t.header.error?(p.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(t.header.error,t)):(t.originatedHere=U,p.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(v,i);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in m)if(m[n].test(e.header.topic)){t=u[n];break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e):(e.sendNotifyToAllSubscribers=q,t.publishCallback?(p.system.info("RouterClient: incoming PubSub publish callback invoked","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),t.publishCallback(null,e)):(p.system.info("RouterClient: incoming PubSub publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),e.sendNotifyToAllSubscribers(null,e.data)))}(i);break;case"subscribe":!function(e){p.system.info("RouterClient: PubSub subscribe","TOPIC",e.header.topic);let t=u[e.header.topic];if(void 0===t)for(const n in m)if(m[n].test(e.header.topic)){t=u[n];let r=g[e.header.topic];void 0===r&&(r=g[n]),g[e.header.topic]=r;break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming subscribe",e):e.header.error?p.system.warn(`RouterClient: pubsub error received from router service: ${JSON.stringify(e.header.error)}`):(e.sendNotifyToSubscriber=V,t.subscribeCallback?(e.data=g[e.header.topic],t.subscribeCallback(null,e)):e.sendNotifyToSubscriber(null,g[e.header.topic]))}(i);break;case"unsubscribe":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in m)if(m[n].test(e.header.topic)){t=u[n];break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e):(e.removeSubscriber=G,t.unsubscribeCallback?(p.system.info("RouterClient: incoming unsubscribe callback","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),t.unsubscribeCallback(null,e)):(p.system.info("RouterClient: incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),e.removeSubscriber()))}(i);break;case"timeCalibration":const o=()=>{t?t(i):setTimeout((()=>{o()}),10)};o();break;case"initialHandshakeResponse":e()}}function Q(e,t){t.header.lastClient=C,t.header.incomingTransportInfo=e,Y(t)}this.startupTime=0,this.notificationURL="";const K=(t,n,r)=>{let o,a;p.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,l,c,d,h=!1,g=0;const m=t=>{a=0,p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),_=t,e=d,c(),o=setInterval(c,200)};u=e=>{p.system.error("RouterClientError",e)};const y=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),i.default.getTransport(t,n,Q,C,"RouterService").then(m).catch(u)};l=()=>{if(clearInterval(o),g++,g<=3)p.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",g,t),y();else{const e="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";p.system.error(e,t),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",e,{url:this.notificationURL})}},c=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),$(new E),a++>50&&l()},d=()=>{if(!h){if(p.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${C} with transport ${_.identifier()}`),h=!0,clearInterval(o),f)for(let e=0;e<f.length;e++){p.system.debug("RouterClient: firing queued msg");const t=f[e];_.send(t)}r&&r()}},y()};function J(){return`${C}.${d.v4()}`}function Z(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}this.calibrateTimeWithRouterService=function(e){let n,r=0,i=1/0;t=function(t){r++,r>5?function(t){let r=0;for(let e=1;e<5;e++){const o=t.clientBaseTime[e-1],s=t.clientBaseTime[e]-o,a=t.serviceBaseTime[e-1]-(o+s/2);s<i&&(i=s,n=a),r+=a,p.system.debug("calibrationCalculation Intermediate Values","lastRRT",s,"lastOffset",a,"fastestOffset",n,"fastestRRT",i)}r/=4,p.system.debug("RouterClient calibrationCalculation","Average Offset",r,"Chosen FastestOffset",n,t),e(n)}(t):(t.clientBaseTime.push(l.Globals.performance.timing.navigationStart+l.Globals.performance.now()),$(new I(t.clientBaseTime,t.serviceBaseTime)))},t(new I([],[]))},this.onReady=e=>new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};L?n():A.push(n)})),this.addListener=function(e,t){p.system.info("RouterClient.addListener","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];return void 0===i||0===i.length?(e[t]=[n],r=!0):i.push(n),r}(n,e,t)&&$(new O(e))},this.transmit=function(e,t,n={suppressWarnings:!1}){p.isLogMessage(e)||p.system.info("RouterClient.transmit","TO CHANNEL",e,"EVENT",t),o.default.args(e,"string",t,"any"),$(new T(e,t,n))},this.removeListener=function(e,t){p.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];if(void 0!==i){const e=i.indexOf(n);e>-1?(i.splice(e,1),0===i.length&&(r=!0)):p.system.warn(`no listener defined for channel: ${t}`)}return r}(n,e,t)&&$(new M(e))},this.addResponder=(e,t)=>{if(p.system.info("RouterClient.addResponder","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;return void 0===e[t]&&(e[t]=n,r=!0),r}(r,e,t))$(new D(e));else{const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;p.system.warn(n),t(n,null)}},this.query=(e,t,n,r)=>{const i=`${J()}.${e}`,s=window.performance.timing.navigationStart+window.performance.now(),a=window.performance.timing.navigationStart,u=window.performance.now();return p.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u}),r||(r=n,n={timeout:2e4}),o.default.args(e,"string",t,"any=",n,"object=",r,"function"),n=n||{},o.default.args2("params.timeout",n.timeout,"number"),new Promise((function(o){b[i]=(l,c)=>{o({err:l,response:c}),"function"==typeof r?r(l,c):p.system.warn("No response event handler passed to RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u})},l.Globals.runningInFSBLUnitTest||function(e,t,n,r){r>0&&(e[t]=setTimeout((()=>{p.system.warn(`RouterClient: timeout waiting on query response on channel ${n} for queryID ${t} on timer ${e[t]} timeout=${r}`)}),r))}(S,i,e,n.timeout),$(new k(i,e,t))}))},this.removeResponder=e=>{p.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),Z(r,e)&&$(new j(e))},this.addPubSubResponder=(e,t,n,r)=>{let i,s;p.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),o.default.args(e,"any",t,"object=",n,"object="),n=n||{},o.default.args2("params.subscribeCallback",n.subscribeCallback,"function=","params.publishCallback",n.publishCallback,"function=")&&o.default.args2("params.unsubscribeCallback",n.unsubscribeCallback,"function="),void 0===n.subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback?(t=t||{},$(new x(e.toString(),t,!0)),s="success"):!function(e,t,n,r){let i=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(m[e.toString()]=e,p.system.info(`RouterClient: PubSub RegEx added for topic ${e.toString()}`)),u[e.toString()]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:r},i=!0),i}(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)?(i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,p.system.error(i)):(t=t||{},g[e.toString()]=h(t),$(new x(e.toString(),t,!1)),s="success"),r&&r(i,s)},this.removePubSubResponder=e=>{p.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any"),Z(u,e)?(delete g[e.toString()],delete m[e.toString()],$(new B(e))):p.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)},this.subscribe=(e,t)=>{p.system.info("RouterClient.subscribe","TOPIC",e),o.default.args(e,"string",t,"function");const n=J();return function(e,t,n,r){e[t]=n,w[t]=r}(v,n,t,e),$(new R(n,e)),{subscribeID:n,topic:e}},this.publish=(e,t)=>{p.system.info("RouterClient.publish","TOPIC",e,"EVENT",t),o.default.args(e,"string",t,"any"),$(new W(e,t))},this.unsubscribe=e=>{p.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e),o.default.args(e,"object")&&o.default.args2("subscribeIDStruct.subscribeID",e.subscribeID,"string"),!function(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}(v,e.subscribeID)?p.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):$(new P(e.subscribeID,e.topic))},this.trustedMessage=function(e){let t=!0;return p.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t},this.disconnectAll=function(){p.system.info("RouterClient.disconnectAll");for(const e in n)p.system.debug(`RouterClient.disconnectAll is removing listener on ${e}`),$(new M(e)),delete n[e];for(const e in r)p.system.debug(`RouterClient.disconnectAll is removing responder on ${e}`),$(new j(e)),delete r[e];for(const e in u)p.system.debug(`RouterClient.disconnectAll is removing pubsub responder on ${e}`),$(new B(e)),delete u[e.toString()],delete g[e.toString()],delete m[e.toString()];for(const e in v){const t=w[e];p.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),$(new P(e,t)),delete v[e],delete w[e]}},this.start=e=>new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return p.warn(e),t(e)}this.started=!0,p=new c.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(p=new c.LocalLogger),C=`RouterClient.${e.windowName}.${d.v4()}`;const n=`"RouterClient Check: connecting new client for ${C}`;p.system.debug(n),console.debug(n),K(e,e.transportName,(()=>{!function(){for(p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),L=!0;A.length>0;)p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked"),A.shift()()}(),t(null)}))})),this.stop=()=>{this.disconnectAll(),i.default.close(),this.started=!1}}},9319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const r=n(568),i=n(2551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",r.RouterClientConstructor),i.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},9321:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(2551)),o=n(2669),s=n(6420);i.default.system.debug("Starting searchClient");class a extends o._BaseClient{constructor(){super(...arguments),this.providers={},this.resultProviders={},this.searchResultsList=[],this.isSearching=!1,this.unRegister=this.unregister,this.handleResults=(e,t)=>{t.data.searchId&&t.data.searchId==this.searchId&&(this.resultProviders[t.data.provider.channel]=t.data,this.searchResultsList.push(t.data),this.resultsCallback(null,this.searchResultsList))}}register(e,t){return e.name?e.searchCallback?void this.routerClient.query("Search.register",{name:e.name,channel:`${this.finWindow?.name}.${e.name}`,providerActionTitle:e.providerActionTitle,providerActionCallback:!!e.providerActionCallback},((n,r)=>{if(n)return t?t(n):console.error(n);const i=`${this.finWindow?.name}.${e.name}`;return this.providers[e.name]=e.name,this.routerClient.addResponder(`Search.Provider.${i}`,((t,n)=>{if(t)return console.error(t);n&&e.searchCallback(n.data,((e,t)=>{n.sendQueryResponse(e,t)}))})),this.routerClient.addResponder(`Search.Provider.ItemAction.${i}`,((t,n)=>{if(t)return console.error(t);n&&e.itemActionCallback&&e.itemActionCallback(n.data,s.windowNameFromRouterHeader(n.header),((e,t)=>{n.sendQueryResponse(e,t)}))})),e.providerActionCallback&&this.routerClient.addResponder(`Search.Provider.Action.${i}`,((t,n)=>{if(t)return console.error(t);n&&e.providerActionCallback&&e.providerActionCallback(s.windowNameFromRouterHeader(n.header),((e,t)=>{n.sendQueryResponse(e,t)}))})),t?t(null,r.data):null})):t?.("no provider callback provided"):t?.("no provider name provided")}unregister(e,t){if(!e.name)return t?.("Provider name was not provided");const n=`${this.finWindow?.name}.${e.name}`;this.routerClient.query("Search.unregister",{channel:n},(()=>(this.routerClient.removeResponder(`Search.Provider.${n}`),this.routerClient.removeResponder(`Search.Provider.ItemAction.${n}`),this.routerClient.removeResponder(`Search.Provider.Action.${n}`),delete this.providers[e.name],t?t():null)))}search(e,t){this.isSearching||(this.routerClient.addPubSubResponder(`Search.${this.finWindow?.name}`),this.routerClient.subscribe(`Search.${this.finWindow?.name}`,this.handleResults),this.isSearching=!0),this.searchResultsList=[],e.windowName=this.finWindow?.name,this.routerClient.query("Search.search",e,((e,n)=>{if(e)return t(e);this.resultsCallback=t,this.searchId=n.data.searchId}))}invokeItemAction(e,t){this.routerClient.query(`Search.Provider.ItemAction.${e.provider}`,{item:e,action:t})}invokeProviderAction(e){this.routerClient.query(`Search.Provider.Action.${e.channel}`,{})}}const u=new a({onReady(e){e&&e()},name:"searchClient"});t.default=u},4068:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="SmartDesktopClient",r="Finsemble-ui-change";var i;!function(e){e[e.JS=0]="JS",e[e.CSS=1]="CSS",e[e.JSON=2]="JSON",e[e.Text=3]="Text",e[e.Image=4]="Image",e[e.GIF=5]="GIF",e[e.Icon=6]="Icon"}(i||(i={}));class o{async getSDServerInfo(){return await FSBL.System.getSDServerInfo()}static async isEnabled(){let{enabled:e}=await FSBL.System.getSDServerInfo();return e}async applicationRoot(){let{applicationRoot:e}=await FSBL.System.getSDServerInfo();return e||null}async projectConfig(){let{projectConfig:e}=await FSBL.System.getSDServerInfo();return e||null}async getApps(){FSBL.Clients.Logger.log("SmartDesktopClient.getApps");let{err:e,response:t}=await FSBL.Clients.RouterClient.query(`${n}.getApps`,{});return FSBL.Clients.Logger.log("SmartDesktopClient.getApps result",e||"successful",t),{err:e,apps:t?.data.applications??[]}}async getMenus(){FSBL.Clients.Logger.log("ConfigClient getValue 'finsemble.toolbarMenus'");let{err:e,data:t}=await FSBL.Clients.ConfigClient.getValue({field:"finsemble.toolbarMenus"});return FSBL.Clients.Logger.log("finsemble.toolbarMenus result",e||"successful",t),{err:e,menus:t}}async getAppConfig(e){FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfig",e);let{err:t,response:r}=await FSBL.Clients.RouterClient.query(`${n}.getAppConfig`,{appName:e});return FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfig result",t||"successful",r),{err:t,config:r?.data??{}}}async getAppConfigTemplate(){FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfigTemplate");let e={appId:"123",name:"",manifest:{window:{url:"",width:1280,height:600},foreign:{components:{"App Launcher":{launchableByUser:!0},"Window Manager":{persistWindowState:!0,FSBLHeader:!0}}}},manifestType:"vendor_type",version:"1",title:"app title",tooltip:"app tip",description:"",images:[{url:"string"}],contactEmail:"string",supportEmail:"string",publisher:"string",icons:[{icon:"string"}],customConfig:[{name:"string",value:"string"}],intents:[{name:"string",displayName:"string",contexts:["string"],customConfig:{}}]};return FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfigTemplate result",e),{config:e}}async addApp(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.addApp",e,t);let{err:r}=await FSBL.Clients.RouterClient.query(`${n}.addApp`,{appName:e,appConfig:t});return FSBL.Clients.Logger.log("SmartDesktopClient.addApp result",r||"successful"),{err:r}}async addMenu(e){FSBL.Clients.Logger.log("SmartDesktopClient.addMenu");let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.addMenu`,{menuConfig:e});return await this.syncMenuConfig(),FSBL.Clients.Logger.log("SmartDesktopClient.addMenu result",t||"successful"),{err:t}}async syncMenuConfig(){FSBL.Clients.Logger.log("SmartDesktopClient.syncMenuConfig");let{response:e}=await FSBL.Clients.RouterClient.query(`${n}.getMenus`,{});await FSBL.Clients.ConfigClient.setValue({field:"finsemble.toolbarMenus",value:e?.data?.menus||{}}),FSBL.Clients.Logger.log("SmartDesktopClient.syncMenuConfig completed")}async updateApp(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.updateApp",e,t);let{err:r}=await FSBL.Clients.RouterClient.query(`${n}.updateApp`,{appName:e,appConfig:t});return FSBL.Clients.Logger.log("SmartDesktopClient.updateApp result",r||"successful"),{err:r}}async updateMenu(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.updateMenu",e,t);let{err:r}=await FSBL.Clients.RouterClient.query(`${n}.updateMenu`,{menuId:e,menuConfig:t});return await this.syncMenuConfig(),FSBL.Clients.Logger.log("SmartDesktopClient.updateMenu result",r||"successful"),{err:r}}async deleteApp(e){FSBL.Clients.Logger.log("SmartDesktopClient.deleteApp",e);let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.deleteApp`,{appName:e});return FSBL.Clients.Logger.log("SmartDesktopClient.deleteApp result",t||"successful"),{err:t}}async deleteMenu(e){FSBL.Clients.Logger.log("SmartDesktopClient.deleteMenu",e);let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.deleteMenu`,{menuId:e});return await this.syncMenuConfig(),FSBL.Clients.Logger.log("SmartDesktopClient.deleteMenu result",t||"successful"),{err:t}}async updateTheme(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateTheme",e);let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.updateTheme`,{theme:e});return FSBL.Clients.Logger.log("SmartDesktopClient.updateTheme result",t||"successful"),{err:t}}static onThemeUpdated(e){return FSBL.Clients.RouterClient.addListener(`${r}.themeUpdate`,e),FSBL.Clients.Logger.log("SmartDesktopClient.onThemeUpdated",e),()=>FSBL.Clients.RouterClient.removeListener(`${r}.themeUpdate`,e)}async uploadAssets(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets",e);const n=await this.applicationRoot();return new Promise((r=>{const o=`${n}/project/assets`,s=new FormData,a=[];for(let t=0;t<e.length;t++){let n=e[t];const o={key:`file-${t}`,name:n.file.name,type:n.file.type,size:n.file.size,targetPath:n.targetPath};let u=null,l=[];if(-1===n.type.indexOf(i.Image)||/\.(jpe?g|png)$/i.test(n.file.name)||(l.push("PNG"),l.push("JPEG")),-1===n.type.indexOf(i.GIF)||/\.(gif)$/i.test(n.file.name)||l.push("GIF"),-1===n.type.indexOf(i.Icon)||/\.(ico)$/i.test(n.file.name)||l.push("ICO"),l.length>0&&(u=`File must be of type ${[l.pop(),l.length>0?`${l.join(", ")} or `:""].reverse().join("")}`),u)return FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets wrong image type",u),r({err:u,paths:[]});FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets append",o.key,n.file),s.append(o.key,n.file),a.push(o)}s.append("assets",JSON.stringify(a));var u=new XMLHttpRequest;FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets put",s,o),u.open("PUT",o,!0),u.addEventListener("progress",(e=>{t(Math.round(e.loaded/e.total*100))})),u.onreadystatechange=()=>{if(u.readyState===XMLHttpRequest.DONE)if(t(100),200!==u.status)FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets Failed Response",u.response),r({err:`Got response code: ${u.status}`,paths:[]});else try{const e=JSON.parse(u.response);FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets Response",u.response),r({err:null,paths:e.paths})}catch(e){r({err:"Couldn't parse response",paths:[]})}},FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets send",s),u.send(s)}))}async uploadImages(e,t){return this.uploadAssets(e.map((e=>({file:e,type:[i.Image,i.GIF]}))),t)}async uploadImage(e,t){return new Promise(((n,r)=>{this.uploadImages([e],t).then((e=>{n({err:e.err,path:e.paths[0]})})).catch(r)}))}async updateInstallerDescription(e){FSBL.Clients.Logger.log("SmartDesktopClient updateInstallerDescription",e);let{err:t}=await FSBL.RESTUtils.httpPatch("/project/installer",e);return FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerDescription Response",t||"successful"),{err:t}}async updateProjectSettings(e){console.log("SmartDesktopClient updateProjectSettings",e);let{err:t}=await FSBL.RESTUtils.httpPatch("/project/settings",e);return{err:t}}async getProjectSettings(){return(await FSBL.RESTUtils.httpGet("/project/settings")).getData}progressIndicator(e){FSBL.Clients.Logger.log("SmartDesktopClient.progressIndicator Console-Only",e),console.log("Console-Only Progress Indicator:",e)}async updateToolbarIcon(e){const t="assets/img/Finsemble_Toolbar_Icon.png";FSBL.Clients.Logger.log("SmartDesktopClient.updateToolbarIcon",t,e);let{err:n,paths:r}=await this.uploadAssets([{file:e,type:[i.Image,i.GIF],targetPath:t}],this.progressIndicator);return n||FSBL.Clients.RouterClient.transmit("Finsemble-ui-change.toolbarIconUpdate",{}),FSBL.Clients.Logger.log("SmartDesktopClient.updateToolbarIcon result",n||"successful"),{err:n,path:r[0]}}async updateTaskbarIcon(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateTaskbarIcon",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Image],targetPath:"assets/img/Finsemble_Taskbar_Icon.png"}],this.progressIndicator);return t||FSBL.Clients.RouterClient.transmit("Finsemble-ui-change.taskbarIconUpdate",{}),FSBL.Clients.Logger.log("SmartDesktopClient.updateTaskbarIcon result",t||"successful"),{err:t,path:n[0]}}async updateSystemTrayIcon(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateSystemTrayIcon",e);let{err:t,paths:r}=await this.uploadAssets([{file:e,type:[i.Image],targetPath:"assets/img/Finsemble_SystemTray_Icon.png"}],this.progressIndicator),{err:o}=await FSBL.Clients.RouterClient.query(`${n}.refreshSystemTrayIconConfig`,{});FSBL.Clients.Logger.log("SmartDesktopClient.updateSystemTrayIcon result",t||o?{error1:t,error2:o}:"successful");const s=t||o||null;return{err:s?s.toString():null,path:r[0]}}async updateInstallerIcon(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerIcon",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Icon],targetPath:"assets/img/installer_icon.ico"}],this.progressIndicator);return FSBL.Clients.Logger.log("SmartDesktopClient.updateSystemTrayIcon result",t||"successful"),{err:t,path:n[0]}}async updateInstallerGraphic(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerGraphic",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Image,i.GIF],targetPath:"assets/img/installer_spinner.gif"}],this.progressIndicator);return FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerGraphic result",t||"successful"),{err:t,path:n[0]}}async updateSplashScreen(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateSplashScreen",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Image,i.GIF],targetPath:"assets/img/FinsembleSplash.png"}],this.progressIndicator);return FSBL.Clients.Logger.log("SmartDesktopClient.updateSplashScreen result",t||"successful"),{err:t,path:n[0]}}static async updateThemeVariable(e,t){const n={};n[e]=t;const r=new o;return FSBL.Clients.Logger.log("SmartDesktopClient.updateThemeVariable",n),r.updateTheme(n)}async createProjectZip(e,t){const n=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.createProjectZip",n),new Promise(((r,i)=>{const o=t=>{const o=`${n}/project/${e}/zip?targetPath=${encodeURIComponent(t)}`;FSBL.Clients.Logger.log(o),fetch(o).then((e=>e.json())).then((e=>{r(e.file)})).catch(i)};t?o(t):finsembleWindow?finsembleWindow.showNativeOpenDialog({title:"Select an output directory",buttonLabel:"Save .zip file",properties:["openDirectory"]},((e,t)=>{t?.[0]?.filePaths?.length>0?o(t?.[0]?.filePaths[0]):i("No file selected")})):i("No finsembleWindow object")}))}async copyProjectFiles(e,t){const n=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.createProjectZip",n),new Promise(((r,i)=>{const o=t=>{const o=`${n}/project/${e}/copy?targetPath=${encodeURIComponent(t)}`;FSBL.Clients.Logger.debug(`copyProjectFiles: copying ${t}, ${o}`),fetch(o).then((e=>e.json())).then((e=>{e.error?i(e.error):r(e.files)})).catch(i)};t?o(t):finsembleWindow?finsembleWindow.showNativeOpenDialog({title:"Select Seed Project",buttonLabel:"Copy to Seed Project",properties:["openDirectory"]},((e,t)=>{t?.[0]?.filePaths?.length>0?o(t?.[0]?.filePaths[0]):i("No file selected")})):i("No finsembleWindow object")}))}async selectProjectPath(){return new Promise(((e,t)=>{finsembleWindow?finsembleWindow.showNativeOpenDialog({title:"Select Seed Project",buttonLabel:"Select Seed Project",properties:["openDirectory"]},((n,r)=>{if(r?.[0]?.filePaths?.length>0){const t=r?.[0]?.filePaths[0];FSBL.Clients.Logger.log("SmartDesktopClient.selectProjectPath",t),e(t)}else t("No file selected")})):t("No finsembleWindow object")}))}static checkValidProjectName(e){return/^[a-zA-Z0-9 \-_.]{1,}$/.test(e)&&/[a-zA-Z0-9]{1,}/.test(e)}static checkValidURL(e){return 0===e.length||/^https?:\/\/[^\s]+$/.test(e)}async publishToCosaicCloud(e){const t=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.publishToCosaicCloud",t),new Promise((async(n,r)=>{const i=`${t}/project/publish/cosaicCloud?uuid=${encodeURIComponent(e||"")}`,o=await fetch(i,{method:"PUT"}),s=await o.json();o.ok?n(s):r(s)}))}async getPublishProgress(){const e=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.getPublishProgress",e),new Promise(((t,n)=>{fetch(`${e}/project/publish/progress`).then((e=>e.json())).then((e=>{t(e)})).catch(n)}))}async resetProject(){const e=await this.applicationRoot();FSBL.Clients.Logger.log("SmartDesktopClient.resetProject",e);const t=`${e}/project/reset`,n=await fetch(t,{method:"PUT"}),r=await n.json(),i=n.ok?null:new Error(r.message);return n.ok&&FSBL.restartApplication(),[i,r]}async getAuthenticationProviders(){const e=await this.applicationRoot();FSBL.Clients.Logger.log("SmartDesktopClient.getAuthenticationProviders",e);const t=`${e}/authentication`,n=await fetch(t,{method:"get",headers:{Accept:"application/json"}}),r=await n.json();return r&&Array.isArray(r.providers)?r.providers:[]}async setAuthenticationProviders(e){const t=await this.applicationRoot();FSBL.Clients.Logger.log("SmartDesktopClient.setAuthenticationProviders",t);const n=`${t}/authentication`,r=await fetch(n,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({authenticationProviders:e})}),i=await r.json();return r.ok?null:new Error(i.message)}}t.default=o},3862:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const i=r(n(2169)),o=r(n(3712)),s=r(n(2551)),a=n(2669),u=n(4232),l=i.default(1);class c extends a._BaseClient{constructor(){super(...arguments),this.clientReady=!1,this.delete=this.remove}setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function="),this.routerClient.query("Storage.setUser",{user:e.user},((n,r)=>{(n?s.default.system.error:s.default.system.info)("APPLICATION LIFECYCLE:StorageClient.setUser",e,n,r),t&&t(n,r.data)}))}setStore(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t),this.routerClient.query("Storage.setStore",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.setStore",e,n),t&&t(e,n.data)}))}save(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function="),this.routerClient.query("Storage.save",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("Storage.save",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}save1(e){return l((()=>this.save(e)))}get(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.get",e,((e,i)=>{if(e)return s.default.system.error("Storage.get",e,i),t&&t(e,i?i.data:null),r(e,i?i.data:null);s.default.system.info("Storage.get",e,i),t&&t(e,i.data),n(i.data)}))}))}get1(e,t){return l((()=>this.get(e,t)))}async updateStorage(e){const{topic:t,key:n,updateFn:r}=e,i=await this.get({topic:t,key:n});return await this.save({topic:t,key:n,value:r(i)})}updateStorage1(e){return l((()=>this.updateStorage(e)))}keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t),this.routerClient.query("Storage.keys",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.keys",e,n),t&&t(e,n.data)}))}keys1(e){return l((()=>u.promisify(this.keys.bind(this))(e)))}getMultiple(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t),this.routerClient.query("Storage.getMultiple",e,((n,r)=>{(n?s.default.system.error:s.default.system.info)("StorageClient.getMultiple:",e,r),t&&t(n,r)}))}remove(e,t){return this.clientReady||s.default.system.error("storageClient invoked before ready"),new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.delete",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("StorageClient.delete",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}remove1(e){return l((()=>this.remove(e)))}clearCache(e){s.default.system.log("StorageClient.clearCache",e),this.routerClient.query("Storage.clearCache",null,((t,n)=>{(t?s.default.system.error:s.default.system.info)("StorageClient.clearCache",t,n),e&&e(t,n.data)}))}}t.StorageClient=c;var d=new c({onReady(e){e&&e(),d.clientReady=!0},name:"storageClient"});t.default=d},5376:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(7664),u=s(n(3862)),l=s(n(8718)),c=o(n(6420)),d=n(1742),f=n(2669),p=s(n(2551)),h=s(n(3712)),g=n(5688),m=n(3998),y=s(n(9319)),v=n(8379),w=s(n(10)),b=n(4232),S=n(89);let C;function _(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}class L extends f._BaseClient{constructor(e){super(e),this.showAtMousePosition=function(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())},h.default.args(e,"object=")&&e&&h.default.args2("params.onReady",e.onReady,"function="),this.options={},this.windowHash="",this.title=null,this.toolbarBottom=40,this.containers=[],this.componentState={},this.windowState="normal",this.hasHeader=!1,this.enableWindowsAeroSnap=!1,this.bindFunctions(),this.minimizeWithDockedWindows=this.minimize}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this),this.cacheInitialBounds=this.cacheInitialBounds.bind(this),this._setHeaderHeight=this._setHeaderHeight.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){this.setActive(!1)}onWindowFocused(){this.setActive(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",C.name),C.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:C.name}),C.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?FSBL.Clients.Logger.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes(this.getWindowNameForDocking()))))}close(e,t=(()=>{})){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=C;if(e.userInitiated&&n)return n.close(e,t);C.close(e,t)}getWindowHash(){return this.windowHash}getWindowTitle(){return this.title}retrieveMonitorDimensions(e=Function.prototype){c.getMonitor(null,(t=>{C.updateOptions({options:{monitorDimensions:t.monitorRect}}),e&&e(t.monitorRect)}))}listenForHashChanges(){d.System.hasBrowserView()||(C.updateOptions({url:window.top.location.href},(()=>{})),function(e){const{pushState:t}=e;e.pushState=function(n){"function"==typeof e.onpushstate&&e.onpushstate({state:n}),t.apply(e,arguments),C.updateOptions({url:window.top.location.href},(()=>{}))};const{replaceState:n}=e;e.replaceState=function(t){"function"==typeof e.onreplacestate&&e.onreplacestate({state:t}),n.apply(e,arguments),C.updateOptions({url:window.top.location.toString()})}}(window.history),window.addEventListener("hashchange",(()=>{C.updateOptions({url:window.top.location.toString()},(()=>{}))})))}getInitialOptions(e){this.isInAService?(this.options={},p.default.system.debug("WindowClient:getting options empty",this.options),e()):C.getOptions(((t,n)=>{t&&(n={}),C.windowOptions=n,this.options=n,p.default.system.debug("WindowClient:getting options",this.options),e()}))}cacheInitialBounds(e){if(d.System.hasBrowserView())return e();this.cacheBounds((()=>{try{if(!C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState)return e();C.updateOptions({options:{url:window.top.location.toString()}})}catch(e){p.default.system.warn('customData.foreign.components["Window Manager" is undefined')}e()}))}setInitialWindowBounds(e){p.default.system.warn("`FSBL.Clients.WindowClient.setInitialWindowBounds is deprecated and will be removed in a future version of finsemble. Use 'getInitialOptions' and 'cacheInitialBounds' instead."),a.parallel([this.getInitialOptions,this.cacheInitialBounds],e)}getWindowBounds(){return{top:C.windowOptions.defaultTop,left:C.windowOptions.defaultLeft,width:C.windowOptions.defaultWidth,height:C.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(p.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),h.default.args(e,"object")&&h.default.args2("bounds.top",e.top,"number"),e){C.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}minimize(e){this.cacheBounds((()=>{C.minimize(null,(t=>{t&&p.default.system.error("WindowClient:minimize",t),e&&e(t)}))}))}setAlwaysOnTop(e,t){C.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e=(()=>{})){C.restore(null,(t=>{t&&p.default.system.error("WindowClient:restore",t),e(t)}))}cacheBounds(e){this.getBounds(((t,n)=>{if(t)return e(),console.warn("Get bounds error.",t,"Window may not be registered with the window service");C.updateOptions({options:{cachedLeft:n.left,defaultLeft:n.left,cachedTop:n.top,defaultTop:n.top,cachedWidth:n.width,defaultWidth:n.width,cachedHeight:n.height,defaultHeight:n.height}}),e&&e(n)}))}maximize(e){C.maximize(),e()}removeFinWindowEventListeners(){C.removeEventListener("maximized",this.onWindowMaximized),C.removeEventListener("restored",this.onWindowRestored),C.removeEventListener("blurred",this.onWindowBlurred),C.removeEventListener("focused",this.onWindowFocused),C.removeEventListener("close-requested",this.close),C.removeEventListener("minimized",this.onWindowMinimized)}injectDOM(e){if(p.default.system.debug("injectDOM",e),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div");t.innerHTML=`<div id="FSBLHeader"${e?` style=height:${e}`:""}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){if(e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),h.default.args(e,"object",t,"function"),C)return C.getComponentState(e,t);p.default.system.warn("Attempt to use getComponentState before component is ready or in a service"),e.windowName||(e.windowName=window.name);const n=this.getContainerHash(e.windowName);u.default.get({topic:v.WORKSPACE.CACHE_STORAGE_TOPIC,key:n},((n,r)=>{if(n)return p.default.system.error("Error retrieving window client's component state."),void t(n);const i=r;if(r&&e.field)this.componentState=i||{},t(n,i[e.field]);else{if(e.fields){const n={};for(let t=0;t<e.fields.length;t++)i[e.fields[t]]&&(n[e.fields[t]]=i[e.fields[t]]);return t(null,n)}if(r)return t(null,i);p.default.system.info("WindowClient:getComponentState:error, response, params",n,r,e),t("Not found",r)}}))}async setComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),C?C.setComponentState(e,t):this.isInAService?(t("Cannot call setComponentState in a service."),Promise.resolve()):(t("Cannot call setComponentState. The window may not be ready"),Promise.reject("The window is not yet ready to save state."))}async removeComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),(C||await g.FinsembleWindow.getInstance({name:e.windowName||window.name})).removeComponentState(e,t)}getWindowNameForDocking(){const e=C.parentWindow;return e?e.name:C.name}getContainerHash(e){return c.camelCase(this.windowHash,e)}formGroup(){C.formGroup()}registerWithDockingManager(e,t){C.parentWindow&&(p.default.system.debug("registerWithDockingManager ignore registration request if has a parent"),t&&t());const n=C.name,{uuid:r}=C;this.startedRegistrationWithDocking=!0,this.routerClient.query("DockingService.registerWindow",{name:n,uuid:r,options:e||{},windowType:"WebWindow"},(()=>{this.startedRegistrationWithDocking=!1,this.deregisterPlease&&(this.deregisterWithDockingManager(),this.deregisterPlease=!1),p.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete."),t&&t()}))}deregisterWithDockingManager(e){this.startedRegistrationWithDocking&&(this.deregisterPlease=!0);const t=C.name;this.routerClient.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})}bumpFixedElements(e){if("complete"!==document.readyState)return setTimeout((()=>{this.bumpFixedElements(e)}),100);if(!e)return;let{absolute:t,fixed:n,bumpBy:r}=e;if(!t&&!n)return;const i=document.getElementById("FSBLHeader");if(!i||0===i.children.length||!i.children[0].clientHeight)return setTimeout((()=>{this.bumpFixedElements(e)}),100);"auto"===r?r="0px":-1===new String(r).indexOf("px")&&(r=`${r}px`);const o=document.body.getElementsByTagName("*"),s=o.length;for(let e=0;e<s;e++){if("FSBLHeader"===o[e].id||o[e].classList.contains("fsbl-header"))continue;const i=window.getComputedStyle(o[e],null),s=["0","0px",0],a=i.getPropertyValue("top");t&&o[e].parentNode===document.body&&"absolute"==i.getPropertyValue("position")&&("all"==t?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==t&&s.includes(a)&&(o[e].style.top=r)),n&&"fixed"==i.getPropertyValue("position")&&("all"==n?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==n&&s.includes(a)&&(o[e].style.top=r))}}bringWindowToFront(){C.bringToFront({forceFocus:!0},(e=>{e?p.default.system.error(`WindowClient.bringWindowToFront: failure:${e}`):p.default.system.info("WindowClient.bringWindowToFront: success")}))}injectStylesheetOverride(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(C.windowOptions.customData.cssOverride)),document.body.appendChild(e)}checkIfChildApp(){if(C.windowOptions&&C.windowOptions.customData&&C.windowOptions.customData.parentUUID&&C.windowOptions.customData.parentUUID!==d.System.Application.getCurrent().uuid){const e=d.System.Application.wrap(C.windowOptions.customData.parentUUID);e.addEventListener("crashed",this.close.bind(null,!1)),e.addEventListener("initialized",this.close.bind(null,!1)),e.addEventListener("out-of-memory",this.close.bind(null,!1))}}preventUnintendedDropEvents(){function e(e){e.preventDefault()}window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&y.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,d.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&y.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,d.System.Window.getCurrent().updateOptions({resizable:!1}))};FSBL&&l.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){FSBL&&l.default.onReady((()=>{l.default.addBrowserHotkey(["ctrl","r"],C.reload)}))}addListeners(e=Function.prototype){this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),C.addListener("setParent",(()=>{p.default.system.info("WindowClient.setParent deregisterWithDockingManager"),this.deregisterWithDockingManager()})),C.addEventListener("maximized",this.onWindowMaximized),C.addEventListener("minimized",this.onWindowMinimized),C.addEventListener("restored",this.onWindowRestored),C.addEventListener("blurred",this.onWindowBlurred),C.addEventListener("focused",this.onWindowFocused),e()}updateHeaderState(e,t){this.commandChannel&&this.commandChannel(e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){C.ejectFromGroup()}setWindowTitle(e){p.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){h.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),C.setTitle(e)}getSpawnData(){if(!this.options.customData)return{};const{spawnData:e}=this.options.customData;return void 0===e?{}:e}getCurrentWindow(){return d.System.Window.getCurrent()}async getDesktopBoundingBox(e){let t=e;"string"==typeof e&&(t=document.querySelector(e));const n=t.getBoundingClientRect(),r=await C.getBounds(),i=r.data;let o,s;r.err?(o=this.options.defaultTop,s=this.options.defaultLeft):(o=i.top,s=i.left);const a={top:o+n.top,left:s+n.left,width:n.width,height:n.height,right:0,bottom:0};return a.right=a.left+a.width,a.bottom=a.top+a.height,a}isPointInBox(e,t){return t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top}isMouseOverDOMElement(e,t){this.getDesktopBoundingBox(e).then((e=>{d.System.getMousePosition(((n,r)=>{t(this.isPointInBox(r,e))}))}))}getWindowIdentifier(){var e=null;return this.options&&this.options.customData&&this.options.customData.component&&(e=this.options.customData.component.type),{windowName:C?C.name:window.name,uuid:C?C.uuid:null,componentType:e}}setActive(e){var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):_(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(_(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")}getBounds(e){C.getBounds(((t,n)=>{e(t,n)}))}setShape(e,t=Function.prototype){C.setShape(e,t)}startTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.startTilingOrTabbing",e),t()}startMovingWindow(e){d.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){d.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t=Function.prototype){console.debug("CancelTilingOrTabbing"),y.default.transmit("DockingService.cancelTilingOrTabbing",e),t()}sendIdentifierForTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.identifierForTilingOrTabbing",e),t()}stopTilingOrTabbing(e,t=Function.prototype){const n=()=>{y.default.query("DockingService.stopTilingOrTabbing",e,(()=>{t()})),y.default.transmit("DockingService.stopTilingOrTabbing",e)};return e.mousePosition?(n(),e.allowDropOnSelf?void 0:t()):d.System.getMousePosition(((r,i)=>{if(e.mousePosition=i,n(),!e.allowDropOnSelf)return t()}))}getStackedWindow(e,t){if(p.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!C.parentWindow&&e.create){const n=e=>{const{parentName:r}=e.data;C.setParent({windowName:r},((e,n)=>{t?.(e,n)})),C.removeListener("parent-set",n)};C.addListener("parent-set",n),FSBL.Clients.LauncherClient.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{p.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&t?.(e,null)}))}else C.getParent(t)}getMonitorInfo(e,t){c.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data)}))}))}fitToDOM(e,t){let n=document.documentElement.offsetHeight,r=this.options.width;"function"==typeof e&&(t=e,e=null),e&&e.padding&&(e.padding.height&&(n+=e.padding.height),e.padding.width&&(r+=e.padding.width)),e&&e.maxHeight&&n>e.maxHeight&&(n=e.maxHeight),p.default.system.debug("WindowClient.FitToDOM:newHeight",n,e),this.getMonitorInfo({},((e,i)=>{i&&(n>=i.availableRect.height&&(n=i.availableRect.height),r>=i.availableRect.width&&(r=i.availableRect.width)),p.default.system.debug("WindowClient.FitToDOM:fixBounds",n,r),C.getBounds(((e,i)=>{i.width!=r||i.height!=n?(i.width=r,i.height=n,C.setBounds({bounds:i},t)):"function"==typeof t&&t()}))}))}_setHeaderHeight(e){let t=document.getElementsByClassName("fsbl-header")[0];if(!t)return setTimeout((()=>{this._setHeaderHeight(e)}),100);let n=window.getComputedStyle(t,null).getPropertyValue("height");document.body.style.marginTop=n,e.bumpElements&&"auto"===e.bumpElements.bumpBy&&(e.bumpElements.bumpBy=n),this.bumpFixedElements(e.bumpElements)}async start(e=Function.prototype){if(h.default.args(e,"function"),b.iAmAServiceWindow())return this.isInAService=!0,e();setInterval((()=>{C&&document?.title&&this.title!==document.title&&(!FSBL.System.isBrowserView&&FSBL.System.hasBrowserView||this.setWindowTitlePrivate(document.title))}),200);const t=this;await w.default.getValue("finsemble");let n=null,r=!1,i=!1,o=!1;this.componentState={},(e=>{g.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{if(p.default.system.debug(`FinsembleWindow.getInstance ${this.finWindow?.name}`),"Cannot Wrap Service Manager or Services"==t)return this.isInAService=!0,this.windowHash=c.camelCase("activeWorkspace",window.name),e();!t&&n||p.default.system.error("wrap failure",t),this.finsembleWindow=n,({finsembleWindow:C}=this),this.windowHash=c.camelCase("activeWorkspace",C.name),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),e()}))})((()=>{this.retrieveMonitorDimensions(),this.getInitialOptions((()=>{if(!C||!C.windowOptions)return this.isInAService||p.default.system.error("Something went wrong attempting to get the current window."),e();({customData:n}=C.windowOptions),p.default.system.debug("getInitialOptions",n),n&&(r=S(n,"window.compound",!1),n.cssOverride&&(p.default.system.debug("Window has cssOverride. See local window to inspect object"),i=!0),o=!r&&S(n,["foreign","components","Window Manager","FSBLHeader"],!1)),a.parallel([function(e){i&&t.injectStylesheetOverride(),e()},function(e){w.default.getValue("finsemble",((n,r)=>{n&&p.default.system.error("Error reading windowService config from finsemble");const i=r.services.windowService.config.enableWindowsAeroSnap;t.enableWindowsAeroSnap=m.ConfigUtilInstance.getDefault(r,"config.servicesConfig.docking.enableWindowsAeroSnap",i),e()}))},function(e){if(d.System.isBrowserView())e();else{if(!n||!n.component||b.iAmAServiceWindow())return e();{let r=m.ConfigUtilInstance.getDefault(n,"customData.foreign.services.windowService.manageWindowMovement",!1);r||(r=m.ConfigUtilInstance.getDefault(n,"customData.foreign.services.dockingService.manageWindowMovement",!1));const i=m.ConfigUtilInstance.getDefault(n,"customData.foreign.components.Window Manager.FSBLHeader",!1),o=m.ConfigUtilInstance.getDefault(n,"customData.window.dockable",!1);r=r||i||o;let s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangable"},null);if(null===s&&(s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangeable"},r)),!r&&!s)return e();if(n.window.allowAutoArrange=s,n.window.snapping=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowSnapping",oldValue:"ignoreSnappingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreSnappingRequests&&(n.window.snapping=!n.foreign.services[e].ignoreSnappingRequests)}if(m.ConfigUtilInstance.getDefault(n,"customData.window.ephemeral",!1)&&!n.window.snapping&&(n.window.snapping=!1),n.window.tiling=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTiling",oldValue:"ignoreTilingAndTabbingRequests"},r),n.window.tabbing=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTabbing",oldValue:"ignoreTilingAndTabbingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreTilingAndTabbingRequests&&(n.window.tiling=!n.window.tiling,n.window.tabbing=!n.window.tabbing)}n.window.canGroup=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowGrouping",oldValue:"canGroup"},r),n.window.canMinimize=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowMinimize",oldValue:"canMinimize"},void 0),void 0===n.window.canMinimize&&(n.window.canMinimize=n.component.canMinimize,void 0===n.window.canMinimize&&(n.window.canMinimize=r)),void 0===n.window.canMaximize&&(n.window.canMaximize=n.component.canMaximize,void 0===n.window.canMaximize&&(n.window.canMaximize=r)),n.window.overwriteStartDocked=m.ConfigUtilInstance.getDefault(n,"customData.foreign.services.workspaceService.global",!1),t.registerWithDockingManager(n.window,(()=>{t.cacheInitialBounds(e)}))}}}],((t,n)=>e(t,n)))}))}))}}var A=new L({startupDependencies:{clients:["storageClient"]},onReady(e){A.start(e)},name:"windowClient"});t.default=A},6008:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(2669),u=o(n(6420)),l=s(n(3712)),c=s(n(2551)),d=n(8379),f=n(3998),p=s(n(3014));class h extends a._BaseClient{constructor(e){super(e),this.workspaces=[],this.setWorkspaces=this.setWorkspaceOrder,this.createNewWorkspace=this.createWorkspace,this.getWorkspaceDefinition=this.export,this.addWorkspaceDefinition=this.import,this.saveWorkspaceTemplateToConfigFile=this.exportToFile,l.default.args(e,"object=")&&e&&l.default.args2("params.onReady",e.onReady,"function="),this.publicEventManager=new p.default({name:"workspaceClient",sourceType:"workspace"})}_serviceResponseHandler(e,t,n,r,i=Function.prototype){if(e)return r(new Error(e)),i(e);t||(t={data:null}),n(t.data),i(null,t.data)}saveGlobalData(e,t){return c.default.system.debug("WorkspaceClient.saveGlobalData",e),new Promise(((n,r)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_GLOBAL_DATA,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}saveViewData(e,t){return c.default.system.debug("WorkspaceClient.saveViewData",e),new Promise(((n,r)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_VIEW_DATA,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}async addWindow(e,t=null){l.default.args(e,"object",t,"function=")&&e&&l.default.args2("params.name",e.name,"string");const{err:n,response:r}=await this.routerClient.query("WorkspaceService.addWindow",e,(()=>{}));if(c.default.system.log(`WORKSPACE LIFECYCLE: Window added:WorkspaceClient.addWindow: Name (${e.name})`),t&&t(n,r),!t&&n)throw n;return r}removeWindow(e,t=Function.prototype){l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),this.routerClient.query("WorkspaceService.removeWindow",e,((n,r)=>{if(n)return c.default.system.error(n);c.default.system.log(`WORKSPACE LIFECYCLE:WorkspaceClient.removeWindow:Window removed: Name (${e.name})`),t(n,r?r.data:null)}))}autoArrange(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{},u.getMyWindowIdentifier((e=>{this.routerClient.query("DockingService.autoArrange",{windowIdentifier:e},t)}))}minimizeAll(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.minimizeAll",e,t)}))}bringWindowsToFront(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.bringWindowsToFront",e,t)}))}async getActiveWorkspace(e){c.default.system.debug("WorkspaceClient.getActiveWorkspace");const t=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE,{})).response;if(this.activeWorkspace=t.data,t.data.err)throw e&&e(t.data.err),new Error(t.data.err);return e&&e(null,t),t}getWorkspaces(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaces"),new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACES,{},((r,i)=>{this._serviceResponseHandler(r,i,t,n,e)}))}))}getWorkspaceActions(e){return e(null,d.WORKSPACE.API_CHANNELS)}getWorkspaceNames(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaceNames"),new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACE_NAMES,{},((r,i)=>{this._serviceResponseHandler(r,i,t,n,e)}))}))}setWorkspaceOrder(e,t){const{workspaces:n}=e;return l.default.args(t,"function"),c.default.system.debug("WorkspaceClient.setWorkspaceOrder",e),new Promise(((r,i)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WORKSPACE_ORDER,n||e,((e,n)=>{this._serviceResponseHandler(e,n,r,i,t)}))}))}remove(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&!e.name&&!e.workspace&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.remove",e),new Promise((async(n,r)=>{e.name||(e.name=e.workspace?.name,delete e.workspace);const i=(await this.getActiveWorkspace()).data;if(e.name===i.name){c.default.system.error(`APPLICATION LIFECYCLE: Cannot remove active workspace: WorkspaceClient.remove:attempt to remove active workspace name:${i.name}`);const e="Cannot remove active workspace";return this._serviceResponseHandler(e,null,n,r,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.REMOVE,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}rename(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.oldName",e.oldName,"string","params.newName",e.newName,"string"),c.default.system.debug("WorkspaceClient.rename",e),new Promise(((n,r)=>{if(!e.overwriteExisting&&this.workspaceExists(e.newName)){const e="Workspace Already Exists";return this._serviceResponseHandler(e,null,n,r,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.RENAME,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}clone(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),delete e.name,e.newName||(e.newName=`${e.name}_clone`),e.removeOldWorkspace=!1,this.rename({removeOldWorkspace:!1,newName:e.newName,oldName:e.name},t)}save(e=Function.prototype){return c.default.system.debug("WorkspaceClient.save"),new Promise(((t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE,{},((r,i)=>{this._serviceResponseHandler(r,i,t,n,e)}))}))}workspaceExists(e){l.default.args(e,"string");for(let t=0;t<this.workspaces.length;t++)if(e===this.workspaces[t])return!0;return!1}saveAs(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.saveAs",e),new Promise(((n,r)=>{if(!e.force&&this.workspaceExists(e.name))return this._serviceResponseHandler("Workspace Already Exists",null,n,r,t);this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_AS,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}async switchTo(e,t=Function.prototype){l.default.args(e,"object",t,"function")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.switchTo",e);const n=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.SWITCH_TO,e);if(n.err)throw t(n.err,null),new Error(n.err);return t(n),n}async _setWindowState(e){if(!this.activeWorkspace)throw"Workspace is not yet ready";if(!this.activeWorkspace.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";return c.default.system.debug("WorkspaceClient.setWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WINDOW_STATE,e)}async _getWindowState(e){return c.default.system.debug("WorkspaceClient.getWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WINDOW_STATE,e)}async isWorkspaceDirty(e=Function.prototype){l.default.args(e,"function"),c.default.system.debug("WorkspaceClient.isWorkspaceDirty");const{err:t,response:n}=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE_DIRTY,{},(()=>{}));return e(t,n),n.data}async createWorkspace(e,t,n=((e,t)=>{e&&(c.default.system.error(`Error creating workspace: ${e}`),c.default.system.info(`Result from create workspace: ${t}`))})){c.default.system.log(`WorkspaceClient: Creating Workspace Request for name "${e}"`);const r=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.NEW_WORKSPACE,{workspaceName:e})).response.data;!1!==t.switchAfterCreation&&await this.switchTo({name:r});const i={workspaceName:r};return n(null,i),i}export(e,t){return l.default.args(e,"object",t,"function")&&l.default.args2("params.workspaceName",e.workspaceName,"string"),c.default.system.debug("WorkspaceClient.export",e),new Promise(((n,r)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.EXPORT,e,((i,o)=>{const s={};s[e.workspaceName]=o.data,this._serviceResponseHandler(i,{data:s},n,r,t)}))}))}async import(e,t){l.default.args(e,"object",t,"function=")&&l.default.args2("params.workspaceJSONDefinition",e.workspaceJSONDefinition,"object"),c.default.system.debug("WorkspaceClient.import",e);const n=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.IMPORT,e)).response.data;if(n&&n.err)throw t(n.err),new Error(n.err);return t&&t(null,n),n}exportToFile(e){c.default.system.info("workspaceClient.saveWorkspaceTemplateToConfigFile",e),l.default.args(e,"object")&&l.default.args2("params.workspaceTemplateDefinition",e.workspaceTemplateDefinition,"object");const{workspaceTemplateDefinition:t}=e;if("object"==typeof t){const e=Object.keys(t)[0];if(e&&t[e].templateDefinitionFlag){const n={workspaceTemplates:t};f.ConfigUtilInstance.promptAndSaveJSONToLocalFile(`workspaceConfig-${e}`,n)}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile. Input is not a legal template")}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile: Input is not a legal object")}async start(e){this.routerClient.subscribe("Finsemble.WorkspaceService.update",((t,n)=>{c.default.system.debug("workspaceClient init subscribe response",t,n),t?c.default.system.error(t):(this.activeWorkspace=n.data.activeWorkspace,this.workspaces=n.data.workspaces,e&&e())}))}}var g=new h({onReady:e=>{g.start(e)},name:"workspaceClient"});t.default=g},6192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window},5959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.httpDelete=t.httpPatch=t.httpPut=t.httpPost=t.httpGet=void 0;const n=200;t.httpGet=async function(e){let t=null,r=null;return await fetch(e).then((r=>{if(r.status==n)return r.json();t=`http get err for ${e}: ${r.status} ${r.statusText}`})).then((e=>{r=e})).catch((e=>{t=e})),{err:t,getData:r}},t.httpPost=async function(e,t){let r=null;return await fetch(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then((t=>{t.status!=n&&(r=`http post err for ${e}: ${t.status} ${t.statusText}`)})).catch((e=>{r=e})),{err:r}},t.httpPut=async function(e,t){let r=null;return await fetch(e,{method:"PUT",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then((t=>{t.status!=n&&(r=`http put err for ${e}: ${t.status} ${t.statusText}`)})).catch((e=>{r=e})),{err:r}},t.httpPatch=async function(e,t){let r=null;return await fetch(e,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then((t=>{t.status!=n&&(r=`http patch err for ${e}: ${t.status} ${t.statusText}`)})).catch((e=>{r=e})),{err:r}},t.httpDelete=async function(e){let t=null;return await fetch(e,{method:"DELETE"}).then((r=>{r.status!=n&&(t=`http delete err for ${e}: ${r.status} ${r.statusText}`)})).catch((e=>{t=e})),{err:t}}},4971:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t)=>{const r=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(r)>-1||(n.g[r]=new t),n.g[r]}},8379:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeysClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(n=t.WINDOWSTATE||(t.WINDOWSTATE={}))[n.NORMAL=0]="NORMAL",n[n.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",n[n.MAXIMIZED=2]="MAXIMIZED",n[n.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",n[n.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","compositeComponentData"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},3854:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const i=n(5939),o=r(n(9319)),s=n(8379),a=r(n(5020)),u=r(n(2551));class l extends i.EventEmitter{constructor(e){super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),delete this.startupTimer}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout")}),1e4)}}function c(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class d{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=c();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new l({dependencies:e,callback:t});return r.setStartupTimer(),r.on("timeout",(()=>{this.onDependencyTimeout(r)})),this.dependencies[n]=r,this.checkDependencies(),r}onDependencyTimeout(e){const t=this.getOfflineClients();let n="APPLICATION LIFECYCLE:STARTUP:Dependency not online after 10 seconds.";t.length&&(n=`${n} Waiting for these clients: ${t.join(", ")}.`),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:r}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),r&&r())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=c();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(u.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class p extends i.EventEmitter{constructor(){super(),this.startup=new d,this.shutdown=new f,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=p,t.FSBLDependencyManagerSingleton=new p,t.default=t.FSBLDependencyManagerSingleton},4232:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.removeKeys=t.toRecord=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.getProp=t.composeRL=t.instrumentPromise=t.promisify=t.identity=t.isNumber=t.chunkArray=t.Timeout=t.mockLogger=t.capitalizeFirst=t.clone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const i=n(586),o=r(n(89)),s=r(n(5892)),a=r(n(7184)),u=r(n(5162)),l=n(3998),c=r(n(2551)),d=window;function f(e,t){if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return t("clone error",e),e}}function p(e,t){return new Promise(((n,r)=>{const i=setTimeout((()=>{clearTimeout(i),r(t)}),e)}))}function h(e,t,n){return`${e}.${t}.${n}`}function g(e,t,n){const r=`${h(e.baseString,e.newPath,e.newValue)}`;c.default.system.deprecated(`${h(e.baseString,t,n)} has been deprecated in favor of ${r}`)}t.guuid=function(){return i.v4()},t.iAmAServiceWindow=function(){return!(!d.finsembleServices||!d.finsembleServices.length)},t.isServiceInWindow=function(e){return d.finsembleServices&&d.finsembleServices.find((t=>t.name===e))},t.clone=f,t.capitalizeFirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.mockLogger=new class{constructor({debug:e}={debug:!0}){e?(this.system=console,this.system.debug=console.log):this.system={warn:Function.prototype,debug:Function.prototype,log:Function.prototype,info:Function.prototype,error:console.error}}isLogMessage(){return!0}start(){}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.chunkArray=function(e,t){if(e<=0)throw new Error("Can't chunk array by number less than 0");return t.reduce(((n,r,i)=>{if(i%e==0){const r=[];for(let n=i;n<i+e;n++)n<t.length&&r.push(t[n]);n.push(r)}return n}),[])},t.isNumber=function(e){return!(!e||Number.isNaN(Number(e)))&&Number(e)},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((r,i)=>{n.push(((e,t)=>e?i(e):r(t))),e.apply(t,n)}))}},t.instrumentPromise=async(e,t,n)=>{const r=`${t} end`;return e(`${t} start`),n.then((()=>e(r)))},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getProp=function e(t,n,r){const i=Array.isArray(n)?n:n.split(".").filter((e=>e.length));return i.length?e(t[i.shift()],i,r):void 0===t?r:t},t.getRandomWindowName=function(e="RouterClient"){return`${e}-${i.v4()}`},t.timeoutPromise=p,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,p(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===(o.default(e,"windowIdentifier.windowType")||e.windowType)},t.toRecord=function(e,t){const n="string"==typeof e?t=>t[e]:e;return t.reduce(((e,t)=>(e[n(t)]=t,e)),{})},t.removeKeys=function(e,t){if(!e)return e;const n=Object.keys(e).filter((e=>!t.includes(e)));return s.default(e,n)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],r=s.default(e,n),i=s.default(t,n);return!!a.default(r,i)},t.sleep=function(e,t=!1){return new Promise(((n,r)=>{t?setTimeout((()=>{try{r("timeout expired")}catch{}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=function(e,t){const n=f(e,Function.prototype),r=f(t,Function.prototype);return u.default(n,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return u.default(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:r,oldPath:i,newPath:o,oldValue:s,newValue:a}=t;let u=l.ConfigUtilInstance.getDefault(e,h(r,o,a),null);return null===u&&(u=l.ConfigUtilInstance.getDefault(e,h(r,o,s),null),u?g(t,o,s):(u=l.ConfigUtilInstance.getDefault(e,h(r,i,a),null),u?g(t,i,a):(u=l.ConfigUtilInstance.getDefault(e,h(r,i,s),null),u?g(t,i,s):u=n))),u}},9459:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(9319)),u=o(n(8379));t.default=class{constructor(e,t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=t.data.guid,this.internalHandler()}async internalHandler(){this.data=this.queryMessage.data.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?(this.delayed=!0,this.queryMessage.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){this.completed=!0,this.delayed?a.default.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):this.queryMessage.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},3014:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(9319)),o=r(n(2551)),s=r(n(7815)),a=r(n(3601)),u=n(4232);class l extends s.default{constructor(e){super(e),this.eventList=[],this.eventHandlerMap={},this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.waitList={},i.default.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerListener(t?.data.event,t?.data.listenerGuid)})),i.default.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterListener(t?.data.event,t?.data.listenerGuid)}))}registerListener(e,t){this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t)}unregisterListener(e,t){this.remoteListenerEventMap[e]||o.default.system.warn("not found"),this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t))}awaitRemoteDelayer(e,t){return new Promise(((n,r)=>{const o=(s,a)=>{i.default.removeListener(`Finsemble.Listener.Done.${e}.${t}`,o),!0===a.data.canceled?r("canceled"):n(a.data.data)};this.waitList[e]=o,i.default.addListener(`Finsemble.Listener.Done.${e}.${t}`,o)}))}async queryRemoteListener(e,t,n,r){const o=`${window.name}_private_${Date.now()}_${Math.random()}`,s={event:e,guid:o,data:n},a=this.awaitRemoteDelayer(o,t);let{response:l}=await Promise.race([i.default.query(`Finsemble.Interrupt.${t}`,s,(()=>{})),u.sleep(r.initialQueryTimeout,!0)]).catch((()=>{throw i.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),"eventHandler failed initial response"}));if(l.header.error)return;let c=!0;if(!0===l.data.delayed)try{return c=!1,await Promise.race([a,u.sleep(r.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";c=!0}if(c&&i.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),!0===l.data.canceled)throw"event was canceled";return l.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){o.default.verbose(`Triggering ${e} for ${this.name}`,t);const r=[];if(this.remoteListenerEventMap[e])for(let i of this.remoteListenerEventMap[e])r.push(this.queryRemoteListener(e,i,t,n));if(this.eventHandlerMap[e]){const i=[...this.eventHandlerMap[e]],o=[...this.eventGuidMap[e]];for(let s=0;s<i.length;s++){const u=i[s],l=o[s],c=new a.default({source:this.name,sourceType:this.sourceType,handler:u,event:e,data:t,options:n,guid:l});r.push(c.complete)}}try{return await Promise.all(r)}catch(e){if("eventHandler failed initial response"!==e)throw"event was canceled";console.error(e)}}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_private_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n)}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("Trying to remove non-existent listener");let n=this.eventHandlerMap[e].indexOf(t);-1!==n&&(this.eventGuidMap[e][n],this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1))}cleanup(){}}t.default=l},3601:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(8379));t.default=class{constructor(e){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.data=e.data,this.guid=e.guid,s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled():this.eventComplete(e)}}},7815:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(9319)),o=r(n(2551)),s=r(n(9459));t.default=class{constructor(e){this.eventList=[],this.eventHandlerMap={},this.eventGuidMap={},this.name=e.name,this.sourceType=e.sourceType,window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_public_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n),i.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n}),i.default.addResponder(`Finsemble.Interrupt.${n}`,((r,i)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},i)}))}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("not found");let n=this.eventHandlerMap[e].indexOf(t);if(-1!==n){const t=this.eventGuidMap[e][n];this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1),i.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${window.name}`,{event:e,guid:t}),i.default.removeResponder(`Finsemble.Interrupt.${t}`)}}cleanup(){for(var e of Object.keys(this.eventHandlerMap))for(var t of this.eventHandlerMap[e])this.removeEventListener(e,t)}}},631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},2283:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(r=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",r.SNOOZE="SNOOZE",r.SPAWN="SPAWN",r.QUERY="QUERY",r.PUBLISH="PUBLISH",r.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},5016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.include=[],this.exclude=[]}}},1376:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},5320:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(1376));t.default=class{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new i.default,this.stateHistory=[]}}},2521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.id=e||null,this.filter=t}}},7673:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.is=t.log=t.createReducer=t.executeReducerBuilderCallback=t.unImmer=void 0;const i=n(8096),o=n(2956),s=r(n(2551));t.unImmer=e=>JSON.parse(JSON.stringify(e));const a=e=>{switch(e.type){case"RUN":return(e=>{let t={RUN:e.func.name};return e.args&&e.args.length>0&&(e.args.some((e=>"object"==typeof e))?t.args=e.args:t.args=e.args.join(" ")),e.successActionCreator&&(t.successActionCreator=e.successActionCreator.name),e.failActionCreator&&(t.successActionCreator=e.failActionCreator.name),t})(e);case"LIST":return{...e,cmds:e.cmds.map(a)};case"MAP":return{...e,tagger:e.tagger.name,nestedCmd:a(e.nestedCmd)};case"ACTION":return(e=>{const{type:t,...n}=e.actionToDispatch;return{ACTION:t,...n}})(e);case"NONE":default:return e}};class u{constructor(){this.commands=[]}run(...e){let t=o.Cmd.run(...e);return this.commands.push(t),t}action(e){let t=o.Cmd.action(e);return this.commands.push(t),t}list(...e){let t=o.Cmd.list(...e);return this.commands.push(t),t}map(e,t,n){let r=o.Cmd.map(e,t,n);return this.commands.push(r),r}clearTimeout(e){let t=o.Cmd.clearTimeout(e);return this.commands.push(t),t}clearInterval(e){let t=o.Cmd.clearInterval(e);return this.commands.push(t),t}setTimeout(e,t,n){let r=o.Cmd.setTimeout(e,t,n);return this.commands.push(r),r}setInterval(e,t,n){let r=o.Cmd.setInterval(e,t,n);return this.commands.push(r),r}}function l(e){const t={},n={addNoImmerCase(e,r){const i="string"==typeof e?e:e.type;return t[i]=(t[i]??[]).concat({reducer:r}),n},addCase(e,r){const i="string"==typeof e?e:e.type;return t[i]=(t[i]??[]).concat({loopReducer:r}),n}};return e(n),t}t.executeReducerBuilderCallback=l,t.createReducer=function(e,t){const n=l(t);return function(t=e,r){const l=n[r.type];if(!l?.length)return t;let c=[];const d=l.reduce(((e,t)=>{r.type.includes("/heartbeat")?s.default.system.debug(`Interop.${r.type}`,r):s.default.system.debug(`Interop.${r.type}`,e,r);const n=e=>{c=c.concat(e.commands)},a=new u;if(t){const{reducer:s,loopReducer:u}=t;if(s){const t=s(e,r);return o.isLoop(t)?(l=t[1],c=c.concat([l]),t[0]):t}if(u){if(!i.isDraft(e)){if(i.isDraftable(e))return i.produce(e,(e=>{u(e,r,a),n(a)}));{let t;if(u&&(t=u(e,r,a)),void 0===t){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n(a),t}}u(e,r,a),n(a)}}var l;return e}),t),f=o.Cmd.list(c),{"@@cmds":p,...h}=d,g=f.cmds.length>1?{...h,"@@cmds":f.cmds.map((e=>a(e)))}:1==f.cmds.length?{...h,"@@cmds":a(f.cmds[0])}:h;return o.loop(g,f)}},t.log=(e,t)=>{t?console.log(e,JSON.parse(JSON.stringify(t))):console.log(e,t)},t.is=e=>t=>t.type===e.type},8774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createReducer=t.remoteReduxServerEnhancer=t.remoteReduxClientEnhancer=void 0;var r=n(9200);Object.defineProperty(t,"remoteReduxClientEnhancer",{enumerable:!0,get:function(){return r.remoteReduxClientEnhancer}}),Object.defineProperty(t,"remoteReduxServerEnhancer",{enumerable:!0,get:function(){return r.remoteReduxServerEnhancer}});var i=n(7673);Object.defineProperty(t,"createReducer",{enumerable:!0,get:function(){return i.createReducer}})},9200:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.remoteReduxServerEnhancer=t.remoteReduxClientEnhancer=void 0;const i=r(n(9319)),o=n(8379),s=r(n(2551)),a=n(2956);t.remoteReduxClientEnhancer=({server:e,slice:t})=>n=>(r,o)=>{const a=n(((e,t)=>("@@finsemble/updateState"===t.type&&(e=t.newState),{...r(e,t)})),o),u={...a,dispatch:t=>(s.default.system.log(`Interop.remote.${t.type}`,a,t),"@@finsemble/updateState"==t.type?a.dispatch(t):t.type?i.default.query(e,t):t.then&&t.then(a.dispatch),t)},l=`${Date.now()}_${Math.random()}`;i.default.addListener(l,((e,t)=>{if(!e&&t){const e={type:"@@finsemble/updateState",newState:t?.data};u.dispatch(e)}}));const c=fin.desktop.Window.getCurrent().name;return i.default.query(e,{"@@finsemble/action":"subscribe","@@finsemble/slice":t,"@@finsemble/routerChannel":l,"@@finsemble/windowName":c},(()=>{})),u},t.remoteReduxServerEnhancer=({server:e})=>t=>n=>{s.default.info(`remoteReduxServerEnhancer: Starting on routerChannel ${e}`);const r={},u={},l=t(((e,t)=>{const o=n(e,t);return Object.entries(r).forEach((([e,t])=>{const n=a.getModel(o);n[e]!==u[e]&&(u[e]=n[e],t.forEach((t=>{i.default.transmit(t.routerChannel,n[e])})))})),o})),c={...l,dispatch:e=>l.dispatch(e)};return i.default.addListener(o.LAUNCHER_SERVICE.WINDOW_CLOSED,((e,t)=>{if(e)s.default.error(`remoteReduxServerEnhancer: Error in listenForWindowClosings() ${e}`);else{const{name:e}=t?.data;Object.keys(r).forEach((t=>{r[t]=r[t].filter((t=>t.windowName!==e)),r[t].length||delete r[t]}))}})),i.default.addResponder(e,(async(e,t)=>{if(e)s.default.error("remoteReduxServerEnhancer: Error adding responder.",e);else if(t){const{data:e,header:n}=t;e["@@finsemble/action"]?((e,t)=>{const{"@@finsemble/action":n,"@@finsemble/slice":o,"@@finsemble/routerChannel":a,"@@finsemble/windowName":c}=e;if(s.default.info(`remoteReduxServerEnhancer received ${n} for ${o} from ${c}`),"subscribe"===n){r[o]=(r[o]??[]).concat({windowName:c,routerChannel:a});const e=l.getState()?.[o];u[o]||(u[o]=e[o]),i.default.transmit(a,e)}else s.default.warn(`remoteReduxServerEnhancer: Unexpected "@@finsemble/action"=${n} received from ${t.origin}`)})(e,n):((e,t)=>{e?.type?c.dispatch({...e,"@@remoteHeader":{header:t}}):s.default.warn('remoteReduxServerEnhancer: Received invalid dispatch action. No "type" specified.',e)})(e,n),t.sendQueryResponse(null)}else s.default.error("remoteReduxServerEnhancer: No queryMessage received from remote client")})),c}},2369:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(2551)),o=n(1742),s={activeTransports:{},liveTransport:null,addTransport(e,t){this.activeTransports[e]=t,i.default.system.log(`RouterTransport ${e} added to activeTransports`)},getActiveTransports(e){const t=[];function n(e){-1===t.indexOf(e)&&t.push(e)}return o.System.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&n("SharedWorker"),n(e.sameDomainTransport),n(e.crossDomainTransport),i.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,r,i)=>new Promise(((o,a)=>{const u=s.activeTransports[t];u?s.liveTransport=new u(e,n,r,i,(e=>{o(e)})):a(`unknown router transport name: ${t}`)})),close(){s.liveTransport&&(s.liveTransport.close(),s.liveTransport=null)}},a=function(e,t,n,r,o){let s;const a=this;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),i.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){i.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=function(){return"SharedWorker"};const u=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;i.default.system.log(`SharedWorker Transport Initializing for ${n} using ${u}`),console.log(`SharedWorker Transport Initializing for ${n} using ${u}`),s=new SharedWorker(u,{name:"Finsemble",credentials:"include"}),s.port.onmessage=function(e){const n=e.data[0],r=e.data[1],o={transportID:a.identifier(),port:n};i.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",r),t(o,r)},s.onerror=function(e){i.default.system.error(`SharedWorkerTransport Transport Error${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>{s.port.close()},o(this)},u=function(e,t,n,r,s){const{uuid:a}=o.System.Application.getCurrent(),u=this;this.send=function(e,t){let n;1===arguments.length?(n=r,t=arguments[0]):(n=e.name,t=arguments[1]),i.default.system.verbose("IPCTransport Outgoing Transport",a,n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=function(){return"IPCBus"},i.default.system.log(`IPCBus Transport Initializing for ${n}`),console.log(`IPCBus Transport Initializing for ${n}`);const l=o.System.InterApplicationBus.subscribe("*",n,(function(e,n){const r={transportID:u.identifier(),senderUuid:n,name:e.header.origin};i.default.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(function(e){i.default.system.error(`IPCBus Subscribe Failure: ${e}`)}));this.close=()=>{o.System.InterApplicationBus.unsubscribe(l)},s(this)},l=function(e,t,n,r,o){const s=`${e?.transportSettings?.FinsembleTransport?.serverAddress??e?.transportSettings?.serverAddress??"ws://127.0.0.1:3376"}/router`,a=this;let u;function l(){i.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function c(){i.default.system.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),console.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),s.startsWith("ws:")||s.startsWith("wss:")||console.error(`Illegal WebSocket address "${s}" (Missing ws:// or wss:// ?)`),u=new WebSocket(s);const e=setTimeout(l,3e3);u.addEventListener("open",(()=>{clearTimeout(e),i.default.system.log("FinsembleTransport Connected to Server"),console.log("FinsembleTransport Connected to Server"),u.addEventListener("message",(e=>{const r=JSON.parse(e.data);("RouterService"===n&&"ROUTER_SERVICE"==r.dest||n===r.message.client)&&function(e){const n={transportID:a.identifier(),client:e.clientMessage.header.origin};i.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}(r.message)})),o(a)}))}this.send=function(e,t){let n,r;1===arguments.length?(n="ROUTER_SERVICE",r={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],r={client:e.client,clientMessage:t}),i.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",r),u.readyState===WebSocket.OPEN&&u.send(JSON.stringify({dest:n,message:r})),u.readyState===WebSocket.CONNECTING&&u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))})),u.readyState===WebSocket.CLOSED&&(c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},c()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",l),t.default=s},1742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const r=n(6925);class i{constructor(e,t,n){return new fin.desktop.Window(e,t)}static get getCurrent(){return fin.desktop.Window.getCurrent}static get wrap(){return fin.desktop.Window.wrap}}class o{constructor(e,t,n){t&&t()}static getCurrent(){const{windowName:e}=r.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{e&&e({})},addEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return{}}}class s{constructor(e,t,n){return new fin.desktop.Application(e,t)}static get getCurrent(){return fin.desktop.Application.getCurrent}static get wrap(){return fin.desktop.Application.wrap}}class a{constructor(e){new fin.desktop.Notification(e)}}class u{constructor(){return new fin.desktop.System.Clipboard}static get writeText(){return fin.desktop.System.Clipboard.writeText}static get writeHTML(){return fin.desktop.System.Clipboard.writeHTML}static get writeRTF(){return fin.desktop.System.Clipboard.writeRTF}static get readText(){return fin.desktop.System.Clipboard.readText}static get readHTML(){return fin.desktop.System.Clipboard.readHTML}static get readRTF(){return fin.desktop.System.Clipboard.readRTF}}class l{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return l.isFreestanding()?o:i}static get Notification(){return a}static get Clipboard(){return u}static async getMousePosition(e=Function.prototype){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),e(null,n),t(n)}),(t=>{e(t,null),n(t)}))}))}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e(n)}))}))}static container(){return"undefined"==typeof fin?"freestanding":fin.container?fin.container:"FEA"}static isBrowserView(){return!l.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!l.isFreestanding()&&fin.hasBrowserView()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get getAllApplications(){return fin.desktop.System.getAllApplications}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get getRuntimeInfo(){return fin.desktop.System.getRuntimeInfo}static get addEventListener(){return l.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getAllWindows(){return fin.desktop.System.getAllWindows}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static closeApplication(e,t=Function.prototype){return new Promise((n=>{let r,i=!1;const o=()=>{i||(console.log("Attempting to terminate",e.uuid),e.terminate((()=>{t(),n()}),(()=>{i||(i=!0,clearInterval(r),console.log("force closing ",e.uuid),e.terminate())})))};r=setInterval(o,2e3),console.log("closing ",e.uuid),e.close(!1,(()=>{console.log("app.close: successfully closed",e.uuid),i=!0,clearInterval(r),t(),n()}),o)}))}}t.System=l},5020:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(9319)),o=r(n(2551)),s=n(6188),a=n(3509),u=n(5269),l=new class{publishBootStatus(e,t,n){console.log("publishStartingStatus",e,n),o.default.system.debug("publishBootStatus",e,t,n),i.default.publish(u.statusChannel(e),{name:e,type:t,state:n})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((r,u)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const l=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const c=i.default.subscribe(a.STAGE_CHANNEL,((a,d)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data.stage,c),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===l)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),u(a);else{const a=s.ALL_BOOT_STAGES.indexOf(d.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data,c),"stageEntered"===t&&a+1>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,c,n.name),n(),r(),i.default.unsubscribe(c)):"stageCompleted"===t&&a>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,c),n(),r(),i.default.unsubscribe(c)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${l} `,a,l,e,c)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,r)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=i.default.subscribe(u.statusChannel(e),((a,u)=>{o.default.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,u),a?(o.default.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),r()):u.data.name===e&&"completed"===u.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),i.default.unsubscribe(s))}))}))}publishCheckpointState(e,t,n){console.log("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),o.default.system.debug("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),i.default.publish(u.checkpointChannel(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),i.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),i.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=l},6420:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.adjustBoundsToBeOnMonitor=t.isOnAMonitor=t.getNewBoundsWhenMovedToMonitor=t.openSharedData=t.injectJS=t.guuid=t.camelCase=t.getMyWindowIdentifier=t.getMonitorByDescriptor=t.windowOnMonitor=t.getMonitorFromCommand=t.getMonitor=t.getWhichMonitor=t.findMonitor=t.getWindowDescriptor=t.getFinWindow=t.getMonitorFromWindow=t.getMonitorFromXY=t.getAllMonitors=t.crossDomain=t.isPercentage=t.castToPromise=t.getContainerVersion=t.clone=t.Monitors=void 0;const i=r(n(6589)),o=n(1742),s=r(n(3802)),a=r(n(2551));function u(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?u(e[n],null):t[n];return t}function l(e,n){const r=Number.isFinite(e.x)?e.x:e.defaultLeft,i=Number.isFinite(e.y)?e.y:e.defaultTop,o=r+e.defaultWidth,s=i+e.defaultHeight;return new Promise(((e,l)=>{t.Monitors.getMonitorFromScaledXY(r,i,(c=>{if(!c)return a.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right"),void t.Monitors.getMonitorFromScaledXY(o,s,(o=>{if(!o)return a.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary"),void t.Monitors.getAllMonitors((t=>{t[0]?(n&&n(t[0]),e(t[0])):(l(new Error("Cannot find monitor for window.")),n&&n(null))}));o=u(o);const{monitorRect:s}=o;(s.left<r||s.right<i)&&(o.straddling=!0),n&&n(o),e(o)}));c=u(c);const{monitorRect:d}=c;(d.right>o||d.bottom>s)&&(c.straddling=!0),n&&n(c),e(c)}))}))}function c(e,t){return new Promise(((n,r)=>{const i=o.System.Window.getCurrent();i.getOptions((s=>{if(e&&e.windowName){e.uuid||(e.uuid=s.uuid);const i=o.System.Window.wrap(e.uuid,e.windowName);i.getInfo((()=>{t&&t(i),n(i)}),(()=>{t&&t(null),r(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}))}else if(e&&e.componentType)if(void 0!==window.LauncherService){const i=window.LauncherService.componentFinder(e);i?(n(i),t&&t(i)):(r(`util.getFinWindow: Component ${e.componentType} not found.`),t&&t(null))}else r("getFinWindow by componentType is currently only operable within LaunchService"),t&&t(null);else t&&t(i),n(i)}))}))}function d(e,t){return new Promise(((n,r)=>{c(e).then((e=>{e.getOptions((e=>{t&&t(e),n(e)}))})).catch((e=>{console.warn(e),t&&t(null),r(e)}))}))}function f(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if(i[t]===n)return i}return null}function p(e,n){let r;arguments.length>2&&(e={commandMonitor:arguments[0],monitors:arguments[1],launchingMonitorPosition:arguments[2]},n=null);let{commandMonitor:i,monitors:o,launchingMonitorPosition:s}=e;const a=i&&""!==i||0===i;if("primary"===i)r=f(o,"whichMonitor","primary");else if("next"===i){let e=s+1;e>=o.length&&(e=0),r=o[e]}else if("previous"===i){let e=s-1;e<0&&(e=o.length-1),r=o[e]}else if("mine"===i){var u=!0;activeWindows.getWindow(e.windowIdentifier.windowName)._getBounds(((e,i)=>{e?(r=o[0],n(r)):t.Monitors.getMonitorFromScaledXY(i.left,i.top,(e=>{n(e)}))}))}else a?(i>=o.length&&(i=o.length-1),r=o.filter((e=>e.position===i))[0]):s&&(r=o[s]);if(r||(r=o[0]),!u){if(!n)return r;n(r)}}function h(e,t){return new Promise(((n,r)=>{d(e,(e=>{e?l(e,(e=>{t&&t(e),n(e)})):r("util.getMonitor: Can't locate windowDescriptor.")}))}))}t.Monitors=new s.default(Function.prototype,Function.prototype,{System:o.System}),t.clone=u,t.getContainerVersion=function(e=Function.prototype){return new Promise((t=>{o.System.getVersion((n=>{const r=n.split(".").map(Number),i={major:r[0],chromium:r[1],minor:r[2],patch:r[3]};e(i),t({versionObject:i})}))}))},t.castToPromise=function(e){return function(...t){return new Promise(((n,r)=>{const i=e.apply(null,Array.from(t));try{return i.then(n,r)}catch(e){e instanceof TypeError?n(i):r(e)}}))}},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=!(n&&i&&r);return a.default.system.debug(`Launcher crossDomain=${o} (${n}:${r}:${i})`),o},t.getAllMonitors=t.Monitors.getAllMonitors,t.getMonitorFromXY=t.Monitors.getMonitorFromScaledXY,t.getMonitorFromWindow=l,t.getFinWindow=c,t.getWindowDescriptor=d,t.findMonitor=f,t.getWhichMonitor=p,t.getMonitor=h,t.getMonitorFromCommand=function(e,n,r){return new Promise((i=>{h(n,(n=>{t.Monitors.getAllMonitors((t=>{p({commandMonitor:e,monitors:t,launchingMonitorPosition:n.position},(e=>{r&&r(e),i(e)}))}))}))}))},t.windowOnMonitor=function(e,t){return e.left>=t.left&&e.left<t.right||e.right<=t.right&&e.right>t.left},t.getMonitorByDescriptor=function(e,t){return new Promise((n=>{l(e,(e=>{t&&t(e),n(e)}))}))},t.getMyWindowIdentifier=function(e){const t=o.System.Window.getCurrent();return new Promise((n=>{t.getOptions((r=>{let i=null;const{customData:o}=r;o&&o.component&&(i=o.component.type);const s={windowName:t.name,uuid:t.uuid,componentType:i};e&&e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.guuid=function(){return i.default()},t.injectJS=function(e,t){const n=document.createElement("script");n.onload=t,n.type="text/javascript",n.async=!0,n.src=e;const r=document.getElementsByTagName("head")[0],i=r.getElementsByTagName("script")[0];r.insertBefore(n,i)},t.openSharedData=function(e,t){const n=FSBL.Clients.LauncherClient,r=FSBL.Clients.LinkerClient;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const r of Object.keys(e))e[r].length>n&&(t=r,n=e[r].length);return[t]});const i=[],o={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((s,u)=>{for(const e of Object.keys(u))if(u[e].componentTypes.length)for(const t of u[e].componentTypes)o[t]?o[t].push(e):o[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;i.push(t),a.default.system.error(t)}let l=Object.keys(o);if(l.length){l.length>1&&(l=e.multipleOpenerHandler(o));const s=Object.keys(r.channels);if(s.length)if(r.getLinkedComponents({componentTypes:l,windowIdentifier:r.windowIdentifier()}).length||e.publishOnly)r.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(i.length?i:null,"Data published");else{for(const t of l)n.spawn(t,{data:{sharedData:e.data,linker:{channels:s}},addToWorkspace:!0});t&&t(i.length?i:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of l)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(i.length?i:null,"New Window(s) spawned with data")}}else t&&t(i.length?i:null,null)}))},t.getNewBoundsWhenMovedToMonitor=function(e,t,n="availableRect"){const r=e[n]||e.availableRect||e.monitorRect,i=u(t);return t.top<r.top?i.top=r.top:t.top>r.bottom-t.height&&(i.top=r.bottom-t.height),t.left<r.left?i.left=r.left:t.left>r.right-t.width&&(i.left=r.right-t.width),i.bottom=i.top+i.height,i.right=i.left+i.width,i.right>r.right&&(i.right=r.right),i.top<r.top&&(i.top=r.top),i.left<r.left&&(i.left=r.left),i.bottom>r.bottom&&(i.bottom=r.bottom),i.height=i.bottom-i.top,i.width=i.right-i.left,{newBounds:i,distanceMoved:Math.sqrt((t.left-i.left)**2+(t.top-i.top)**2),monitor:e}},t.isOnAMonitor=function(e){return this.Monitors.allMonitors.some((t=>{const{monitorRect:n}=t;return e.left>=n.left&&e.left<=n.right&&e.right>=n.left&&e.right<=n.right&&e.top>=n.top&&e.top<=n.bottom&&e.bottom>=n.top&&e.bottom<=n.bottom}))},t.adjustBoundsToBeOnMonitor=function(e,t="availableRect"){if(this.isOnAMonitor(e))return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),e;const n=this.Monitors.allMonitors.map((n=>{let r=n.rawMonitor?n.rawMonitor:n;return this.getNewBoundsWhenMovedToMonitor(r,e,t)})).sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",e,"monitor name",n.monitor.name,"newBounds",n.newBounds),n.newBounds},t.isWindows=async function(e=Function.prototype){const t=(await o.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return a.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},5688:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=s(n(9319)),u=s(n(2551)),l=o(n(6420)),c=s(n(7815)),d=o(n(8379)),f=n(4232),p=n(1742),h=s(n(9748)),g=n(428);window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class m extends c.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=m.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=d.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=l.camelCase("activeWorkspace",this.name,this.name),this.windowKey=l.camelCase("activeWorkspace",this.name),m.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t){if("closed"!==e||!window.finsembleWindow||this.name!==finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new m(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=m;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static getInstance(e,t=Function.prototype){const n=p.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),(e=h.default(e))&&e.name?(e.windowName=e.name,new Promise((async function(r,i){if(window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}if(e.uuid&&e.name){if(e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),!1!==e.waitForReady)try{await m._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}if(u.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally"),window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}const{wrap:n}=await m._createWrap(e);return r({wrap:n}),t(null,n)}if(!1!==e.waitForReady)try{await m._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}a.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async(n,o)=>{if(n)return u.default.system.error(n),i(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),r({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await m._createWrap(e);o.data.descriptor&&(a.descriptor=o.data.descriptor),r({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let r=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let i={...n};i=Object.assign(i,e),i.setWindowType=i.windowType,delete i.windowType,u.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=m;window._FSBLCache.windows[n.windowName]=new o(i),r=window._FSBLCache.windows[n.windowName],r.windowType=n.windowType,r.identifier=n,r.addEventListener("closed",r.handleWrapRemoveRequest),r.addEventListener("maximized",(()=>{r.windowState=m.WINDOWSTATE.MAXIMIZED})),r.addEventListener("minimized",(()=>{r.windowState=m.WINDOWSTATE.MINIMIZED})),r.addEventListener("restored",(()=>{r.windowState=m.WINDOWSTATE.NORMAL}));const s=a.default.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)u.default.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;r.wrapState=e,a.default.unsubscribe(s)}}));r.parentSubscribeID=a.default.subscribe(`Finsemble.parentChange.${n.windowName}`,((e,n)=>{if(e)u.default.system.error("FinsembleWindow parent change notification error",e),t({wrap:r});else{const e=n.data||{};"Added"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",e),r.setParent(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Exists"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",e),r.setParentOnWrap(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Removed"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",e),r.clearParent(),t({wrap:r})):e.type?(u.default.system.error("FinsembleWindow Parent Notification: unknown type",e),t({wrap:r})):t({wrap:r})}}))}))}static _getRemoveWrapChannel(e){return`${p.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.default.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==window.name&&this.name&&(delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name]),e&&e.done()}cleanupRouter(){const e=m._getRemoveWrapChannel(this.name);a.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.default.unsubscribe(this.parentSubscribeID)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){if("close"===e||"setParent"===e||"ready"===this.wrapState)return new Promise((async(r,i)=>{"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,u.default.setting().system.Debug&&(t.callstack=u.default.callStack()),u.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);let o=null;a.default.query(this.windowServiceChannelName(e),t,((t,s)=>{t?(u.default.system.debug(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t),"getComponentState"!==e&&"Not found"!==t&&i(t)):(o=s.data,u.default.system.debug(`${this.windowServiceChannelName(e)} successful`,o),console.debug(`${this.windowServiceChannelName(e)} successful`,o)),r(o),n(t,o)}))}));this.onReady((()=>{this.wrapState="ready",this.queryWindowService(e,t,n)}))}minimize(e=null,t=Function.prototype){this.queryWindowService("minimize",e,t)}maximize(e=null,t=Function.prototype){this.getBounds(((n,r)=>{n?u.default.system.warn("Error getting bounds, cached bounds will not be set"):this.updateOptions({options:{cachedLeft:r.left,defaultLeft:r.left,cachedTop:r.top,defaultTop:r.top,cachedWidth:r.width,defaultWidth:r.width,cachedHeight:r.height,defaultHeight:r.height}}),this.queryWindowService("maximize",e,t)}))}restore(e=null,t=Function.prototype){this.queryWindowService("restore",e,t)}blur(e=null,t=Function.prototype){this.queryWindowService("blur",e,t)}focus(e=null,t=Function.prototype){this.queryWindowService("focus",e,t)}bringToFront(e=null,t=Function.prototype){this.queryWindowService("bringToFront",e,t)}setAlwaysOnTop(e={alwaysOnTop:!0},t=Function.prototype){this.queryWindowService("setAlwaysOnTop",e,t)}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",{},t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const r={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",r,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new g.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t=Function.prototype){"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,t)}getBounds(e={},t=Function.prototype){return new Promise((n=>{this.queryWindowService("getBounds",e,((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t=Function.prototype){this.queryWindowService("hide",e,t)}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t=Function.prototype){this.queryWindowService("show",e,t)}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t=Function.prototype){u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(()=>{u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name),t()}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const r=()=>{a.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,r):r()}wrapReady(){a.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.default.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?u.default.system.warn("TabTile.stopTabTile: query failed",e):u.default.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(u.default.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){u.default.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.default.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.default.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?m.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}setParent(e,t){if(this.settingParent)return this.getParent(t);this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParent",e),m.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParent error",n):(u.default.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=r,this.parentWindow.windowType.includes("StackedWindow")||u.default.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.default.transmit(d.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const i=()=>{this.removeEventListener("parent-set",i),t(n,r)};this.addEventListener("parent-set",i)}))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParentOnWrap",e),m.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParentOnWrap error",n):(u.default.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=r,!1===this.parentWindow.windowType.includes("StackedWindow")&&u.default.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,r)}))}))}clearParent(){u.default.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.default.system.debug("Title change",e),a.default.publish(this.TITLE_CHANGED_CHANNEL,e)}getOptions(e=Function.prototype){this.queryWindowService("getOptions",{},e)}_privateManagementPreface(e,t){return"function"==typeof t&&u.default.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:this.identifier?.windowName,windowType:this.identifier?.windowType},u.default.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.default.query("StackedWindow.addWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.addWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.default.query("StackedWindow.removeWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.removeWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.default.query("StackedWindow.deleteWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.deleteWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.default.query("StackedWindow.setVisibleWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.setVisibleWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.default.query("StackedWindow.reorder",e,((e,r)=>{u.default.system.debug("StackedWindow.reorder callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=m,m.WINDOWSTATE={NORMAL:0,MINIMIZED:1,MAXIMIZED:2,HIDDEN:3},m.wrap=m.getInstance,m.isStartupApplication=async function(e){let t;const n=await new Promise(((e,t)=>{p.System.Application.getCurrent().getManifest(e,t)})).catch((()=>{t=!1}));return n&&(t=n&&n.startup_app&&n.startup_app.name===e),t},m._windowReady=function(e){let t;u.default.system.debug(`windowServiceReady: ${e} starting`);const n=`Finsemble.Component.State.${e}`;return new Promise((async(r,i)=>{await m.isStartupApplication(e)||f.isServiceInWindow(e)?i("Cannot Wrap Service Manager or Services"):(u.default.system.debug(`windowServiceReady: ${e} waiting`),t=a.default.subscribe(n,((n,i)=>{const{state:o}=i.data;switch(u.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.default.system.debug(`windowServiceReady: ${e} ${o}`),a.default.unsubscribe(t),r()}})))}))}},3509:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel","authentication"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},6188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BootReadyItem=t.BootConfigElement=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.BootConfigElement=class{},t.BootReadyItem=class{constructor(e,t,n){this.name=e,this.type=t,this.config=n}}},5269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=t.killOldApplications=void 0;const r=n(1742),i=n(3509);t.killOldApplications=function(e){return new Promise((async t=>{r.System.getAllApplications((async n=>{if(n)for(let t=0;t<n.length;t++){const i=n[t];if(i.uuid?.endsWith(`-${e}`)){const e=r.System.Application.wrap(i.uuid);await r.System.closeApplication(e)}}console.log("killOldApplications: finished closing old apps"),t()}))}))},t.statusChannel=function(e){return`${i.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${i.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},8801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},498:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4215:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9520:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(i=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",i.ErrorOnLaunch="ErrorOnLaunch",i.AppTimeout="AppTimeout",i.ResolverUnavailable="ResolverUnavailable",(r=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",r.ResolverUnavailable="ResolverUnavailable",r.ResolverTimeout="ResolverTimeout",(n=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",n.AccessDenied="AccessDenied",n.CreationFailed="CreationFailed"},5182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5644:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.versionIsAtLeast=t.compareVersionNumbers=t.getInfo=t.leaveCurrentChannel=t.getCurrentChannel=t.getOrCreateChannel=t.joinChannel=t.getSystemChannels=t.addContextListener=t.addIntentListener=t.raiseIntentForContext=t.raiseIntent=t.broadcast=t.findIntentsByContext=t.findIntent=t.open=t.fdc3Ready=void 0;const n=new Error("FDC3 DesktopAgent not available at `window.fdc3`."),r=new Error("Timed out waiting for `fdc3Ready` event."),i=new Error("`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent.");function o(e){return window.fdc3?e():Promise.reject(n)}function s(e){if(!window.fdc3)throw n;return e()}t.fdc3Ready=async(e=5e3)=>new Promise(((t,n)=>{if(window.fdc3)t();else{const o=setTimeout((()=>window.fdc3?t():n(r)),e);window.addEventListener("fdc3Ready",(()=>{clearTimeout(o),window.fdc3?t():n(i)}),{once:!0})}})),t.open=function(e,t){return o((()=>window.fdc3.open(e,t)))},t.findIntent=function(e,t){return o((()=>window.fdc3.findIntent(e,t)))},t.findIntentsByContext=function(e){return o((()=>window.fdc3.findIntentsByContext(e)))},t.broadcast=function(e){s((()=>window.fdc3.broadcast(e)))},t.raiseIntent=function(e,t,n){return o((()=>window.fdc3.raiseIntent(e,t,n)))},t.raiseIntentForContext=function(e,t){return o((()=>window.fdc3.raiseIntentForContext(e,t)))},t.addIntentListener=function(e,t){return s((()=>window.fdc3.addIntentListener(e,t)))},t.addContextListener=function(e,t){return s("function"!=typeof e?()=>window.fdc3.addContextListener(e,t):()=>window.fdc3.addContextListener(e))},t.getSystemChannels=function(){return o((()=>window.fdc3.getSystemChannels()))},t.joinChannel=function(e){return o((()=>window.fdc3.joinChannel(e)))},t.getOrCreateChannel=function(e){return o((()=>window.fdc3.getOrCreateChannel(e)))},t.getCurrentChannel=function(){return o((()=>window.fdc3.getCurrentChannel()))},t.leaveCurrentChannel=function(){return o((()=>window.fdc3.leaveCurrentChannel()))},t.getInfo=function(){return s((()=>window.fdc3.getInfo()))},t.compareVersionNumbers=(e,t)=>{try{let n=e.split(".").map(Number),r=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){if(e===n.length||n[e]<r[e])return-1;if(e===r.length||n[e]>r[e])return 1}return 0}catch(e){return console.error("Failed to compare version strings",e),null}},t.versionIsAtLeast=(e,n)=>{let r=t.compareVersionNumbers(e.fdc3Version,n);return null===r?null:r>=0}},5972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1767:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(n=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",n.ContactList="fdc3.contactList",n.Country="fdc3.country",n.Instrument="fdc3.instrument",n.Organization="fdc3.organization",n.Portfolio="fdc3.portfolio",n.Position="fdc3.position"},1966:(e,t)=>{"use strict";function n(e,t,n=""){if(n)throw Error(`Invalid value for key "${n}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function r(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function i(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,r,i=""){if("any"===t)return e;if(null===t)return null===e?e:n(t,e);if(!1===t)return n(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=p[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:n(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const i=e.length;for(let n=0;n<i;n++){const i=e[n];try{return o(t,i,r)}catch(e){}}return n(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,r))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,i){if(null===i||"object"!=typeof i||Array.isArray(i))return n("object",i);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0;s[n.key]=o(a,n.typ,r,n.key)})),Object.getOwnPropertyNames(i).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(i[n],t,r,n))})),s}(r(t),t.additional,e):n(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?n("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:n(e,t,i)}(t,e)}function s(e,t){return o(e,t,r)}function a(e,t){return o(e,t,i)}function u(e){return{arrayItems:e}}function l(...e){return{unionMembers:e}}function c(e,t){return{props:e,additional:t}}function d(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const p={Context:c([{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:c([{json:"contacts",js:"contacts",typ:u(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Contact:c([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),ContactID:c([{json:"email",js:"email",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")}],""),InstrumentList:c([{json:"instruments",js:"instruments",typ:u(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Instrument:c([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),InstrumentID:c([{json:"BBG",js:"BBG",typ:l(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"FIGI",js:"FIGI",typ:l(void 0,"")},{json:"ISIN",js:"ISIN",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")},{json:"RIC",js:"RIC",typ:l(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:l(void 0,"")},{json:"ticker",js:"ticker",typ:l(void 0,"")}],""),Country:c([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),CountryID:c([{json:"ISOALPHA2",js:"ISOALPHA2",typ:l(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:l(void 0,"")}],""),Organization:c([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),OrganizationID:c([{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"LEI",js:"LEI",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")}],""),Portfolio:c([{json:"positions",js:"positions",typ:u(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Position:c([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any")}},8832:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(8801),t),i(n(7661),t),i(n(498),t),i(n(5972),t),i(n(4215),t),i(n(9600),t),i(n(9520),t),i(n(5644),t),i(n(6129),t),i(n(1854),t),i(n(5182),t),i(n(6611),t),i(n(1767),t),i(n(1966),t),i(n(7178),t)},7178:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(n=t.Intents||(t.Intents={})).StartCall="StartCall",n.StartChat="StartChat",n.ViewChart="ViewChart",n.ViewContact="ViewContact",n.ViewQuote="ViewQuote",n.ViewNews="ViewNews",n.ViewInstrument="ViewInstrument",n.ViewAnalysis="ViewAnalysis"},5090:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDx0aXRsZT5mZi1kZWxldGUtY2lyY2xlPC90aXRsZT4NCiAgICA8ZyBpZD0iU3ltYm9scyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIGlkPSJmZi1kZWxldGUtY2lyY2xlIiBmaWxsPSIjRkZGRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iPg0KICAgICAgICAgICAgPHBhdGggZD0iTTguOCwxNS44IEM4LjYsMTUuOCA4LjQsMTUuNyA4LjMsMTUuNiBDOCwxNS4zIDgsMTQuOCA4LjMsMTQuNSBMMTQuNCw4LjMgQzE0LjcsOCAxNS4yLDggMTUuNSw4LjMgQzE1LjgsOC42IDE1LjgsOS4xIDE1LjUsOS40IEw5LjQsMTUuNiBDOS4yLDE1LjcgOSwxNS44IDguOCwxNS44IiBpZD0iUGF0aCI+PC9wYXRoPg0KICAgICAgICAgICAgPHBhdGggZD0iTTE0LjksMTUuOCBDMTQuNywxNS44IDE0LjUsMTUuNyAxNC40LDE1LjYgTDguMyw5LjQgQzgsOS4xIDgsOC42IDguMyw4LjMgQzguNiw4IDkuMSw4IDkuNCw4LjMgTDE1LjUsMTQuNSBDMTUuOCwxNC44IDE1LjgsMTUuMyAxNS41LDE1LjYgQzE1LjMsMTUuNyAxNS4xLDE1LjggMTQuOSwxNS44IiBpZD0iUGF0aCI+PC9wYXRoPg0KICAgICAgICAgICAgPHBhdGggZD0iTTExLjYsMS42IEM2LjEsMS42IDEuNiw2LjIgMS42LDExLjcgQzEuNiwxNy4zIDYuMSwyMS44IDExLjYsMjEuOCBDMTcuMSwyMS44IDIxLjYsMTcuMiAyMS42LDExLjcgQzIxLjYsNi4xIDE3LjEsMS42IDExLjYsMS42IFogTTExLjYsMjMuNCBDNS4yLDIzLjQgMCwxOC4xIDAsMTEuNyBDMCw1LjMgNS4yLDAgMTEuNiwwIEMxOCwwIDIzLjIsNS4yIDIzLjIsMTEuNyBDMjMuMiwxOC4yIDE3LjksMjMuNCAxMS42LDIzLjQgTDExLjYsMjMuNCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg=="},1639:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjIzcHgiIGhlaWdodD0iMjNweCIgdmlld0JveD0iMCAwIDIzIDIzIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDx0aXRsZT5TaGFyZSBXaGl0ZTwvdGl0bGU+DQogICAgPGcgaWQ9IlNoYXJlLVdoaXRlIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4NCiAgICAgICAgPGcgaWQ9IlBhZ2UtMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDEuMDAwMDAwKSIgZmlsbD0iI0ZGRkZGRiI+DQogICAgICAgICAgICA8ZyBpZD0iR3JvdXAtMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOC4wMDAwMDAsIDAuNDc5MTAwKSI+DQogICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0LjMyNzE3MTcsNi4wNjQ4MDg1OSBDMTQuMzU4Nzg0Myw2LjAxODIyMTU3IDE0LjM5NTM4ODQsNS45NzY2MjYwMiAxNC40MTcwMTgxLDUuOTI1MDQ3NTQgQzE0LjQ5ODU0NTQsNS43MjM3MjUwNyAxNC40OTg1NDU0LDUuNDk5MTA5MDkgMTQuNDE3MDE4MSw1LjI5OTQ1MDQ0IEMxNC4zOTUzODg0LDUuMjQ2MjA4MTQgMTQuMzU4Nzg0Myw1LjIwNDYxMjU5IDE0LjMyNzE3MTcsNS4xNTgwMjU1NyBDMTQuMzAwNTUwNiw1LjExOTc1NzY2IDE0LjI4NTU3NjIsNS4wNzQ4MzQ0NyAxNC4yNTIyOTk3LDUuMDM5ODk0MiBMMTQuMjM1NjYxNSw1LjAyNDkxOTgxIEMxNC4yMzU2NjE1LDUuMDIzMjU1OTggMTQuMjM1NjYxNSw1LjAyMzI1NTk4IDE0LjIzMzk5NzcsNS4wMjMyNTU5OCBMOS43MzUwMjI4NCwwLjI1OTczMzQzOSBDOS40MTg4OTY2NSwtMC4wNzEzNjcxNSA4Ljg5MzEyODg5LC0wLjA4OTY2OTE5MjYgOC41NTg3MDA2NSwwLjIyNjQ1Njk5OCBDOC4yMjU5MzYyNCwwLjU0MjU4MzE4OCA4LjIxMDk2MTg0LDEuMDY4MzUwOTYgOC41MjcwODgwMywxLjQwMjc3OTE5IEwxMS43MTgyOTg3LDQuNzgwMzM3OTYgTDIuOTkxNTUyMDYsNC43ODAzMzc5NiBDMS4zNDEwNDA1OCw0Ljc4MDMzNzk2IDAsNi40MzQxNzcwOSAwLDguNDY5MDMxNDYgTDAsMTAuNjkwMjMzOSBDMCwxMS4xNTExMTI2IDAuMzcxMDMyMzE4LDExLjUyMjE0NDkgMC44MzE5MTEwMjgsMTEuNTIyMTQ0OSBDMS4yOTExMjU5MSwxMS41MjIxNDQ5IDEuNjYzODIyMDYsMTEuMTUxMTEyNiAxLjY2MzgyMjA2LDEwLjY5MDIzMzkgTDEuNjYzODIyMDYsOC40NjkwMzE0NiBDMS42NjM4MjIwNiw3LjM3MDkwODkgMi4yNzExMTcxMSw2LjQ0NDE2MDAyIDIuOTkxNTUyMDYsNi40NDQxNjAwMiBMMTEuNzE4Mjk4Nyw2LjQ0NDE2MDAyIEw4LjUyNzA4ODAzLDkuODIwMDU0OTcgQzguMjEwOTYxODQsMTAuMTU0NDgzMiA4LjIyNTkzNjI0LDEwLjY3ODU4NzEgOC41NTg3MDA2NSwxMC45OTYzNzcyIEM4LjcyMDA5MTM5LDExLjE0Nzc4NSA4LjkyNjQwNTMzLDExLjIyNDMyMDggOS4xMzEwNTU0NCwxMS4yMjQzMjA4IEM5LjM1MjM0Mzc3LDExLjIyNDMyMDggOS41NzE5NjgyOCwxMS4xMzYxMzgyIDkuNzM1MDIyODQsMTAuOTYxNDM2OSBMMTQuMjMzOTk3Nyw2LjIwMTI0MiBDMTQuMjM1NjYxNSw2LjE5OTU3ODE4IDE0LjIzNTY2MTUsNi4xOTk1NzgxOCAxNC4yMzU2NjE1LDYuMTk5NTc4MTggTDE0LjI1MjI5OTcsNi4xODI5Mzk5NiBDMTQuMjg1NTc2Miw2LjE0Nzk5OTY5IDE0LjMwMDU1MDYsNi4xMDMwNzY1IDE0LjMyNzE3MTcsNi4wNjQ4MDg1OSIgaWQ9IkZpbGwtMSI+PC9wYXRoPg0KICAgICAgICAgICAgPC9nPg0KICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLCAyLjQ3OTEwMCkiPg0KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMS45NzA3NzAyLDE4LjUxNjY3NTcgTDAuODMxOTExMDI4LDE4LjUxNjY3NTcgQzAuMzcyNjk2MTQsMTguNTE2Njc1NyAwLDE4LjE0Mzk3OTUgMCwxNy42ODQ3NjQ2IEwwLDAuODMxOTExMDI4IEMwLDAuMzcxMDMyMzE4IDAuMzcyNjk2MTQsMCAwLjgzMTkxMTAyOCwwIEw1LjQwNzQyMTY4LDAgQzUuODY2NjM2NTcsMCA2LjIzOTMzMjcxLDAuMzcxMDMyMzE4IDYuMjM5MzMyNzEsMC44MzE5MTEwMjggQzYuMjM5MzMyNzEsMS4yOTExMjU5MSA1Ljg2NjYzNjU3LDEuNjYzODIyMDYgNS40MDc0MjE2OCwxLjY2MzgyMjA2IEwxLjY2MzgyMjA2LDEuNjYzODIyMDYgTDEuNjYzODIyMDYsMTYuODUyODUzNiBMMjEuMTM4ODU5MiwxNi44NTI4NTM2IEwyMS4xMzg4NTkyLDEwLjc0OTk1NDMgQzIxLjEzODg1OTIsMTAuMjkwNzM5NCAyMS41MTE1NTU0LDkuOTE4MDQzMjcgMjEuOTcwNzcwMiw5LjkxODA0MzI3IEMyMi40Mjk5ODUxLDkuOTE4MDQzMjcgMjIuODAyNjgxMywxMC4yOTA3Mzk0IDIyLjgwMjY4MTMsMTAuNzQ5OTU0MyBMMjIuODAyNjgxMywxNy42ODQ3NjQ2IEMyMi44MDI2ODEzLDE4LjE0Mzk3OTUgMjIuNDI5OTg1MSwxOC41MTY2NzU3IDIxLjk3MDc3MDIsMTguNTE2Njc1NyIgaWQ9IkZpbGwtNCI+PC9wYXRoPg0KICAgICAgICAgICAgPC9nPg0KICAgICAgICA8L2c+DQogICAgPC9nPg0KPC9zdmc+"},306:e=>{"use strict";e.exports=JSON.parse('{"name":"@finsemble/finsemble-core","main":"dist/index.js","types":"types/index.d.ts","version":"6.1.4","description":"Finsemble is an application framework providing infrastructure, services, and components for quickly building HTML5 multi-window financial desktop applications.","scripts":{"do-audit":" improved-yarn-audit --min-severity high","build":"gulp build --production","build-docs":"gulp --gulpfile gulpfile-docs.js build-docs","clean":"gulp clean","dev":"gulp build --watch","dev:fresh":"gulp build --clean --watch","docs":"set DEBUG=gulp-jsdoc3&&gulp --gulpfile=./gulpfile-docs.js docs-server","lint":"eslint --ext .js,.jsx,.ts,.tsx ./src/**","lint-fix":"eslint --fix --ext .js,.jsx,.ts,.tsx ./src/**","lint-stats":"eslint --format node_modules/eslint-stats/byErrorAndWarning.js --ext .js,.jsx,.ts,.tsx ./src/**","monodev":"yarn dev","obfuscate":"gulp build --production --obfuscate","prod":"gulp build --production","test":"ts-mocha","test-coverage":"nyc ts-mocha && nyc merge .nyc_output ../../.nyc_output/core.json","types":"gulp types"},"author":"Cosaic","license":"SEE LICENSE IN LICENSE","dependencies":{"@babel/core":"7.14.6","@babel/preset-env":"7.14.7","@babel/preset-react":"7.14.5"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"1.0.1","@reduxjs/toolkit":"1.6.1","@types/chai":"4.2.21","@types/deepmerge":"2.2.0","@types/lodash":"4.14.171","@types/mocha":"9.0.0","@types/node":"12.12.7","@typescript-eslint/eslint-plugin":"4.28.3","@typescript-eslint/parser":"4.28.4","ajv":"6.12.2","async":"3.2.0","babel-loader":"8.2.2","browser-sync":"2.27.4","case-sensitive-paths-webpack-plugin":"2.4.0","chai":"4.2.0","chalk":"4.1.1","copy-webpack-plugin":"6.4.1","css-loader":"3.5.3","deepmerge":"1.3.2","del":"6.0.0","esm":"~3.2.25","fast-check":"2.17.0","file-loader":"6.2.0","file-saver":"2.0.5","fs-extra":"2.1.2","fuse.js":"6.4.6","git-rev-sync":"3.0.1","gulp":"4.0.0","gulp-javascript-obfuscator":"^1.1.6","gulp-jsdoc3":"3.0.0","gulp-plumber":"1.2.1","gulp-rename":"1.2.3","gulp-string-replace":"1.1.2","gulp-watch":"5.0.1","immutable":"4.0.0-rc.14","improved-yarn-audit":"^2.3.2","jsdoc":"3.6.6","jszip":"3.6.0","lodash":"4.17.21","mocha":"^8.0.1","mock-socket":"9.0.3","nyc":"15.1.0","p-limit":"3.1.0","p-queue":"7.1.0","pretty-hrtime":"1.0.3","prop-types":"15.7.2","react":"17.0.2","react-dom":"17.0.2","react-redux":"7.2.4","react-virtualized":"9.22.3","redux-devtools":"3.7.0","redux-devtools-chart-monitor":"1.7.2","redux-devtools-log-monitor":"2.1.0","redux-loop":"6.1.0","require-directory":"2.1.1","resize-observer-polyfill":"1.5.1","rimraf":"3.0.2","sass-loader":"12.1.0","searchjs":"1.1.0","shelljs":"0.8.4","sinon":"11.1.1","sinon-chai":"3.7.0","source-map-loader":"3.0.0","style-loader":"3.2.1","superagent":"6.1.0","taffydb":"2.7.3","to-string-loader":"1.1.6","ts-loader":"9.2.3","ts-mocha":"8.0.0","typedoc":"0.17.8","typescript":"4.3.5","url-loader":"4.1.0","uuid":"3.0.1","vinyl-sourcemaps-apply":"0.2.1","webpack":"5.45.1","webpack-glob-entries":"1.0.1","worker-farm":"1.7.0"},"resolutions":{"ts-mocha/ts-node":"^10.1.0","xmlhttprequest-ssl":"1.6.3","underscore":"1.12.1","ua-parser-js":"0.7.24","javascript-obfuscator":"2.15.5"}}')},7063:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};return(()=>{"use strict";var e=i;Object.defineProperty(e,"__esModule",{value:!0});const t=r(6192),n=r(7e3),o=r(4361),s=r(9319),a=r(6925);t.Globals.FSBL&&console.warn("FSBL.js - Global object FSBL already exists (window.FSBL). Was finsemble-desktop-api-preload.js imported twice?"),(async()=>{window.top===window&&(t.Globals.FSBL=new n.FSBLDesktop,t.Globals.fdc3=new o.FinsembleDesktopAgent({routerClient:s.RouterConnectionSingleton,startup:a.Startup.getInstance()}),await t.Globals.FSBL.startApp(),window.addEventListener("unload",(()=>{t.Globals.FSBL.stopApp()})))})()})(),i})()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FSBLDesktopApiPreload=t():e.FSBLDesktopApiPreload=t()}(self,(function(){return(()=>{var e={7664:(e,t,n)=>{"use strict";function r(e,...t){return(...n)=>e(...t,...n)}function i(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>ht,apply:()=>r,applyEach:()=>T,applyEachSeries:()=>D,asyncify:()=>c,auto:()=>R,autoInject:()=>$,cargo:()=>q,cargoQueue:()=>V,compose:()=>Q,concat:()=>Z,concatLimit:()=>J,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>re,detectSeries:()=>ie,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>ce,eachLimit:()=>de,eachOf:()=>I,eachOfLimit:()=>L,eachOfSeries:()=>M,eachSeries:()=>fe,ensureAsync:()=>pe,every:()=>he,everyLimit:()=>ge,everySeries:()=>me,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>Ce,forever:()=>_e,groupBy:()=>Ae,groupByLimit:()=>Le,groupBySeries:()=>Ee,log:()=>Ie,map:()=>O,mapLimit:()=>K,mapSeries:()=>k,mapValues:()=>Te,mapValuesLimit:()=>Oe,mapValuesSeries:()=>Me,memoize:()=>ke,nextTick:()=>De,parallel:()=>je,parallelLimit:()=>Re,priorityQueue:()=>Be,queue:()=>Pe,race:()=>$e,reduce:()=>G,reduceRight:()=>Ue,reflect:()=>ze,reflectAll:()=>He,reject:()=>Ve,rejectLimit:()=>Ge,rejectSeries:()=>Ye,retry:()=>Ke,retryable:()=>Ze,seq:()=>Y,series:()=>Xe,setImmediate:()=>l,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>rt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>lt,unmemoize:()=>ct,until:()=>ft,waterfall:()=>pt,whilst:()=>dt,all:()=>he,allLimit:()=>ge,allSeries:()=>me,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>re,findSeries:()=>ie,flatMap:()=>Z,flatMapLimit:()=>J,flatMapSeries:()=>X,forEach:()=>ce,forEachSeries:()=>fe,forEachLimit:()=>de,forEachOf:()=>I,forEachOfSeries:()=>M,forEachOfLimit:()=>L,inject:()=>G,foldl:()=>G,foldr:()=>Ue,select:()=>be,selectLimit:()=>Se,selectSeries:()=>Ce,wrapSync:()=>c,during:()=>dt,doDuring:()=>ae});var o="function"==typeof setImmediate&&setImmediate,s="object"==typeof process&&"function"==typeof process.nextTick;function a(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var l=u(o?setImmediate:s?process.nextTick:a);function c(e){return p(e)?function(...t){const n=t.pop();return d(e.apply(this,t),n)}:i((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return d(r,n);n(null,r)}))}function d(e,t){return e.then((e=>{f(t,null,e)}),(e=>{f(t,e&&e.message?e:new Error(e))}))}function f(e,t,n){try{e(t,n)}catch(e){l((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function h(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?c(e):e}function g(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function m(e){return function(t,...n){return g((function(r){var i=this;return e(t,((e,t)=>{h(e).apply(i,n.concat(t))}),r)}))}}function y(e,t,n,r){t=t||[];var i=[],o=0,s=h(n);return e(t,((e,t,n)=>{var r=o++;s(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function v(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const w={};function b(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function S(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function C(e,t,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function l(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,u,c),u++,l()}})).catch(d))}function c(e,t){if(a-=1,!o)return e?d(e):!1===e?(i=!0,void(o=!0)):t===w||i&&a<=0?(i=!0,r(null)):void l()}function d(e){o||(s=!1,i=!0,r(e))}l()}var _=e=>(t,n,r)=>{if(r=b(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return C(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return C(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(v(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t,n,r,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(o):(n=(t=e)?Object.keys(t):[],r=-1,i=n.length,function(){var e=n[++r];return r<i?{value:t[e],key:e}:null})}(t),o=!1,s=!1,a=0,u=!1;function l(e,t){if(!s)if(a-=1,e)o=!0,r(e);else if(!1===e)o=!0,s=!0;else{if(t===w||o&&a<=0)return o=!0,r(null);u||c()}}function c(){for(u=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,S(l))}u=!1}c()},L=g((function(e,t,n,r){return _(t)(e,h(n),r)}),4);function A(e,t,n){n=b(n);var r=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++i!==o&&t!==w||n(null))}for(0===o&&n(null);r<o;r++)t(e[r],r,S(a))}function E(e,t,n){return L(e,1/0,t,n)}var I=g((function(e,t,n){return(v(e)?A:E)(e,h(t),n)}),3),O=g((function(e,t,n){return y(I,e,t,n)}),3),T=m(O),M=g((function(e,t,n){return L(e,1,t,n)}),3),k=g((function(e,t,n){return y(M,e,t,n)}),3),D=m(k);const N=Symbol("promiseCallback");function j(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[N]=new Promise(((n,r)=>{e=n,t=r})),n}function R(e,t,n){"number"!=typeof t&&(n=t,t=null),n=b(n||j());var r=Object.keys(e).length;if(!r)return n(null);t||(t=r);var i={},o=0,s=!1,a=!1,u=Object.create(null),l=[],c=[],d={};function f(e,t){l.push((()=>function(e,t){if(!a){var r=S(((t,...r)=>{if(o--,!1!==t)if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach((e=>{l[e]=i[e]})),l[e]=r,a=!0,u=Object.create(null),s)return;n(t,l)}else i[e]=r,(u[e]||[]).forEach((e=>e())),p();else s=!0}));o++;var l=h(t[t.length-1]);t.length>1?l(i,r):l(r)}}(e,t)))}function p(){if(!s){if(0===l.length&&0===o)return n(null,i);for(;l.length&&o<t;)l.shift()()}}function g(t){var n=[];return Object.keys(e).forEach((r=>{const i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return f(t,[n]),void c.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return f(t,n),void c.push(t);d[t]=i,r.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+r.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--i&&f(t,n)}))}))})),function(){for(var e=0;c.length;)e++,g(c.pop()).forEach((e=>{0==--d[e]&&c.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),p(),n[N]}var P=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,W=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,F=/,/,x=/(=.+)?(\s*)$/,B=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function $(e,t){var n={};return Object.keys(e).forEach((t=>{var r,i=e[t],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))r=[...i],i=r.pop(),n[t]=r.concat(r.length>0?a:i);else if(s)n[t]=i;else{if(r=function(e){const t=e.toString().replace(B,"");let n=t.match(P);if(n||(n=t.match(W)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,r]=n;return r.replace(/\s/g,"").split(F).map((e=>e.replace(x,"").trim()))}(i),0===i.length&&!o&&0===r.length)throw new Error("autoInject task functions require explicit parameters.");o||r.pop(),n[t]=r.concat(a)}function a(e,t){var n=r.map((t=>e[t]));n.push(t),h(i)(...n)}})),R(n,t)}class U{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):z(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):z(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function z(e,t){e.length=1,e.head=e.tail=t}function H(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var r=h(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var c=!1;function d(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?n?o(e):i():t.length<=1?i(t[0]):void i(t)}y.started=!0;var a={data:e,callback:n?s:r||s};if(t?y._tasks.unshift(a):y._tasks.push(a),c||(c=!0,l((()=>{c=!1,y.process()}))),n||!r)return new Promise(((e,t)=>{i=e,o=t}))}function f(e){return function(t,...n){i-=1;for(var r=0,s=e.length;r<s;r++){var a=e[r],l=o.indexOf(a);0===l?o.shift():l>0&&o.splice(l,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}i<=y.concurrency-y.buffer&&u("unsaturated"),y.idle()&&u("drain"),y.process()}}function p(e){return!(0!==e.length||!y.idle()||(l((()=>u("drain"))),0))}const g=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,r){const i=(...r)=>{a(e,i),((e,r)=>{if(e)return n(e);t(r)})(...r)};s[e].push(i)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var m=!1,y={_tasks:new U,*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!1,t)))}return d(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!0,t)))}return d(e,!1,!0,t)},kill(){a(),y._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!1,t)))}return d(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!0,t)))}return d(e,!0,!0,t)},remove(e){y._tasks.remove(e)},process(){if(!m){for(m=!0;!y.paused&&i<y.concurrency&&y._tasks.length;){var e=[],t=[],n=y._tasks.length;y.payload&&(n=Math.min(n,y.payload));for(var s=0;s<n;s++){var a=y._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===y._tasks.length&&u("empty"),i===y.concurrency&&u("saturated");var l=S(f(e));r(t,l)}m=!1}},length:()=>y._tasks.length,running:()=>i,workersList:()=>o,idle:()=>y._tasks.length+i===0,pause(){y.paused=!0},resume(){!1!==y.paused&&(y.paused=!1,l(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:g("saturated")},unsaturated:{writable:!1,value:g("unsaturated")},empty:{writable:!1,value:g("empty")},drain:{writable:!1,value:g("drain")},error:{writable:!1,value:g("error")}}),y}function q(e,t){return H(e,1,t)}function V(e,t,n){return H(e,t,n)}var G=g((function(e,t,n,r){r=b(r);var i=h(n);return M(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function Y(...e){var t=e.map(h);return function(...e){var n=this,r=e[e.length-1];return"function"==typeof r?e.pop():r=j(),G(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[N]}}function Q(...e){return Y(...e.reverse())}var K=g((function(e,t,n,r){return y(_(t),e,n,r)}),4),J=g((function(e,t,n,r){var i=h(n);return K(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4),Z=g((function(e,t,n){return J(e,1/0,t,n)}),3),X=g((function(e,t,n){return J(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,r,i,o)=>{var s,a=!1;const u=h(i);n(r,((n,r,i)=>{u(n,((r,o)=>r||!1===r?i(r):e(o)&&!s?(a=!0,s=t(!0,n),i(null,w)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=g((function(e,t,n){return te((e=>e),((e,t)=>t))(I,e,t,n)}),3),re=g((function(e,t,n,r){return te((e=>e),((e,t)=>t))(_(t),e,n,r)}),4),ie=g((function(e,t,n){return te((e=>e),((e,t)=>t))(_(1),e,t,n)}),3);function oe(e){return(t,...n)=>h(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=g((function(e,t,n){n=S(n);var r,i=h(e),o=h(t);function s(e,...t){if(e)return n(e);!1!==e&&(r=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...r):void 0}return a(null,!0)}),3);function ue(e,t,n){const r=h(t);return ae(e,((...e)=>{const t=e.pop();r(...e,((e,n)=>t(e,!n)))}),n)}function le(e){return(t,n,r)=>e(t,r)}var ce=g((function(e,t,n){return I(e,le(h(t)),n)}),3),de=g((function(e,t,n,r){return _(t)(e,le(h(n)),r)}),4),fe=g((function(e,t,n){return de(e,1,t,n)}),3);function pe(e){return p(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?l((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var he=g((function(e,t,n){return te((e=>!e),(e=>!e))(I,e,t,n)}),3),ge=g((function(e,t,n,r){return te((e=>!e),(e=>!e))(_(t),e,n,r)}),4),me=g((function(e,t,n){return te((e=>!e),(e=>!e))(M,e,t,n)}),3);function ye(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],o=0;o<t.length;o++)i[o]&&n.push(t[o]);r(null,n)}))}function ve(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,o)=>{if(n)return r(n);o&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,n,r){return(v(t)?ye:ve)(e,t,h(n),r)}var be=g((function(e,t,n){return we(I,e,t,n)}),3),Se=g((function(e,t,n,r){return we(_(t),e,n,r)}),4),Ce=g((function(e,t,n){return we(M,e,t,n)}),3),_e=g((function(e,t){var n=S(t),r=h(pe(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2),Le=g((function(e,t,n,r){var i=h(n);return K(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(n,s)?n[s].push(a):n[s]=[a]}return r(e,n)}))}),4);function Ae(e,t,n){return Le(e,1/0,t,n)}function Ee(e,t,n){return Le(e,1,t,n)}var Ie=oe("log"),Oe=g((function(e,t,n,r){r=b(r);var i={},o=h(n);return _(t)(e,((e,t,n)=>{o(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4);function Te(e,t,n){return Oe(e,1/0,t,n)}function Me(e,t,n){return Oe(e,1,t,n)}function ke(e,t=(e=>e)){var n=Object.create(null),r=Object.create(null),o=h(e),s=i(((e,i)=>{var s=t(...e);s in n?l((()=>i(null,...n[s]))):s in r?r[s].push(i):(r[s]=[i],o(...e,((e,...t)=>{e||(n[s]=t);var i=r[s];delete r[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var De=u(s?process.nextTick:o?setImmediate:a),Ne=g(((e,t,n)=>{var r=v(t)?[]:{};e(t,((e,t,n)=>{h(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function je(e,t){return Ne(I,e,t)}function Re(e,t,n){return Ne(_(t),e,n)}function Pe(e,t){var n=h(e);return H(((e,t)=>{n(e[0],t)}),t,1)}class We{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&xe(this.heap[e],this.heap[t=Fe(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&xe(this.heap[t+1],this.heap[t])&&(t+=1),!xe(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=Fe(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function Fe(e){return(e+1>>1)-1}function xe(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=Pe(e,t);return n._tasks=new We,n.push=function(e,t=0,r=(()=>{})){if("function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return l((()=>n.drain()));for(var i=0,o=e.length;i<o;i++){var s={data:e[i],priority:t,callback:r};n._tasks.push(s)}l(n.process)},delete n.unshift,n}var $e=g((function(e,t){if(t=b(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)h(e[n])(t)}),2);function Ue(e,t,n,r){var i=[...e].reverse();return G(i,t,n,r)}function ze(e){var t=h(e);return i((function(e,n){return e.push(((e,...t)=>{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)})),t.apply(this,e)}))}function He(e){var t;return Array.isArray(e)?t=e.map(ze):(t={},Object.keys(e).forEach((n=>{t[n]=ze.call(this,e[n])}))),t}function qe(e,t,n,r){const i=h(n);return we(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var Ve=g((function(e,t,n){return qe(I,e,t,n)}),3),Ge=g((function(e,t,n,r){return qe(_(t),e,n,r)}),4),Ye=g((function(e,t,n){return qe(M,e,t,n)}),3);function Qe(e){return function(){return e}}function Ke(e,t,n){var r={times:5,intervalFunc:Qe(0)};if(arguments.length<3&&"function"==typeof e?(n=t||j(),t=e):(Je(r,e),n=n||j()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=h(t),o=1;function s(){i(((e,...t)=>{!1!==e&&(e&&o++<r.times&&("function"!=typeof r.errorFilter||r.errorFilter(e))?setTimeout(s,r.intervalFunc(o-1)):n(e,...t))}))}return s(),n[N]}function Je(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Qe(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Ze(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;p(t)&&(n+=1);var r=h(t);return i(((t,i)=>{function o(e){r(...t,e)}return(t.length<n-1||null==i)&&(t.push(i),i=j()),e?Ke(e,o,i):Ke(o,i),i[N]}))}function Xe(e,t){return Ne(M,e,t)}var et=g((function(e,t,n){return te(Boolean,(e=>e))(I,e,t,n)}),3),tt=g((function(e,t,n,r){return te(Boolean,(e=>e))(_(t),e,n,r)}),4),nt=g((function(e,t,n){return te(Boolean,(e=>e))(M,e,t,n)}),3),rt=g((function(e,t,n){var r=h(t);return O(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3);function it(e,t,n){var r=h(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",n&&(r.info=n),a=!0,o(r)}),t),r(...i)}))}function ot(e,t,n,r){var i=h(n);return K(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,r)}function st(e,t,n){return ot(e,1/0,t,n)}function at(e,t,n){return ot(e,1,t,n)}function ut(e,t,n,r){arguments.length<=3&&"function"==typeof t&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=b(r||j());var i=h(n);return I(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[N]}var lt=g((function(e,t){var n,r=null;return fe(e,((e,t)=>{h(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))}));function ct(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=g((function(e,t,n){n=S(n);var r=h(t),i=h(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...o):void 0}return i(a)}),3);function ft(e,t,n){const r=h(e);return dt((e=>r(((t,n)=>e(t,!n)))),t,n)}var pt=g((function(e,t){if(t=b(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){h(e[n++])(...t,S(i))}function i(i,...o){if(!1!==i)return i||n===e.length?t(i,...o):void r(o)}r([])}));const ht={apply:r,applyEach:T,applyEachSeries:D,asyncify:c,auto:R,autoInject:$,cargo:q,cargoQueue:V,compose:Q,concat:Z,concatLimit:J,concatSeries:X,constant:ee,detect:ne,detectLimit:re,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:ce,eachLimit:de,eachOf:I,eachOfLimit:L,eachOfSeries:M,eachSeries:fe,ensureAsync:pe,every:he,everyLimit:ge,everySeries:me,filter:be,filterLimit:Se,filterSeries:Ce,forever:_e,groupBy:Ae,groupByLimit:Le,groupBySeries:Ee,log:Ie,map:O,mapLimit:K,mapSeries:k,mapValues:Te,mapValuesLimit:Oe,mapValuesSeries:Me,memoize:ke,nextTick:De,parallel:je,parallelLimit:Re,priorityQueue:Be,queue:Pe,race:$e,reduce:G,reduceRight:Ue,reflect:ze,reflectAll:He,reject:Ve,rejectLimit:Ge,rejectSeries:Ye,retry:Ke,retryable:Ze,seq:Y,series:Xe,setImmediate:l,some:et,someLimit:tt,someSeries:nt,sortBy:rt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:lt,unmemoize:ct,until:ft,waterfall:pt,whilst:dt,all:he,allLimit:ge,allSeries:me,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:re,findSeries:ie,flatMap:Z,flatMapLimit:J,flatMapSeries:X,forEach:ce,forEachSeries:fe,forEachLimit:de,forEachOf:I,forEachOfSeries:M,forEachOfLimit:L,inject:G,foldl:G,foldr:Ue,select:be,selectLimit:Se,selectSeries:Ce,wrapSync:c,during:dt,doDuring:ae}},3998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var r=s(n(2551)),i=n(1742),o=s(n(3059));function s(e){return e&&e.__esModule?e:{default:e}}const a=new function(){const e=this;this.resolveConfigVariables=function(e,t){let n=0,i=0,o=!0;function s(e){const t=e.split(/[/\\:?=&\s]/);for(let n=0;n<t.length;n++)if("$"===t[n][0]){const i=t[n].substring(1);let s=a(i);if(void 0!==s){const a=e.replace(t[n],s);r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveString configString",t[n],i,s,"old value=",e,"value=",a),o=!0,e=a}}return e}function a(t){let n=e[t];return void 0===n&&(e.custom?(n=e.custom[t],void 0===n&&r.default.system.warn("ConfigUtil.resolveString",`Missing [${t}] variable from finsemble.custom configuration object`)):r.default.system.error("ConfigUtil.resolveString",`Missing "custom" node from finsemble configuration - unable to get variable resoution for variable: ${t}`)),n}function u(e,t,n){r.default.system.verbose("forceObjectsToLogger","resolveArray","pass",t,"recursionLevel",n,"configArray:",e);for(let r=0;r<e.length;r++){const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&l(i,t,n+1)}}function l(e,t,n){e=e||{},r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveObject","pass",t,"recursionLevel",n,"configObject:",e),Object.keys(e).forEach((r=>{const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&l(i,t,n+1)}))}for(;o&&i++<100;)o=!1,l(t,++n,1);i>=100&&r.default.system.error("forceObjectsToLogger","resolveConfigVariables exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)},this.getExpandedRawManifest=function(t,n){function o(t,s,a){r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getRawManifest",s,a),s.getManifest((n=>{r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",n),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",n),t(n)}),(e=>{e&&(r.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e),n&&n()),s.getParentUuid((e=>{const n=i.System.Application.wrap(e);r.default.system.debug("forceObjectsToLogger","uuid",e,"parentApplication",n),a<10?o(t,n,++a):t("could not find manifest in parent applications")}))}))}r.default.system.debug("ConfigUtil.getExpandedRawManifest starting"),i.System.ready((()=>{const e=i.System.Application.getCurrent();o(t,e,1)}))},this.readConfigFile=function(e,t){r.default.system.debug(`fetching ${e}`),fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`Failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e)}))},this.getInitialManifest=function(t){i.System.ready((()=>{i.System.Application.getCurrent().getManifest((n=>{n.finsemble=n.finsemble||{},e.resolveConfigVariables(n.finsemble,n.finsemble),n.finsemble.applicationRoot||r.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const i=`${n.finsemble.moduleRoot}/configs/core/config.json`;e.readConfigFile(i,((o,s)=>{o?r.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${n.finsemble.moduleRoot}; Full Path=${i}`,o):(Object.keys(s).forEach((e=>{if("importConfig"===e){n.finsemble.importConfig=n.finsemble.importConfig||[];for(let e=0;e<s.importConfig.length;e++)n.finsemble.importConfig.unshift(s.importConfig[e])}else if("importThirdPartyConfig"===e){n.finsemble.importThirdPartyConfig=n.finsemble.importThirdPartyConfig||[];for(let e=0;e<s.importThirdPartyConfig.length;e++)n.finsemble.importThirdPartyConfig.unshift(s.importThirdPartyConfig[e])}else n.finsemble[e]=s[e]})),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",n)),t(n)}))}))}))},this.promptAndSaveJSONToLocalFile=function(e,t){r.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),i=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",o),s.click()},this.configFormatForExport=function(e,t){r.default.system.debug("configFormatForExport starting",e,t);let n=o.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n},this.getDefault=function(e,t,n){let r=n;if(e){try{const n=t.split(".");let i=e;for(let e=1;e<n.length;e++)i=i[n[e]];r=i}catch(e){r=n}void 0===r&&(r=n)}return r},this.getFile=async function(e,t=Function.prototype){r.default.system.debug(`fetching import ${e}`);let n=null;return await fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e),n=e})),n}};t.ConfigUtilInstance=a},3802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(5939),i=u(n(2551)),o=u(n(8021)),s=u(n(1879)),a=n(4232);function u(e){return e&&e.__esModule?e:{default:e}}let l;class c extends r.EventEmitter{constructor(e,t,n){if(super(),!n||!n.System)throw new Error("Monitors class requires dependency injection. Ensure that System is being passed in.");({System:l}=n),this.cachedMonitorInfo=null,this.limitedMonitorRefreshQueue=new o.default({concurrency:1}),this.bindAllFunctions(),this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(e))),l.addEventListener("monitor-info-changed",(()=>{this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))})),l.addEventListener("session-changed",(e=>{e&&("object"!=typeof e||!e.hasOwnProperty("reason")||"unlock"!==e.reason&&"remote-connect"!==e.reason&&"unknown"!==e.reason)||this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))}))}bindAllFunctions(){let e=this;for(let t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){let n=e[t];n instanceof Function&&n!==c&&(e[t]=e[t].bind(e))}}asyncIt(e,t){return t(e),e}rationalizeMonitor(e){e.monitorRect.width=e.monitorRect.right-e.monitorRect.left,e.monitorRect.height=e.monitorRect.bottom-e.monitorRect.top,e.availableRect.width=e.availableRect.right-e.availableRect.left,e.availableRect.height=e.availableRect.bottom-e.availableRect.top}calculateMonitorScale(e,t){return(t.right-t.left)/(e.right-e.left)}monitorInfoIsChanged(e,t){if(!e||!t)return!0;if(e.nonPrimaryMonitors.length!==t.nonPrimaryMonitors.length)return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.availableRect,t.primaryMonitor.availableRect))return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.monitorRect,t.primaryMonitor.monitorRect))return!0;e.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0)),t.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0));let n=!1;return e.nonPrimaryMonitors.forEach(((e,r)=>{const i=t.nonPrimaryMonitors[r];(0,a.checkIfBoundsAreEqual)(e.availableRect,i.availableRect)&&(0,a.checkIfBoundsAreEqual)(e.monitorRect,i.monitorRect)||(n=!0)})),n}async refreshMonitors(e=Function.prototype){this.limitedMonitorRefreshQueue.clear();const t=await l.getMonitorInfo();if(!this.monitorInfoIsChanged(this.cachedMonitorInfo,t))return i.default.system.info("Skipped refreshMonitors because monitors do not change."),e(this.allMonitors);this.allMonitors=[];let{primaryMonitor:n}=t;if(Object.entries(n).length){n.whichMonitor="primary",n.position=0,this.allMonitors.push(Object.assign({},n));for(let e=0;e<t.nonPrimaryMonitors.length;e++){let n=t.nonPrimaryMonitors[e];n.whichMonitor=e,n.position=e+1,this.allMonitors.push(n)}for(let e=0;e<this.allMonitors.length;e++){let t=this.allMonitors[e];this.rationalizeMonitor(t)}this.cachedMonitorInfo=(0,s.default)(t),e(this.allMonitors),this.ready=!0,1===this.limitedMonitorRefreshQueue.pending&&this.emit("monitors-changed",{monitors:this.allMonitors})}else i.default.system.info("There is no primary monitor in 'monitorInfo' - the system is still in the process of updating the monitor information. Returning from monitorsAndScaling -> refreshMonitors")}getAllMonitors(e=Function.prototype){return this.ready?this.asyncIt(JSON.parse(JSON.stringify(this.allMonitors)),e):e?void this.refreshMonitors(e):"not ready"}getMonitorFromScaledXY(e,t,n=Function.prototype){return new Promise((r=>{if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromScaledXY(e,t,n)})),"not ready";let i=null;for(var o=this.allMonitors,s=0;s<o.length;s++){var a=o[s],{monitorRect:u}=a;if(e>=u.left&&e<u.right&&t>=u.top&&t<u.bottom){i=a;break}}r(i),n(i)}))}getMonitorFromUnscaledXY(e,t,n=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromUnscaledXY(e,t,n)})),"not ready";for(var r=this.allMonitors,i=0;i<r.length;i++){var o=r[i],s=o.monitor.scaledRect;if(e>=s.left&&e<s.right&&t>=s.top&&t<s.bottom)return this.asyncIt(o,n)}return this.asyncIt(null,n)}async translatePointFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointFromScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var{monitor:r}=e;r||(r=(await this.getMonitorFromScaledXY(n.x,n.y)).data);let i=null;if(r){var o=n.x-r.monitorRect.left,s=n.y-r.monitorRect.top,a=o*r.deviceScaleFactor,u=s*r.deviceScaleFactor;i={x:a+r.monitor.scaledRect.left,y:u+r.monitor.scaledRect.top}}return t(i),Promise.resolve(i)}translatePointToScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointToScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var r=e.monitor||this.getMonitorFromUnscaledXY(n.x,n.y);if(!r)return this.asyncIt(null,t);var i=n.x-r.monitor.scaledRect.left,o=n.y-r.monitor.scaledRect.top,s=i/r.deviceScaleFactor,a=o/r.deviceScaleFactor,u={x:s+r.monitorRect.left,y:a+r.monitorRect.top};return this.asyncIt(u,t)}async translateRectToScaled(e,t=Function.prototype){let n;if(!this.ready)return this.refreshMonitors((()=>{this.translateRectToScaled(e,t)})),"not ready";var r=this.translatePointToScaled({x:e.left,y:e.top}),i=this.translatePointToScaled({x:e.right,y:e.bottom});return!r&&i&&(n=await this.getMonitorFromScaledXY(i),r=this.translatePointToScaled({monitor:n,point:{x:e.left,y:e.top}})),!i&&r&&(n=await this.getMonitorFromScaledXY(i),i=this.translatePointToScaled({monitor:n,point:{x:e.right,y:e.bottom}})),this.asyncIt({top:r?r.y:null,left:r?r.x:null,bottom:i?i.y:null,right:i?i.x:null,height:r&&i?i.y-r.y:null,width:r&&i?i.x-r.x:null},t)}translateRectFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translateRectFromScaled(e,t)})),"not ready";var n=this.translatePointFromScaled({x:e.left,y:e.top}),r=this.translatePointFromScaled({x:e.right,y:e.bottom});return!n&&r&&(n=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(r),point:{x:e.left,y:e.top}})),!r&&n&&(r=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(n),point:{x:e.right,y:e.bottom}})),this.asyncIt({top:n?n.y:null,left:n?n.x:null,bottom:r?r.y:null,right:r?r.x:null,height:n&&r?r.y-n.y:null,width:n&&r?r.x-n.x:null},t)}}var d=c;t.default=d},9886:(e,t)=>{"use strict";function r(e,t){const n=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<n.length;++t){const r=n[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(r in e))return null;e=e[r]}return e}function i(e,t){const n=[];for(const r in e){const i=`${t}.`;r.includes(i)&&(n.push(r),delete e[r])}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.byString=r,t.initObject=function e(t,r,i){let o;if(r||(r=null),"object"!=typeof t)return o=r?`${r}.${n}`:n,void(i[o]=r);for(const n in t)"object"==typeof t[n]&&"undefined"!==t[n]?(o=r?`${r}.${n}`:n,i[o]=r,e(t[n],o,i)):(o=r?`${r}.${n}`:n,i[o]=r)},t.mapField=function e(t,n,i){if(i[n])return;const o=(n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),s=n;if(!i.hasOwnProperty(s)){let e=null;o.length>1&&(o.pop(),e=o.join(".")),i[s]=e}const a=r(t,s);if("undefined"!==a&&"object"==typeof a)for(const n in a)e(t,`${s}.${n}`,i)},t.checkForObjectChange=function(e,t,n){const o=r(e,t);return null!==o&&("object"==typeof o||"object"!=typeof o&&"object"==typeof t?i(n,t):null)},t.setPath=void 0,t.setPath=(e,t,n)=>t.split(".").reduce(((e,r)=>e[r]=t.split(".").pop()===r?n:e[r]||{}),e)},1014:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new function(){let e=3;this.diagLevel=function(){return e},this.setDiagLevel=function(t){e=t},this.validationEnabled=function(){return e>=4}};t.default=n},3699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(2551)),i=n(3998),o=n(1742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var l=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(10).default),u.getValue({field:"finsemble"},((t,n)=>{a=i.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(a)})))},this.alert=function(e,t,n,r,i){const o=this;i&&i.url?this.alertInternal(e,t,n,r,i,i.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,r,i,s)}))},this.alertInternal=function(n,i,a,u,l,c){let d=!1;const f=`UserNotification.alert.${a}`,p=(l=l||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":f in e?d=!1:(d=!0,e[f]=!0);break;case"MAX-COUNT":{let e=0;const n=l.maxCount||1;f in t&&(e=t[f]),t[f]=++e,e<=n&&(d=!0);break}default:d=!0}if(r.default.log("UserNotification.alert",n,d,i,a,u,l),d){const e={url:c,message:u,timeout:p};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=l},3712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(1014))&&r.__esModule?r:{default:r},o=new function(){function e(e,t,n){const r=function(){try{throw Error("")}catch(e){return e}}(),i=r.stack.split("\n")[5],o=i.indexOf("at "),s=i.slice(o+2,i.length),a=r.stack.split("\n")[6],u=a.indexOf("at "),l=a.slice(u+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${l}`)}this.args=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%2!=0)for(let r=0;r<n;r+=2){let n=!1;const i=arguments[r];let o=arguments[r+1];if("="===o.slice(-1)&&(o=o.slice(0,-1),n=!0),typeof i!==o&&!(n&&void 0===i||void 0!==i&&"any"===o)){e(r/2+1,i,o),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t},this.args2=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%3!=0)for(let r=0;r<n;r+=3){let n=!1;const i=arguments[r],o=arguments[r+1];let s=arguments[r+2];if("="===s.slice(-1)&&(s=s.slice(0,-1),n=!0),typeof o!==s&&!(n&&void 0===o||void 0!==o&&"any"===s)){e(i,o,s),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t}};t.default=o},1921:(e,t,n)=>{(t=n(352)(!1)).push([e.id,"/**\n * The contents of this file are dynamically injected as a <style> tag\n * within the scrim container element.\n */\n:root {\n\t--accent-primary-1: #36788b;\n\t--accent-negative: #f26666;\n\t--scrim-positive-background-color: var(--accent-primary-1);\n\t--scrim-negative-background-color: var(--accent-negative);\n}\n\n.fsbl-share-scrim {\n\tposition: fixed;\n\tdisplay: flex;\n\theight: 100%;\n\twidth: 100%;\n\tz-index: 1000000;\n\ttop: 0;\n\tleft: 0;\n\tjustify-content: center;\n\talign-content: center;\n\tflex-direction: column;\n\talign-items: center;\n\ttransition: all 0.3s ease;\n\topacity: 0.85;\n\tbackground-color: var(--scrim-positive-background-color);\n}\n\n.fsbl-share-scrim .error-message {\n\tdisplay: flex;\n\theight: 100%;\n\talign-content: center;\n\tjustify-content: center;\n\talign-items: center;\n\tpadding: 1em;\n\tbackground-color: var(--scrim-negative-background-color);\n}\n\n.fsbl-share-scrim img {\n\tdisplay: flex;\n\theight: 10%;\n\twidth: 10%;\n\tz-index: 1000000;\n\ttop: 0;\n\tleft: 0;\n\tjustify-content: center;\n\talign-content: center;\n\tflex-direction: column;\n\talign-items: center;\n}\n\n.fsbl-share-scrim.no {\n\tbackground-color: var(--scrim-negative-background-color);\n}\n",""]),e.exports=t},352:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,o=e[1]||"",s=e[3];if(!s)return o;if(t&&"function"==typeof btoa){var a=(n=s,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),u=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[o].concat(u).concat([a]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<e.length;a++){var u=[].concat(e[a]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},3034:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,s),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,r);break;case 4:c[l].fn.call(c[l].context,t,r,i);break;default:if(!u)for(f=1,u=new Array(d-1);f<d;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||i&&!a[u].once||r&&a[u].context!==r)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},5939:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,o,s,l;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,c=h(u,l);for(n=0;n<l;++n)r(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},8096:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[X]}function o(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===te}(e)||Array.isArray(e)||!!e[Z]||!!e.constructor[Z]||p(e)||h(e))}function s(e){return i(e)||r(23,e),e[X].t}function a(e,t,n){void 0===n&&(n=!1),0===u(e)?(n?Object.keys:ne)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function u(e){var t=e[X];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:p(e)?2:h(e)?3:0}function l(e,t){return 2===u(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===u(e)?e.get(t):e[t]}function d(e,t,n){var r=u(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e){return Y&&e instanceof Map}function h(e){return Q&&e instanceof Set}function g(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=re(e);delete t[X];for(var n=ne(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function y(e,t){return void 0===t&&(t=!1),w(e)||i(e)||!o(e)||(u(e)>1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return y(t,!0)}),!0)),e}function v(){r(2)}function w(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=ie[e];return t||r(18,e),t}function S(e,t){ie[e]||(ie[e]=t)}function C(){return V}function _(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function L(e){A(e),e.p.forEach(I),e.p=null}function A(e){e===V&&(V=e.l)}function E(e){return V={p:[],l:V,h:e,m:!0,_:0}}function I(e){var t=e[X];0===t.i||1===t.i?t.j():t.O=!0}function O(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.g||b("ES5").S(t,e,i),i?(n[X].P&&(L(t),r(4)),o(e)&&(e=T(t,e),t.l||k(t,e)),t.u&&b("Patches").M(n[X],e,t.u,t.s)):e=T(t,n,[]),L(t),t.u&&t.v(t.u,t.s),e!==J?e:void 0}function T(e,t,n){if(w(t))return t;var r=t[X];if(!r)return a(t,(function(i,o){return M(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return k(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=m(r.k):r.o;a(3===r.i?new Set(i):i,(function(t,o){return M(e,r,i,t,o,n)})),k(e,i,!1),n&&e.u&&b("Patches").R(r,n,e.u,e.s)}return r.o}function M(e,t,n,r,s,a){if(i(s)){var u=T(e,s,a&&t&&3!==t.i&&!l(t.D,r)?a.concat(r):void 0);if(d(n,r,u),!i(u))return;e.m=!1}if(o(s)&&!w(s)){if(!e.h.F&&e._<1)return;T(e,s),t&&t.A.l||k(e,s)}}function k(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&y(t,n)}function D(e,t){var n=e[X];return(n?g(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function j(e){e.P||(e.P=!0,e.l&&j(e.l))}function R(e){e.o||(e.o=m(e.t))}function P(e,t,n){var r=p(t)?b("MapSet").N(t,n):h(t)?b("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:C(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=oe;n&&(i=[r],o=se);var s=Proxy.revocable(i,o),a=s.revoke,u=s.proxy;return r.k=u,r.j=a,u}(t,n):b("ES5").J(t,n);return(n?n.A:C()).p.push(r),r}function W(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[X],i=u(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=F(t,i),r.I=!1}else n=F(t,i);return a(n,(function(t,i){r&&c(r.t,t)===i||d(n,t,e(i))})),3===i?new Set(n):n}(e)}function F(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function x(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[X];return oe.get(t,e)},set:function(t){var n=this[X];oe.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][X];if(!i.P)switch(i.i){case 5:r(i)&&j(i);break;case 4:n(i)&&j(i)}}}function n(e){for(var t=e.t,n=e.k,r=ne(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==X){var s=t[o];if(void 0===s&&!l(t,o))return!0;var a=n[o],u=a&&a[X];if(u?u.t!==s:!f(a,s))return!0}}var c=!!t[X];return r.length!==ne(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var o={};S("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var o=re(n);delete o[X];for(var s=ne(o),a=0;a<s.length;a++){var u=s[a];o[u]=e(u,t||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,t),o={i:r?5:4,A:n?n.A:C(),P:!1,I:!1,D:{},l:n,t,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,X,{value:o,writable:!0}),i},S:function(e,n,o){o?i(n)&&n[X].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[X];if(n){var i=n.t,o=n.k,s=n.D,u=n.i;if(4===u)a(o,(function(t){t!==X&&(void 0!==i[t]||l(i,t)?s[t]||e(o[t]):(s[t]=!0,j(n)))})),a(i,(function(e){void 0!==o[e]||l(o,e)||(s[e]=!1,j(n))}));else if(5===u){if(r(n)&&(j(n),s.length=!0),o.length<i.length)for(var c=o.length;c<i.length;c++)s[c]=!1;else for(var d=i.length;d<o.length;d++)s[d]=!0;for(var f=Math.min(o.length,i.length),p=0;p<f;p++)void 0===s[p]&&e(o[p])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}function B(){function e(t){if(!o(t))return t;if(Array.isArray(t))return t.map(e);if(p(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(h(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return l(t,Z)&&(n[Z]=t[Z]),n}function t(t){return i(t)?e(t):t}var n="add";S("Patches",{$:function(t,i){return i.forEach((function(i){for(var o=i.path,s=i.op,a=t,l=0;l<o.length-1;l++){var d=u(a),f=o[l];0!==d&&1!==d||"__proto__"!==f&&"constructor"!==f||r(24),"function"==typeof a&&"prototype"===f&&r(24),"object"!=typeof(a=c(a,f))&&r(15,o.join("/"))}var p=u(a),h=e(i.value),g=o[o.length-1];switch(s){case"replace":switch(p){case 2:return a.set(g,h);case 3:r(16);default:return a[g]=h}case n:switch(p){case 1:return a.splice(g,0,h);case 2:return a.set(g,h);case 3:return a.add(h);default:return a[g]=h}case"remove":switch(p){case 1:return a.splice(g,1);case 2:return a.delete(g);case 3:return a.delete(i.value);default:return delete a[g]}default:r(17,s)}})),t},R:function(e,r,i,o){switch(e.i){case 0:case 4:case 2:return function(e,r,i,o){var s=e.t,u=e.o;a(e.D,(function(e,a){var d=c(s,e),f=c(u,e),p=a?l(s,e)?"replace":n:"remove";if(d!==f||"replace"!==p){var h=r.concat(e);i.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:f}),o.push(p===n?{op:"remove",path:h}:"remove"===p?{op:n,path:h,value:t(d)}:{op:"replace",path:h,value:t(d)})}}))}(e,r,i,o);case 5:case 1:return function(e,r,i,o){var s=e.t,a=e.D,u=e.o;if(u.length<s.length){var l=[u,s];s=l[0],u=l[1];var c=[o,i];i=c[0],o=c[1]}for(var d=0;d<s.length;d++)if(a[d]&&u[d]!==s[d]){var f=r.concat([d]);i.push({op:"replace",path:f,value:t(u[d])}),o.push({op:"replace",path:f,value:t(s[d])})}for(var p=s.length;p<u.length;p++){var h=r.concat([p]);i.push({op:n,path:h,value:t(u[p])})}s.length<u.length&&o.push({op:"replace",path:r.concat(["length"]),value:s.length})}(e,r,i,o);case 3:return function(e,t,r,i){var o=e.t,s=e.o,a=0;o.forEach((function(e){if(!s.has(e)){var o=t.concat([a]);r.push({op:"remove",path:o,value:e}),i.unshift({op:n,path:o,value:e})}a++})),a=0,s.forEach((function(e){if(!o.has(e)){var s=t.concat([a]);r.push({op:n,path:s,value:e}),i.unshift({op:"remove",path:s,value:e})}a++}))}(e,r,i,o)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t}),r.push({op:"replace",path:[],value:e.t})}})}function $(){function e(e,t){function n(){this.constructor=e}s(e,t),e.prototype=(n.prototype=t.prototype,new n)}function t(e){e.o||(e.D=new Map,e.o=new Map(e.t))}function n(e){e.o||(e.o=new Set,e.t.forEach((function(t){if(o(t)){var n=P(e.A.h,t,e);e.p.set(t,n),e.o.add(n)}else e.o.add(t)})))}function i(e){e.O&&r(3,JSON.stringify(g(e)))}var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},u=function(){function n(e,t){return this[X]={i:2,l:t,A:t?t.A:C(),P:!1,I:!1,o:void 0,D:void 0,t:e,k:this,C:!1,O:!1},this}e(n,Map);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return g(this[X]).size}}),r.has=function(e){return g(this[X]).has(e)},r.set=function(e,n){var r=this[X];return i(r),g(r).has(e)&&g(r).get(e)===n||(t(r),j(r),r.D.set(e,!0),r.o.set(e,n),r.D.set(e,!0)),this},r.delete=function(e){if(!this.has(e))return!1;var n=this[X];return i(n),t(n),j(n),n.D.set(e,!1),n.o.delete(e),!0},r.clear=function(){var e=this[X];i(e),g(e).size&&(t(e),j(e),e.D=new Map,a(e.t,(function(t){e.D.set(t,!1)})),e.o.clear())},r.forEach=function(e,t){var n=this;g(this[X]).forEach((function(r,i){e.call(t,n.get(i),i,n)}))},r.get=function(e){var n=this[X];i(n);var r=g(n).get(e);if(n.I||!o(r))return r;if(r!==n.t.get(e))return r;var s=P(n.A.h,r,n);return t(n),n.o.set(e,s),s},r.keys=function(){return g(this[X]).keys()},r.values=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},r.entries=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},r[ee]=function(){return this.entries()},n}(),l=function(){function t(e,t){return this[X]={i:3,l:t,A:t?t.A:C(),P:!1,I:!1,o:void 0,t:e,k:this,p:new Map,O:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return g(this[X]).size}}),r.has=function(e){var t=this[X];return i(t),t.o?!!t.o.has(e)||!(!t.p.has(e)||!t.o.has(t.p.get(e))):t.t.has(e)},r.add=function(e){var t=this[X];return i(t),this.has(e)||(n(t),j(t),t.o.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[X];return i(t),n(t),j(t),t.o.delete(e)||!!t.p.has(e)&&t.o.delete(t.p.get(e))},r.clear=function(){var e=this[X];i(e),g(e).size&&(n(e),j(e),e.o.clear())},r.values=function(){var e=this[X];return i(e),n(e),e.o.values()},r.entries=function(){var e=this[X];return i(e),n(e),e.o.entries()},r.keys=function(){return this.values()},r[ee]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}();S("MapSet",{N:function(e,t){return new u(e,t)},T:function(e,t){return new l(e,t)}})}function U(){x(),$(),B()}function z(e){return e}function H(e){return e}n.r(t),n.d(t,{default:()=>me,Immer:()=>ae,applyPatches:()=>pe,castDraft:()=>z,castImmutable:()=>H,createDraft:()=>he,current:()=>W,enableAllPlugins:()=>U,enableES5:()=>x,enableMapSet:()=>$,enablePatches:()=>B,finishDraft:()=>ge,freeze:()=>y,immerable:()=>Z,isDraft:()=>i,isDraftable:()=>o,nothing:()=>J,original:()=>s,produce:()=>le,produceWithPatches:()=>ce,setAutoFreeze:()=>de,setUseProxies:()=>fe});var q,V,G="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Y="undefined"!=typeof Map,Q="undefined"!=typeof Set,K="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,J=G?Symbol.for("immer-nothing"):((q={})["immer-nothing"]=!0,q),Z=G?Symbol.for("immer-draftable"):"__$immer_draftable",X=G?Symbol.for("immer-state"):"__$immer_state",ee="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",te=""+Object.prototype.constructor,ne="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,re=Object.getOwnPropertyDescriptors||function(e){var t={};return ne(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ie={},oe={get:function(e,t){if(t===X)return e;var n=g(e);if(!l(n,t))return function(e,t,n){var r,i=N(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!o(r)?r:r===D(e.t,t)?(R(e),e.o[t]=P(e.A.h,r,e)):r},has:function(e,t){return t in g(e)},ownKeys:function(e){return Reflect.ownKeys(g(e))},set:function(e,t,n){var r=N(g(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=D(g(e),t),o=null==i?void 0:i[X];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(f(n,i)&&(void 0!==n||l(e.t,t)))return!0;R(e),j(e)}return e.o[t]===n&&"number"!=typeof n||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==D(e.t,t)||t in e.t?(e.D[t]=!1,R(e),j(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=g(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},se={};a(oe,(function(e,t){se[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),se.deleteProperty=function(e,t){return oe.deleteProperty.call(this,e[0],t)},se.set=function(e,t,n){return oe.set.call(this,e[0],t,n,e[0])};var ae=function(){function e(e){var t=this;this.g=K,this.F=!0,this.produce=function(e,n,i){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(i))}))}}var u;if("function"!=typeof n&&r(6),void 0!==i&&"function"!=typeof i&&r(7),o(e)){var l=E(t),c=P(t,e,void 0),d=!0;try{u=n(c),d=!1}finally{d?L(l):A(l)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return _(l,i),O(e,l)}),(function(e){throw L(l),e})):(_(l,i),O(u,l))}if(!e||"object"!=typeof e){if((u=n(e))===J)return;return void 0===u&&(u=e),t.F&&y(u,!0),u}r(21,e)},this.produceWithPatches=function(e,n){return"function"==typeof e?function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))}:[t.produce(e,n,(function(e,t){r=e,i=t})),r,i];var r,i},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),i(e)&&(e=W(e));var t=E(this),n=P(this,e,void 0);return n[X].C=!0,A(t),n},t.finishDraft=function(e,t){var n=(e&&e[X]).A;return _(n,t),O(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!K&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var o=b("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(n+1))}))},e}(),ue=new ae,le=ue.produce,ce=ue.produceWithPatches.bind(ue),de=ue.setAutoFreeze.bind(ue),fe=ue.setUseProxies.bind(ue),pe=ue.applyPatches.bind(ue),he=ue.createDraft.bind(ue),ge=ue.finishDraft.bind(ue);const me=le},4081:(e,t,n)=>{var r=n(1059)(n(158),"DataView");e.exports=r},5999:(e,t,n)=>{var r=n(3387),i=n(9252),o=n(1125),s=n(9021),a=n(8131);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},6811:(e,t,n)=>{var r=n(2215),i=n(6105),o=n(484),s=n(8046),a=n(603);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},945:(e,t,n)=>{var r=n(1059)(n(158),"Map");e.exports=r},5835:(e,t,n)=>{var r=n(3633),i=n(9382),o=n(8850),s=n(756),a=n(2769);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},7540:(e,t,n)=>{var r=n(1059)(n(158),"Promise");e.exports=r},476:(e,t,n)=>{var r=n(1059)(n(158),"Set");e.exports=r},4868:(e,t,n)=>{var r=n(5835),i=n(7554),o=n(8800);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},4987:(e,t,n)=>{var r=n(6811),i=n(3832),o=n(1676),s=n(3577),a=n(3343),u=n(488);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},4937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},8596:(e,t,n)=>{var r=n(158).Uint8Array;e.exports=r},8307:(e,t,n)=>{var r=n(1059)(n(158),"WeakMap");e.exports=r},929:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},2812:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},5680:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},2554:(e,t,n)=>{var r=n(5086),i=n(7016),o=n(3706),s=n(7638),a=n(9699),u=n(94),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),d=!n&&!c&&s(e),f=!n&&!c&&!d&&u(e),p=n||c||d||f,h=p?r(e.length,String):[],g=h.length;for(var m in e)!t&&!l.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||h.push(m);return h}},7041:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},2824:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},9280:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6122:(e,t,n)=>{var r=n(8039),i=n(1316),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},3993:(e,t,n)=>{var r=n(1316);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3977:(e,t,n)=>{var r=n(4386),i=n(3150);e.exports=function(e,t){return e&&r(t,i(t),e)}},5081:(e,t,n)=>{var r=n(4386),i=n(1530);e.exports=function(e,t){return e&&r(t,i(t),e)}},8039:(e,t,n)=>{var r=n(8689);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9548:(e,t,n)=>{var r=n(4987),i=n(2812),o=n(6122),s=n(3977),a=n(5081),u=n(728),l=n(6923),c=n(1375),d=n(1584),f=n(7461),p=n(1441),h=n(5551),g=n(5539),m=n(3394),y=n(5010),v=n(3706),w=n(7638),b=n(5948),S=n(3619),C=n(8255),_=n(3150),L=n(1530),A="[object Arguments]",E="[object Function]",I="[object Object]",O={};O[A]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[I]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[E]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,T,M,k,D){var N,j=1&n,R=2&n,P=4&n;if(T&&(N=k?T(t,M,k,D):T(t)),void 0!==N)return N;if(!S(t))return t;var W=v(t);if(W){if(N=g(t),!j)return l(t,N)}else{var F=h(t),x=F==E||"[object GeneratorFunction]"==F;if(w(t))return u(t,j);if(F==I||F==A||x&&!k){if(N=R||x?{}:y(t),!j)return R?d(t,a(N,t)):c(t,s(N,t))}else{if(!O[F])return k?t:{};N=m(t,F,j)}}D||(D=new r);var B=D.get(t);if(B)return B;D.set(t,N),C(t)?t.forEach((function(r){N.add(e(r,n,T,r,t,D))})):b(t)&&t.forEach((function(r,i){N.set(i,e(r,n,T,i,t,D))}));var $=W?void 0:(P?R?p:f:R?L:_)(t);return i($||t,(function(r,i){$&&(r=t[i=r]),o(N,i,e(r,n,T,i,t,D))})),N}},3776:(e,t,n)=>{var r=n(3619),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},2153:(e,t,n)=>{var r=n(2824),i=n(6648);e.exports=function e(t,n,o,s,a){var u=-1,l=t.length;for(o||(o=i),a||(a=[]);++u<l;){var c=t[u];n>0&&o(c)?n>1?e(c,n-1,o,s,a):r(a,c):s||(a[a.length]=c)}return a}},1845:(e,t,n)=>{var r=n(9160),i=n(6384);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},5328:(e,t,n)=>{var r=n(2824),i=n(3706);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},194:(e,t,n)=>{var r=n(4937),i=n(5401),o=n(2445),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},6640:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},4634:(e,t,n)=>{var r=n(194),i=n(1653);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},5372:(e,t,n)=>{var r=n(5365),i=n(1653);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,s,e,a))}},5365:(e,t,n)=>{var r=n(4987),i=n(5428),o=n(1108),s=n(1711),a=n(5551),u=n(3706),l=n(7638),c=n(94),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,y){var v=u(e),w=u(t),b=v?f:a(e),S=w?f:a(t),C=(b=b==d?p:b)==p,_=(S=S==d?p:S)==p,L=b==S;if(L&&l(e)){if(!l(t))return!1;v=!0,C=!1}if(L&&!C)return y||(y=new r),v||c(e)?i(e,t,n,g,m,y):o(e,t,b,n,g,m,y);if(!(1&n)){var A=C&&h.call(e,"__wrapped__"),E=_&&h.call(t,"__wrapped__");if(A||E){var I=A?e.value():e,O=E?t.value():t;return y||(y=new r),m(I,O,n,g,y)}}return!!L&&(y||(y=new r),s(e,t,n,g,m,y))}},2471:(e,t,n)=>{var r=n(5551),i=n(1653);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},4249:(e,t,n)=>{var r=n(9277),i=n(3481),o=n(3619),s=n(1223),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?f:a).test(s(e))}},2388:(e,t,n)=>{var r=n(5551),i=n(1653);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},8595:(e,t,n)=>{var r=n(194),i=n(2008),o=n(1653),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},6324:(e,t,n)=>{var r=n(3067),i=n(2501),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1506:(e,t,n)=>{var r=n(3619),i=n(3067),o=n(807),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},1241:(e,t,n)=>{var r=n(722),i=n(7975);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},722:(e,t,n)=>{var r=n(1845),i=n(8400),o=n(9160);e.exports=function(e,t,n){for(var s=-1,a=t.length,u={};++s<a;){var l=t[s],c=r(e,l);n(c,l)&&i(u,o(l,e),c)}return u}},8400:(e,t,n)=>{var r=n(6122),i=n(9160),o=n(9699),s=n(3619),a=n(6384);e.exports=function(e,t,n,u){if(!s(e))return e;for(var l=-1,c=(t=i(t,e)).length,d=c-1,f=e;null!=f&&++l<c;){var p=a(t[l]),h=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(l!=d){var g=f[p];void 0===(h=u?u(g,p,f):void 0)&&(h=s(g)?g:o(t[l+1])?[]:{})}r(f,p,h),f=f[p]}return e}},6920:(e,t,n)=>{var r=n(446),i=n(8689),o=n(1549),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},5086:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},430:(e,t,n)=>{var r=n(4937),i=n(7041),o=n(3706),s=n(1878),a=r?r.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},2383:(e,t,n)=>{var r=n(8725),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},2723:e=>{e.exports=function(e){return function(t){return e(t)}}},7446:e=>{e.exports=function(e,t){return e.has(t)}},9160:(e,t,n)=>{var r=n(3706),i=n(3140),o=n(9230),s=n(3270);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},3310:(e,t,n)=>{var r=n(8596);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},728:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},4352:(e,t,n)=>{var r=n(3310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},4694:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},9169:(e,t,n)=>{var r=n(4937),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},9752:(e,t,n)=>{var r=n(3310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6923:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},4386:(e,t,n)=>{var r=n(6122),i=n(8039);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=o?o(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),s?i(n,l,c):r(n,l,c)}return n}},1375:(e,t,n)=>{var r=n(4386),i=n(5278);e.exports=function(e,t){return r(e,i(e),t)}},1584:(e,t,n)=>{var r=n(4386),i=n(7508);e.exports=function(e,t){return r(e,i(e),t)}},8728:(e,t,n)=>{var r=n(158)["__core-js_shared__"];e.exports=r},8689:(e,t,n)=>{var r=n(1059),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},5428:(e,t,n)=>{var r=n(4868),i=n(9280),o=n(7446);e.exports=function(e,t,n,s,a,u){var l=1&n,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(e),p=u.get(t);if(f&&p)return f==t&&p==e;var h=-1,g=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var y=e[h],v=t[h];if(s)var w=l?s(v,y,h,t,e,u):s(y,v,h,e,t,u);if(void 0!==w){if(w)continue;g=!1;break}if(m){if(!i(t,(function(e,t){if(!o(m,t)&&(y===e||a(y,e,n,s,u)))return m.push(t)}))){g=!1;break}}else if(y!==v&&!a(y,v,n,s,u)){g=!1;break}}return u.delete(e),u.delete(t),g}},1108:(e,t,n)=>{var r=n(4937),i=n(8596),o=n(1316),s=n(5428),a=n(1382),u=n(6680),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var h=1&r;if(p||(p=u),e.size!=t.size&&!h)return!1;var g=f.get(e);if(g)return g==t;r|=2,f.set(e,t);var m=s(p(e),p(t),r,l,d,f);return f.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},1711:(e,t,n)=>{var r=n(7461),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var u=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in t:i.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=u;++d<c;){var y=e[f=l[d]],v=t[f];if(o)var w=u?o(v,y,f,t,e,a):o(y,v,f,e,t,a);if(!(void 0===w?y===v||s(y,v,n,o,a):w)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(g=!1)}return a.delete(e),a.delete(t),g}},408:(e,t,n)=>{var r=n(597),i=n(3039),o=n(7209);e.exports=function(e){return o(i(e,void 0,r),e+"")}},4528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},7461:(e,t,n)=>{var r=n(5328),i=n(5278),o=n(3150);e.exports=function(e){return r(e,o,i)}},1441:(e,t,n)=>{var r=n(5328),i=n(7508),o=n(1530);e.exports=function(e){return r(e,o,i)}},5662:(e,t,n)=>{var r=n(205);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1059:(e,t,n)=>{var r=n(4249),i=n(4759);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},7959:(e,t,n)=>{var r=n(8579)(Object.getPrototypeOf,Object);e.exports=r},5401:(e,t,n)=>{var r=n(4937),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},5278:(e,t,n)=>{var r=n(5680),i=n(9174),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},7508:(e,t,n)=>{var r=n(2824),i=n(7959),o=n(5278),s=n(9174),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},5551:(e,t,n)=>{var r=n(4081),i=n(945),o=n(7540),s=n(476),a=n(8307),u=n(194),l=n(1223),c="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",g=l(r),m=l(i),y=l(o),v=l(s),w=l(a),b=u;(r&&b(new r(new ArrayBuffer(1)))!=h||i&&b(new i)!=c||o&&b(o.resolve())!=d||s&&b(new s)!=f||a&&b(new a)!=p)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return h;case m:return c;case y:return d;case v:return f;case w:return p}return t}),e.exports=b},4759:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6919:(e,t,n)=>{var r=n(9160),i=n(7016),o=n(3706),s=n(9699),a=n(2008),u=n(6384);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,d=!1;++l<c;){var f=u(t[l]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(f,c)&&(o(e)||i(e))}},3387:(e,t,n)=>{var r=n(5155);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9252:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},1125:(e,t,n)=>{var r=n(5155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},9021:(e,t,n)=>{var r=n(5155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},8131:(e,t,n)=>{var r=n(5155);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5539:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},3394:(e,t,n)=>{var r=n(3310),i=n(4352),o=n(4694),s=n(9169),a=n(9752);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return s(e)}}},5010:(e,t,n)=>{var r=n(3776),i=n(7959),o=n(3067);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},6648:(e,t,n)=>{var r=n(4937),i=n(7016),o=n(3706),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},9699:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},3140:(e,t,n)=>{var r=n(3706),i=n(1878),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},205:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},3481:(e,t,n)=>{var r,i=n(8728),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},3067:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},2215:e=>{e.exports=function(){this.__data__=[],this.size=0}},6105:(e,t,n)=>{var r=n(3993),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},484:(e,t,n)=>{var r=n(3993);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8046:(e,t,n)=>{var r=n(3993);e.exports=function(e){return r(this.__data__,e)>-1}},603:(e,t,n)=>{var r=n(3993);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},3633:(e,t,n)=>{var r=n(5999),i=n(6811),o=n(945);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},9382:(e,t,n)=>{var r=n(5662);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},8850:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).get(e)}},756:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).has(e)}},2769:(e,t,n)=>{var r=n(5662);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},1382:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2202:(e,t,n)=>{var r=n(4883);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},5155:(e,t,n)=>{var r=n(1059)(Object,"create");e.exports=r},2501:(e,t,n)=>{var r=n(8579)(Object.keys,Object);e.exports=r},807:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1771:(e,t,n)=>{e=n.nmd(e);var r=n(4528),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},8579:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},3039:(e,t,n)=>{var r=n(929),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=o[s];return l[t]=n(u),r(e,this,l)}}},158:(e,t,n)=>{var r=n(4528),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},7554:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8800:e=>{e.exports=function(e){return this.__data__.has(e)}},6680:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7209:(e,t,n)=>{var r=n(6920),i=n(832)(r);e.exports=i},832:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},3832:(e,t,n)=>{var r=n(6811);e.exports=function(){this.__data__=new r,this.size=0}},1676:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3577:e=>{e.exports=function(e){return this.__data__.get(e)}},3343:e=>{e.exports=function(e){return this.__data__.has(e)}},488:(e,t,n)=>{var r=n(6811),i=n(945),o=n(5835);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},9230:(e,t,n)=>{var r=n(2202),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=s},6384:(e,t,n)=>{var r=n(1878);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},1223:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1879:(e,t,n)=>{var r=n(9548);e.exports=function(e){return r(e,4)}},9748:(e,t,n)=>{var r=n(9548);e.exports=function(e){return r(e,5)}},446:e=>{e.exports=function(e){return function(){return e}}},6897:(e,t,n)=>{var r=n(3619),i=n(8253),o=n(5053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,l,c,d,f,p,h=0,g=!1,m=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=u,r=l;return u=l=void 0,h=t,d=e.apply(r,n)}function w(e){return h=e,f=setTimeout(S,t),g?v(e):d}function b(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-h>=c}function S(){var e=i();if(b(e))return C(e);f=setTimeout(S,function(e){var n=t-(e-p);return m?a(n,c-(e-h)):n}(e))}function C(e){return f=void 0,y&&u?v(e):(u=l=void 0,d)}function _(){var e=i(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return w(p);if(m)return clearTimeout(f),f=setTimeout(S,t),v(p)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?s(o(n.maxWait)||0,t):c,y="trailing"in n?!!n.trailing:y),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=p=l=f=void 0},_.flush=function(){return void 0===f?d:C(i())},_}},1316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},597:(e,t,n)=>{var r=n(2153);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},89:(e,t,n)=>{var r=n(1845);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},7975:(e,t,n)=>{var r=n(6640),i=n(6919);e.exports=function(e,t){return null!=e&&i(e,t,r)}},1549:e=>{e.exports=function(e){return e}},7016:(e,t,n)=>{var r=n(4634),i=n(1653),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},3706:e=>{var t=Array.isArray;e.exports=t},1528:(e,t,n)=>{var r=n(9277),i=n(2008);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},7638:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=n(647),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},7184:(e,t,n)=>{var r=n(5372);e.exports=function(e,t){return r(e,t)}},5162:(e,t,n)=>{var r=n(5372);e.exports=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?r(e,t,void 0,n):!!i}},9277:(e,t,n)=>{var r=n(194),i=n(3619);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},2008:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5948:(e,t,n)=>{var r=n(2471),i=n(2723),o=n(1771),s=o&&o.isMap,a=s?i(s):r;e.exports=a},3619:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1653:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8255:(e,t,n)=>{var r=n(2388),i=n(2723),o=n(1771),s=o&&o.isSet,a=s?i(s):r;e.exports=a},1878:(e,t,n)=>{var r=n(194),i=n(1653);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},94:(e,t,n)=>{var r=n(8595),i=n(2723),o=n(1771),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},3150:(e,t,n)=>{var r=n(2554),i=n(6324),o=n(1528);e.exports=function(e){return o(e)?r(e):i(e)}},1530:(e,t,n)=>{var r=n(2554),i=n(1506),o=n(1528);e.exports=function(e){return o(e)?r(e,!0):i(e)}},3059:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",v="[object Date]",w="[object Error]",b="[object Function]",S="[object GeneratorFunction]",C="[object Map]",_="[object Number]",L="[object Object]",A="[object Promise]",E="[object RegExp]",I="[object Set]",O="[object String]",T="[object Symbol]",M="[object WeakMap]",k="[object ArrayBuffer]",D="[object DataView]",N="[object Float32Array]",j="[object Float64Array]",R="[object Int8Array]",P="[object Int16Array]",W="[object Int32Array]",F="[object Uint8Array]",x="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(q.source),Y=RegExp(V.source),Q=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",Le="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+Le+"]",Ee="["+Se+"]",Ie="\\d+",Oe="["+Ce+"]",Te="[^\\ud800-\\udfff"+Le+Ie+"\\u2700-\\u27bf"+Ce+_e+"]",Me="\\ud83c[\\udffb-\\udfff]",ke="[^\\ud800-\\udfff]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+_e+"]",Re="(?:"+Oe+"|"+Te+")",Pe="(?:"+je+"|"+Te+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Fe="(?:['’](?:D|LL|M|RE|S|T|VE))?",xe="(?:"+Ee+"|"+Me+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+xe+"(?:\\u200d(?:"+[ke,De,Ne].join("|")+")"+Be+xe+")*",Ue="(?:"+["[\\u2700-\\u27bf]",De,Ne].join("|")+")"+$e,ze="(?:"+[ke+Ee+"?",Ee,De,Ne,"[\\ud800-\\udfff]"].join("|")+")",He=RegExp("['’]","g"),qe=RegExp(Ee,"g"),Ve=RegExp(Me+"(?="+Me+")|"+ze+$e,"g"),Ge=RegExp([je+"?"+Oe+"+"+We+"(?="+[Ae,je,"$"].join("|")+")",Pe+"+"+Fe+"(?="+[Ae,je+Re,"$"].join("|")+")",je+"?"+Re+"+"+We,je+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ue].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Je=-1,Ze={};Ze[N]=Ze[j]=Ze[R]=Ze[P]=Ze[W]=Ze[F]=Ze[x]=Ze[B]=Ze[$]=!0,Ze[g]=Ze[m]=Ze[k]=Ze[y]=Ze[D]=Ze[v]=Ze[w]=Ze[b]=Ze[C]=Ze[_]=Ze[L]=Ze[E]=Ze[I]=Ze[O]=Ze[M]=!1;var Xe={};Xe[g]=Xe[m]=Xe[k]=Xe[D]=Xe[y]=Xe[v]=Xe[N]=Xe[j]=Xe[R]=Xe[P]=Xe[W]=Xe[C]=Xe[_]=Xe[L]=Xe[E]=Xe[I]=Xe[O]=Xe[T]=Xe[F]=Xe[x]=Xe[B]=Xe[$]=!0,Xe[w]=Xe[b]=Xe[M]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=rt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,lt=ut&&rt.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),dt=ct&&ct.isArrayBuffer,ft=ct&&ct.isDate,pt=ct&&ct.isMap,ht=ct&&ct.isRegExp,gt=ct&&ct.isSet,mt=ct&&ct.isTypedArray;function yt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function _t(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Lt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function At(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Et(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function It(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ot(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Mt=Wt("length");function kt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Dt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Nt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Dt(e,Rt,n)}function jt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Rt(e){return e!=e}function Pt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:f}function Wt(e){return function(t){return null==t?i:t[e]}}function Ft(e){return function(t){return null==e?i:e[t]}}function xt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Bt(e,t){for(var n,r=-1,o=e.length;++r<o;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function $t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ut(e){return e?e.slice(0,an(e)+1).replace(re,""):e}function zt(e){return function(t){return e(t)}}function Ht(e,t){return At(t,(function(t){return e[t]}))}function qt(e,t){return e.has(t)}function Vt(e,t){for(var n=-1,r=e.length;++n<r&&Nt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Nt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Qt=Ft({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Kt=Ft({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Zt(e){return Ye.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Zt(e)?function(e){for(var t=Ve.lastIndex=0;Ve.test(e);)++t;return t}(e):Mt(e)}function sn(e){return Zt(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var un=Ft({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,r=(t=null==t?ot:ln.defaults(ot.Object(),t,ln.pick(ot,Ke))).Array,ie=t.Date,Se=t.Error,Ce=t.Function,_e=t.Math,Le=t.Object,Ae=t.RegExp,Ee=t.String,Ie=t.TypeError,Oe=r.prototype,Te=Ce.prototype,Me=Le.prototype,ke=t["__core-js_shared__"],De=Te.toString,Ne=Me.hasOwnProperty,je=0,Re=(n=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Pe=Me.toString,We=De.call(Le),Fe=ot._,xe=Ae("^"+De.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,$e=t.Symbol,Ue=t.Uint8Array,ze=Be?Be.allocUnsafe:i,Ve=en(Le.getPrototypeOf,Le),Ye=Le.create,et=Me.propertyIsEnumerable,rt=Oe.splice,it=$e?$e.isConcatSpreadable:i,st=$e?$e.iterator:i,at=$e?$e.toStringTag:i,lt=function(){try{var e=lo(Le,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Mt=ie&&ie.now!==ot.Date.now&&ie.now,Ft=t.setTimeout!==ot.setTimeout&&t.setTimeout,cn=_e.ceil,dn=_e.floor,fn=Le.getOwnPropertySymbols,pn=Be?Be.isBuffer:i,hn=t.isFinite,gn=Oe.join,mn=en(Le.keys,Le),yn=_e.max,vn=_e.min,wn=ie.now,bn=t.parseInt,Sn=_e.random,Cn=Oe.reverse,_n=lo(t,"DataView"),Ln=lo(t,"Map"),An=lo(t,"Promise"),En=lo(t,"Set"),In=lo(t,"WeakMap"),On=lo(Le,"create"),Tn=In&&new In,Mn={},kn=xo(_n),Dn=xo(Ln),Nn=xo(An),jn=xo(En),Rn=xo(In),Pn=$e?$e.prototype:i,Wn=Pn?Pn.valueOf:i,Fn=Pn?Pn.toString:i;function xn(e){if(na(e)&&!qs(e)&&!(e instanceof zn)){if(e instanceof Un)return e;if(Ne.call(e,"__wrapped__"))return Bo(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function $n(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new qn(e);this.size=t.size}function Qn(e,t){var n=qs(e),r=!n&&Hs(e),i=!n&&!r&&Qs(e),o=!n&&!r&&!i&&ca(e),s=n||r||i||o,a=s?$t(e.length,Ee):[],u=a.length;for(var l in e)!t&&!Ne.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||yo(l,u))||a.push(l);return a}function Kn(e){var t=e.length;return t?e[Vr(0,t-1)]:i}function Jn(e,t){return jo(Ii(e),sr(t,0,e.length))}function Zn(e){return jo(Ii(e))}function Xn(e,t,n){(n!==i&&!$s(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Ne.call(e,t)&&$s(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if($s(e[n][0],t))return n;return-1}function nr(e,t,n,r){return dr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Oi(t,Da(t),e)}function ir(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,o=t.length,s=r(o),a=null==e;++n<o;)s[n]=a?i:Ia(e,t[n]);return s}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,n,r,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ta(e))return e;var d=qs(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ii(e,a)}else{var f=po(e),p=f==b||f==S;if(Qs(e))return Si(e,u);if(f==L||f==g||p&&!o){if(a=l||p?{}:go(e),!u)return l?function(e,t){return Oi(e,fo(e),t)}(e,function(e,t){return e&&Oi(t,Na(t),e)}(a,e)):function(e,t){return Oi(e,co(e),t)}(e,rr(a,e))}else{if(!Xe[f])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case k:return Ci(e);case y:case v:return new i(+e);case D:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case j:case R:case P:case W:case F:case x:case B:case $:return _i(e,n);case C:return new i;case _:case O:return new i(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new i;case T:return r=e,Wn?Le(Wn.call(r)):{}}}(e,f,u)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(r){a.add(ar(r,t,n,r,e,s))})):ra(e)&&e.forEach((function(r,i){a.set(i,ar(r,t,n,i,e,s))}));var m=d?i:(c?l?no:to:l?Na:Da)(e);return wt(m||e,(function(r,i){m&&(r=e[i=r]),er(a,i,ar(r,t,n,i,e,s))})),a}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Le(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ie(o);return Mo((function(){e.apply(i,n)}),t)}function cr(e,t,n,r){var i=-1,o=_t,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=At(t,zt(n))),r?(o=Lt,s=!1):t.length>=200&&(o=qt,s=!1,t=new Gn(t));e:for(;++i<a;){var c=e[i],d=null==n?c:n(c);if(c=r||0!==c?c:0,s&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else o(t,d,r)||u.push(c)}return u}xn.templateSettings={escape:Q,evaluate:K,interpolate:J,variable:"",imports:{_:xn}},xn.prototype=$n.prototype,xn.prototype.constructor=xn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,zn.prototype=Bn($n.prototype),zn.prototype.constructor=zn,Hn.prototype.clear=function(){this.__data__=On?On(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(On){var n=t[e];return n===s?i:n}return Ne.call(t,e)?t[e]:i},Hn.prototype.has=function(e){var t=this.__data__;return On?t[e]!==i:Ne.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=On&&t===i?s:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},qn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},qn.prototype.has=function(e){return tr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Ln||qn),string:new Hn}},Vn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ao(this,e).get(e)},Vn.prototype.has=function(e){return ao(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new qn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Ln||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(e,t),this.size=n.size,this};var dr=ki(wr),fr=ki(br,!0);function pr(e,t){var n=!0;return dr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function hr(e,t,n){for(var r=-1,o=e.length;++r<o;){var s=e[r],a=t(s);if(null!=a&&(u===i?a==a&&!la(a):n(a,u)))var u=a,l=s}return l}function gr(e,t){var n=[];return dr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function mr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=mo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?mr(a,t-1,n,r,i):Et(i,a):r||(i[i.length]=a)}return i}var yr=Di(),vr=Di(!0);function wr(e,t){return e&&yr(e,t,Da)}function br(e,t){return e&&vr(e,t,Da)}function Sr(e,t){return Ct(t,(function(t){return Zs(e[t])}))}function Cr(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function _r(e,t,n){var r=t(e);return qs(e)?r:Et(r,n(e))}function Lr(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Le(e)?function(e){var t=Ne.call(e,at),n=e[at];try{e[at]=i;var r=!0}catch(e){}var o=Pe.call(e);return r&&(t?e[at]=n:delete e[at]),o}(e):function(e){return Pe.call(e)}(e)}function Ar(e,t){return e>t}function Er(e,t){return null!=e&&Ne.call(e,t)}function Ir(e,t){return null!=e&&t in Le(e)}function Or(e,t,n){for(var o=n?Lt:_t,s=e[0].length,a=e.length,u=a,l=r(a),c=1/0,d=[];u--;){var f=e[u];u&&t&&(f=At(f,zt(t))),c=vn(f.length,c),l[u]=!n&&(t||s>=120&&f.length>=120)?new Gn(u&&f):i}f=e[0];var p=-1,h=l[0];e:for(;++p<s&&d.length<c;){var g=f[p],m=t?t(g):g;if(g=n||0!==g?g:0,!(h?qt(h,m):o(d,m,n))){for(u=a;--u;){var y=l[u];if(!(y?qt(y,m):o(e[u],m,n)))continue e}h&&h.push(m),d.push(g)}}return d}function Tr(e,t,n){var r=null==(e=Eo(e,t=yi(t,e)))?e:e[Fo(Jo(t))];return null==r?i:yt(r,e,n)}function Mr(e){return na(e)&&Lr(e)==g}function kr(e,t,n,r,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var a=qs(e),u=qs(t),l=a?m:po(e),c=u?m:po(t),d=(l=l==g?L:l)==L,f=(c=c==g?L:c)==L,p=l==c;if(p&&Qs(e)){if(!Qs(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Yn),a||ca(e)?Xi(e,t,n,r,o,s):function(e,t,n,r,i,o,s){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case y:case v:case _:return $s(+e,+t);case w:return e.name==t.name&&e.message==t.message;case E:case O:return e==t+"";case C:var a=Xt;case I:var u=1&r;if(a||(a=nn),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;r|=2,s.set(e,t);var c=Xi(a(e),a(t),r,i,o,s);return s.delete(e),c;case T:if(Wn)return Wn.call(e)==Wn.call(t)}return!1}(e,t,l,n,r,o,s);if(!(1&n)){var h=d&&Ne.call(e,"__wrapped__"),b=f&&Ne.call(t,"__wrapped__");if(h||b){var S=h?e.value():e,A=b?t.value():t;return s||(s=new Yn),o(S,A,n,r,s)}}return!!p&&(s||(s=new Yn),function(e,t,n,r,o,s){var a=1&n,u=to(e),l=u.length;if(l!=to(t).length&&!a)return!1;for(var c=l;c--;){var d=u[c];if(!(a?d in t:Ne.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var g=a;++c<l;){var m=e[d=u[c]],y=t[d];if(r)var v=a?r(y,m,d,t,e,s):r(m,y,d,e,t,s);if(!(v===i?m===y||o(m,y,n,r,s):v)){h=!1;break}g||(g="constructor"==d)}if(h&&!g){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,r,o,s))}(e,t,n,r,kr,o))}function Dr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Le(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var l=(u=n[o])[0],c=e[l],d=u[1];if(a&&u[2]){if(c===i&&!(l in e))return!1}else{var f=new Yn;if(r)var p=r(c,d,l,e,t,f);if(!(p===i?kr(d,c,3,r,f):p))return!1}}return!0}function Nr(e){return!(!ta(e)||(t=e,Re&&Re in t))&&(Zs(e)?xe:ge).test(xo(e));var t}function jr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?qs(e)?xr(e[0],e[1]):Fr(e):pu(e)}function Rr(e){if(!Co(e))return mn(e);var t=[];for(var n in Le(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Pr(e,t){return e<t}function Wr(e,t){var n=-1,i=Gs(e)?r(e.length):[];return dr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Fr(e){var t=uo(e);return 1==t.length&&t[0][2]?Lo(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function xr(e,t){return wo(e)&&_o(t)?Lo(Fo(e),t):function(n){var r=Ia(n,e);return r===i&&r===t?Oa(n,e):kr(t,r,3)}}function Br(e,t,n,r,o){e!==t&&yr(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,r,o,s,a){var u=Oo(e,n),l=Oo(t,n),c=a.get(l);if(c)Xn(e,n,c);else{var d=s?s(u,l,n+"",e,t,a):i,f=d===i;if(f){var p=qs(l),h=!p&&Qs(l),g=!p&&!h&&ca(l);d=l,p||h||g?qs(u)?d=u:Ys(u)?d=Ii(u):h?(f=!1,d=Si(l,!0)):g?(f=!1,d=_i(l,!0)):d=[]:oa(l)||Hs(l)?(d=u,Hs(u)?d=va(u):ta(u)&&!Zs(u)||(d=go(l))):f=!1}f&&(a.set(l,d),o(d,l,r,s,a),a.delete(l)),Xn(e,n,d)}}(e,t,a,n,Br,r,o);else{var u=r?r(Oo(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Xn(e,a,u)}}),Na)}function $r(e,t){var n=e.length;if(n)return yo(t+=t<0?n:0,n)?e[t]:i}function Ur(e,t,n){t=t.length?At(t,(function(e){return qs(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;return t=At(t,zt(so())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=Li(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(Wr(e,(function(e,n,i){return{criteria:At(t,(function(t){return t(e)})),index:++r,value:e}})))}function zr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Cr(e,s);n(a,s)&&Jr(o,yi(s,e),a)}return o}function Hr(e,t,n,r){var i=r?jt:Nt,o=-1,s=t.length,a=e;for(e===t&&(t=Ii(t)),n&&(a=At(e,zt(n)));++o<s;)for(var u=0,l=t[o],c=n?n(l):l;(u=i(a,c,u,r))>-1;)a!==e&&rt.call(a,u,1),rt.call(e,u,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;yo(i)?rt.call(e,i,1):li(e,i)}}return e}function Vr(e,t){return e+dn(Sn()*(t-e+1))}function Gr(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=dn(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return ko(Ao(e,t,iu),e+"")}function Qr(e){return Kn($a(e))}function Kr(e,t){var n=$a(e);return jo(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!ta(e))return e;for(var o=-1,s=(t=yi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var l=Fo(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var d=u[l];(c=r?r(d,l,u):i)===i&&(c=ta(d)?d:yo(t[o+1])?[]:{})}er(u,l,c),u=u[l]}return e}var Zr=Tn?function(e,t){return Tn.set(e,t),e}:iu,Xr=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return jo($a(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i<o;)s[i]=e[i+t];return s}function ni(e,t){var n;return dr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!la(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ii(e,t,iu,n)}function ii(e,t,n,r){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,u=null===t,l=la(t),c=t===i;o<s;){var d=dn((o+s)/2),f=n(e[d]),p=f!==i,h=null===f,g=f==f,m=la(f);if(a)var y=r||g;else y=c?g&&(r||p):u?g&&p&&(r||!h):l?g&&p&&!h&&(r||!m):!h&&!m&&(r?f<=t:f<t);y?o=d+1:s=d}return vn(s,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!$s(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:la(e)?f:+e}function ai(e){if("string"==typeof e)return e;if(qs(e))return At(e,ai)+"";if(la(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=_t,o=e.length,s=!0,a=[],u=a;if(n)s=!1,i=Lt;else if(o>=200){var l=t?null:Gi(e);if(l)return nn(l);s=!1,i=qt,u=new Gn}else u=t?[]:a;e:for(;++r<o;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,s&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(c)}else i(u,d,n)||(u!==a&&u.push(d),a.push(c))}return a}function li(e,t){return null==(e=Eo(e,t=yi(t,e)))||delete e[Fo(Jo(t))]}function ci(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof zn&&(n=n.value()),It(t,(function(e,t){return t.func.apply(t.thisArg,Et([e],t.args))}),n)}function pi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cr(s[o]||a,e[u],t,n));return ui(mr(s,1),t,n)}function hi(e,t,n){for(var r=-1,o=e.length,s=t.length,a={};++r<o;){var u=r<s?t[r]:i;n(a,e[r],u)}return a}function gi(e){return Ys(e)?e:[]}function mi(e){return"function"==typeof e?e:iu}function yi(e,t){return qs(e)?e:wo(e,t)?[e]:Wo(wa(e))}var vi=Yr;function wi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var bi=ct||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function _i(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=la(e),a=t!==i,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!s&&!c&&e<t||c&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!l)return-1}return 0}function Ai(e,t,n,i){for(var o=-1,s=e.length,a=n.length,u=-1,l=t.length,c=yn(s-a,0),d=r(l+c),f=!i;++u<l;)d[u]=t[u];for(;++o<a;)(f||o<s)&&(d[n[o]]=e[o]);for(;c--;)d[u++]=e[o++];return d}function Ei(e,t,n,i){for(var o=-1,s=e.length,a=-1,u=n.length,l=-1,c=t.length,d=yn(s-u,0),f=r(d+c),p=!i;++o<d;)f[o]=e[o];for(var h=o;++l<c;)f[h+l]=t[l];for(;++a<u;)(p||o<s)&&(f[h+n[a]]=e[o++]);return f}function Ii(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Oi(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=r?r(n[u],e[u],u,n,e):i;l===i&&(l=e[u]),o?ir(n,u,l):er(n,u,l)}return n}function Ti(e,t){return function(n,r){var i=qs(n)?vt:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Mi(e){return Yr((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&vo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Le(t);++r<o;){var u=n[r];u&&e(t,u,r,s)}return t}))}function ki(e,t){return function(n,r){if(null==n)return n;if(!Gs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Le(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Di(e){return function(t,n,r){for(var i=-1,o=Le(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function Ni(e){return function(t){var n=Zt(t=wa(t))?sn(t):i,r=n?n[0]:t.charAt(0),o=n?wi(n,1).join(""):t.slice(1);return r[e]()+o}}function ji(e){return function(t){return It(Za(Ha(t).replace(He,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function Pi(e){return function(t,n,r){var o=Le(t);if(!Gs(t)){var s=so(n,3);t=Da(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[s?t[a]:a]:i}}function Wi(e){return eo((function(t){var n=t.length,r=n,s=Un.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ie(o);if(s&&!u&&"wrapper"==io(a))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var l=io(a=t[r]),c="wrapper"==l?ro(a):i;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[io(c[0])].apply(u,c[3]):1==a.length&&bo(a)?u[l]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&qs(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Fi(e,t,n,o,s,a,u,c,d,f){var p=t&l,h=1&t,g=2&t,m=24&t,y=512&t,v=g?i:Ri(e);return function i(){for(var l=arguments.length,w=r(l),b=l;b--;)w[b]=arguments[b];if(m)var S=oo(i),C=Yt(w,S);if(o&&(w=Ai(w,o,s,m)),a&&(w=Ei(w,a,u,m)),l-=C,m&&l<f){var _=tn(w,S);return qi(e,t,Fi,i.placeholder,n,w,_,c,d,f-l)}var L=h?n:this,A=g?L[e]:e;return l=w.length,c?w=Io(w,c):y&&l>1&&w.reverse(),p&&d<l&&(w.length=d),this&&this!==ot&&this instanceof i&&(A=v||Ri(A)),A.apply(L,w)}}function xi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Bi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=si(n),r=si(r)),o=e(n,r)}return o}}function $i(e){return eo((function(t){return t=At(t,zt(so())),Yr((function(n){var r=this;return e(t,(function(e){return yt(e,r,n)}))}))}))}function Ui(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?Gr(t,e):t;var r=Gr(t,cn(e/on(t)));return Zt(t)?wi(sn(r),0,e).join(""):r.slice(0,e)}function zi(e){return function(t,n,o){return o&&"number"!=typeof o&&vo(t,n,o)&&(n=o=i),t=ha(t),n===i?(n=t,t=0):n=ha(n),function(e,t,n,i){for(var o=-1,s=yn(cn((t-e)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=e,e+=n;return a}(t,n,o=o===i?t<n?1:-1:ha(o),e)}}function Hi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ya(t),n=ya(n)),e(t,n)}}function qi(e,t,n,r,o,s,a,l,c,d){var f=8&t;t|=f?u:64,4&(t&=~(f?64:u))||(t&=-4);var p=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,l,c,d],h=n.apply(i,p);return bo(e)&&To(h,p),h.placeholder=r,Do(h,e,t)}function Vi(e){var t=_e[e];return function(e,n){if(e=ya(e),(n=null==n?0:vn(ga(n),292))&&hn(e)){var r=(wa(e)+"e").split("e");return+((r=(wa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Gi=En&&1/nn(new En([,-0]))[1]==c?function(e){return new En(e)}:lu;function Yi(e){return function(t){var n=po(t);return n==C?Xt(t):n==I?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qi(e,t,n,s,c,d,f,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Ie(o);var g=s?s.length:0;if(g||(t&=-97,s=c=i),f=f===i?f:yn(ga(f),0),p=p===i?p:ga(p),g-=c?c.length:0,64&t){var m=s,y=c;s=c=i}var v=h?i:ro(e),w=[e,t,n,s,c,m,y,d,f,p];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ai(c,u,t[4]):u,e[4]=c?tn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Ei(c,u,t[6]):u,e[6]=c?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&l&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,v),e=w[0],t=w[1],n=w[2],s=w[3],c=w[4],!(p=w[9]=w[9]===i?h?0:e.length:yn(w[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Ri(e);return function s(){for(var a=arguments.length,u=r(a),l=a,c=oo(s);l--;)u[l]=arguments[l];var d=a<3&&u[0]!==c&&u[a-1]!==c?[]:tn(u,c);return(a-=d.length)<n?qi(e,t,Fi,s.placeholder,i,u,d,i,i,n-a):yt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,p):t!=u&&33!=t||c.length?Fi.apply(i,w):function(e,t,n,i){var o=1&t,s=Ri(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=i.length,d=r(c+u),f=this&&this!==ot&&this instanceof t?s:e;++l<c;)d[l]=i[l];for(;u--;)d[l++]=arguments[++a];return yt(f,o?n:this,d)}}(e,t,n,s);else var b=function(e,t,n){var r=1&t,i=Ri(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Do((v?Zr:To)(b,w),e,t)}function Ki(e,t,n,r){return e===i||$s(e,Me[n])&&!Ne.call(r,n)?t:e}function Ji(e,t,n,r,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Br(e,t,i,Ji,s),s.delete(t)),e}function Zi(e){return oa(e)?i:e}function Xi(e,t,n,r,o,s){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,h=2&n?new Gn:i;for(s.set(e,t),s.set(t,e);++f<u;){var g=e[f],m=t[f];if(r)var y=a?r(m,g,f,t,e,s):r(g,m,f,e,t,s);if(y!==i){if(y)continue;p=!1;break}if(h){if(!Tt(t,(function(e,t){if(!qt(h,t)&&(g===e||o(g,e,n,r,s)))return h.push(t)}))){p=!1;break}}else if(g!==m&&!o(g,m,n,r,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return ko(Ao(e,i,Vo),e+"")}function to(e){return _r(e,Da,co)}function no(e){return _r(e,Na,fo)}var ro=Tn?function(e){return Tn.get(e)}:lu;function io(e){for(var t=e.name+"",n=Mn[t],r=Ne.call(Mn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Ne.call(xn,"placeholder")?xn:e).placeholder}function so(){var e=xn.iteratee||ou;return e=e===ou?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=Da(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,_o(i)]}return t}function lo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Nr(n)?n:i}var co=fn?function(e){return null==e?[]:(e=Le(e),Ct(fn(e),(function(t){return et.call(e,t)})))}:mu,fo=fn?function(e){for(var t=[];e;)Et(t,co(e)),e=Ve(e);return t}:mu,po=Lr;function ho(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var s=Fo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&yo(s,i)&&(qs(e)||Hs(e))}function go(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(Ve(e))}function mo(e){return qs(e)||Hs(e)||!!(it&&e&&e[it])}function yo(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?Gs(n)&&yo(t,n.length):"string"==r&&t in n)&&$s(n[t],e)}function wo(e,t){if(qs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||X.test(e)||!Z.test(e)||null!=t&&e in Le(t)}function bo(e){var t=io(e),n=xn[t];if("function"!=typeof n||!(t in zn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=D||Ln&&po(new Ln)!=C||An&&po(An.resolve())!=A||En&&po(new En)!=I||In&&po(new In)!=M)&&(po=function(e){var t=Lr(e),n=t==L?e.constructor:i,r=n?xo(n):"";if(r)switch(r){case kn:return D;case Dn:return C;case Nn:return A;case jn:return I;case Rn:return M}return t});var So=ke?Zs:yu;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)}function _o(e){return e==e&&!ta(e)}function Lo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Le(n))}}function Ao(e,t,n){return t=yn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yn(i.length-t,0),a=r(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(a),yt(e,this,u)}}function Eo(e,t){return t.length<2?e:Cr(e,ti(t,0,-1))}function Io(e,t){for(var n=e.length,r=vn(t.length,n),o=Ii(e);r--;){var s=t[r];e[r]=yo(s,n)?o[s]:i}return e}function Oo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var To=No(Zr),Mo=Ft||function(e,t){return ot.setTimeout(e,t)},ko=No(Xr);function Do(e,t,n){var r=t+"";return ko(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return wt(h,(function(n){var r="_."+n[0];t&n[1]&&!_t(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function No(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function jo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var s=Vr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Ro,Po,Wo=(Ro=Rs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Po.size&&Po.clear(),e})),Po=Ro.cache,Ro);function Fo(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xo(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof zn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Yr((function(e,t){return Ys(e)?cr(e,mr(t,1,Ys,!0)):[]})),Uo=Yr((function(e,t){var n=Jo(t);return Ys(n)&&(n=i),Ys(e)?cr(e,mr(t,1,Ys,!0),so(n,2)):[]})),zo=Yr((function(e,t){var n=Jo(t);return Ys(n)&&(n=i),Ys(e)?cr(e,mr(t,1,Ys,!0),i,n):[]}));function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ga(n);return i<0&&(i=yn(r+i,0)),Dt(e,so(t,3),i)}function qo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ga(n),o=n<0?yn(r+o,0):vn(o,r-1)),Dt(e,so(t,3),o,!0)}function Vo(e){return null!=e&&e.length?mr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var Yo=Yr((function(e){var t=At(e,gi);return t.length&&t[0]===e[0]?Or(t):[]})),Qo=Yr((function(e){var t=Jo(e),n=At(e,gi);return t===Jo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Or(n,so(t,2)):[]})),Ko=Yr((function(e){var t=Jo(e),n=At(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Or(n,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Yr(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return qr(e,At(t,(function(e){return yo(e,n)?+e:e})).sort(Li)),r}));function ts(e){return null==e?e:Cn.call(e)}var ns=Yr((function(e){return ui(mr(e,1,Ys,!0))})),rs=Yr((function(e){var t=Jo(e);return Ys(t)&&(t=i),ui(mr(e,1,Ys,!0),so(t,2))})),is=Yr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ui(mr(e,1,Ys,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Ys(e))return t=yn(e.length,t),!0})),$t(t,(function(t){return At(e,Wt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:At(n,(function(e){return yt(t,i,e)}))}var as=Yr((function(e,t){return Ys(e)?cr(e,t):[]})),us=Yr((function(e){return pi(Ct(e,Ys))})),ls=Yr((function(e){var t=Jo(e);return Ys(t)&&(t=i),pi(Ct(e,Ys),so(t,2))})),cs=Yr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,pi(Ct(e,Ys),i,t)})),ds=Yr(os),fs=Yr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ss(e,n)}));function ps(e){var t=xn(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var gs=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof zn&&yo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ms=Ti((function(e,t,n){Ne.call(e,n)?++e[n]:ir(e,n,1)})),ys=Pi(Ho),vs=Pi(qo);function ws(e,t){return(qs(e)?wt:dr)(e,so(t,3))}function bs(e,t){return(qs(e)?bt:fr)(e,so(t,3))}var Ss=Ti((function(e,t,n){Ne.call(e,n)?e[n].push(t):ir(e,n,[t])})),Cs=Yr((function(e,t,n){var i=-1,o="function"==typeof t,s=Gs(e)?r(e.length):[];return dr(e,(function(e){s[++i]=o?yt(t,e,n):Tr(e,t,n)})),s})),_s=Ti((function(e,t,n){ir(e,n,t)}));function Ls(e,t){return(qs(e)?At:Wr)(e,so(t,3))}var As=Ti((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Es=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vo(e,t[0],t[1])?t=[]:n>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,mr(t,1),[])})),Is=Mt||function(){return ot.Date.now()};function Os(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Qi(e,l,i,i,i,i,t)}function Ts(e,t){var n;if("function"!=typeof t)throw new Ie(o);return e=ga(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ms=Yr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Ms));r|=u}return Qi(e,r,t,n,i)})),ks=Yr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(ks));r|=u}return Qi(t,r,e,n,i)}));function Ds(e,t,n){var r,s,a,u,l,c,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Ie(o);function g(t){var n=r,o=s;return r=s=i,d=t,u=e.apply(o,n)}function m(e){return d=e,l=Mo(v,t),f?g(e):u}function y(e){var n=e-c;return c===i||n>=t||n<0||p&&e-d>=a}function v(){var e=Is();if(y(e))return w(e);l=Mo(v,function(e){var n=t-(e-c);return p?vn(n,a-(e-d)):n}(e))}function w(e){return l=i,h&&r?g(e):(r=s=i,u)}function b(){var e=Is(),n=y(e);if(r=arguments,s=this,c=e,n){if(l===i)return m(c);if(p)return bi(l),l=Mo(v,t),g(c)}return l===i&&(l=Mo(v,t)),u}return t=ya(t)||0,ta(n)&&(f=!!n.leading,a=(p="maxWait"in n)?yn(ya(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){l!==i&&bi(l),d=0,r=c=s=l=i},b.flush=function(){return l===i?u:w(Is())},b}var Ns=Yr((function(e,t){return lr(e,1,t)})),js=Yr((function(e,t,n){return lr(e,ya(t)||0,n)}));function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||Vn),n}function Ps(e){if("function"!=typeof e)throw new Ie(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Vn;var Ws=vi((function(e,t){var n=(t=1==t.length&&qs(t[0])?At(t[0],zt(so())):At(mr(t,1),zt(so()))).length;return Yr((function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return yt(e,this,r)}))})),Fs=Yr((function(e,t){var n=tn(t,oo(Fs));return Qi(e,u,i,t,n)})),xs=Yr((function(e,t){var n=tn(t,oo(xs));return Qi(e,64,i,t,n)})),Bs=eo((function(e,t){return Qi(e,256,i,i,i,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Us=Hi(Ar),zs=Hi((function(e,t){return e>=t})),Hs=Mr(function(){return arguments}())?Mr:function(e){return na(e)&&Ne.call(e,"callee")&&!et.call(e,"callee")},qs=r.isArray,Vs=dt?zt(dt):function(e){return na(e)&&Lr(e)==k};function Gs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return na(e)&&Gs(e)}var Qs=pn||yu,Ks=ft?zt(ft):function(e){return na(e)&&Lr(e)==v};function Js(e){if(!na(e))return!1;var t=Lr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Lr(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ga(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=pt?zt(pt):function(e){return na(e)&&po(e)==C};function ia(e){return"number"==typeof e||na(e)&&Lr(e)==_}function oa(e){if(!na(e)||Lr(e)!=L)return!1;var t=Ve(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==We}var sa=ht?zt(ht):function(e){return na(e)&&Lr(e)==E},aa=gt?zt(gt):function(e){return na(e)&&po(e)==I};function ua(e){return"string"==typeof e||!qs(e)&&na(e)&&Lr(e)==O}function la(e){return"symbol"==typeof e||na(e)&&Lr(e)==T}var ca=mt?zt(mt):function(e){return na(e)&&ea(e.length)&&!!Ze[Lr(e)]},da=Hi(Pr),fa=Hi((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Gs(e))return ua(e)?sn(e):Ii(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=po(e);return(t==C?Xt:t==I?nn:$a)(e)}function ha(e){return e?(e=ya(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=ha(e),n=t%1;return t==t?n?t-n:t:0}function ma(e){return e?sr(ga(e),0,p):0}function ya(e){if("number"==typeof e)return e;if(la(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var n=he.test(e);return n||me.test(e)?nt(e.slice(2),n?2:8):pe.test(e)?f:+e}function va(e){return Oi(e,Na(e))}function wa(e){return null==e?"":ai(e)}var ba=Mi((function(e,t){if(Co(t)||Gs(t))Oi(t,Da(t),e);else for(var n in t)Ne.call(t,n)&&er(e,n,t[n])})),Sa=Mi((function(e,t){Oi(t,Na(t),e)})),Ca=Mi((function(e,t,n,r){Oi(t,Na(t),e,r)})),_a=Mi((function(e,t,n,r){Oi(t,Da(t),e,r)})),La=eo(or),Aa=Yr((function(e,t){e=Le(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&vo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Na(s),u=-1,l=a.length;++u<l;){var c=a[u],d=e[c];(d===i||$s(d,Me[c])&&!Ne.call(e,c))&&(e[c]=s[c])}return e})),Ea=Yr((function(e){return e.push(i,Ji),yt(Ra,i,e)}));function Ia(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function Oa(e,t){return null!=e&&ho(e,t,Ir)}var Ta=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),e[t]=n}),tu(iu)),Ma=xi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),so),ka=Yr(Tr);function Da(e){return Gs(e)?Qn(e):Rr(e)}function Na(e){return Gs(e)?Qn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Le(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}(e)}var ja=Mi((function(e,t,n){Br(e,t,n)})),Ra=Mi((function(e,t,n,r){Br(e,t,n,r)})),Pa=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=At(t,(function(t){return t=yi(t,e),r||(r=t.length>1),t})),Oi(e,no(e),n),r&&(n=ar(n,7,Zi));for(var i=t.length;i--;)li(n,t[i]);return n})),Wa=eo((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,n){return Oa(e,n)}))}(e,t)}));function Fa(e,t){if(null==e)return{};var n=At(no(e),(function(e){return[e]}));return t=so(t),zr(e,n,(function(e,n){return t(e,n[0])}))}var xa=Yi(Da),Ba=Yi(Na);function $a(e){return null==e?[]:Ht(e,Da(e))}var Ua=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?za(t):t)}));function za(e){return Ja(wa(e).toLowerCase())}function Ha(e){return(e=wa(e))&&e.replace(ve,Qt).replace(qe,"")}var qa=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Ni("toLowerCase"),Ya=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Qa=ji((function(e,t,n){return e+(n?" ":"")+Ja(t)})),Ka=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Ni("toUpperCase");function Za(e,t,n){return e=wa(e),(t=n?i:t)===i?function(e){return Qe.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Yr((function(e,t){try{return yt(e,i,t)}catch(e){return Js(e)?e:new Se(e)}})),eu=eo((function(e,t){return wt(t,(function(t){t=Fo(t),ir(e,t,Ms(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Wi(),ru=Wi(!0);function iu(e){return e}function ou(e){return jr("function"==typeof e?e:ar(e,1))}var su=Yr((function(e,t){return function(n){return Tr(n,e,t)}})),au=Yr((function(e,t){return function(n){return Tr(e,n,t)}}));function uu(e,t,n){var r=Da(t),i=Sr(t,r);null!=n||ta(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Sr(t,Da(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Zs(e);return wt(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Et([this.value()],arguments))})})),e}function lu(){}var cu=$i(At),du=$i(St),fu=$i(Tt);function pu(e){return wo(e)?Wt(Fo(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hu=zi(),gu=zi(!0);function mu(){return[]}function yu(){return!1}var vu,wu=Bi((function(e,t){return e+t}),0),bu=Vi("ceil"),Su=Bi((function(e,t){return e/t}),1),Cu=Vi("floor"),_u=Bi((function(e,t){return e*t}),1),Lu=Vi("round"),Au=Bi((function(e,t){return e-t}),0);return xn.after=function(e,t){if("function"!=typeof t)throw new Ie(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},xn.ary=Os,xn.assign=ba,xn.assignIn=Sa,xn.assignInWith=Ca,xn.assignWith=_a,xn.at=La,xn.before=Ts,xn.bind=Ms,xn.bindAll=eu,xn.bindKey=ks,xn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qs(e)?e:[e]},xn.chain=ps,xn.chunk=function(e,t,n){t=(n?vo(e,t,n):t===i)?1:yn(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(cn(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},xn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},xn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Et(qs(n)?Ii(n):[n],mr(t,1))},xn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?At(e,(function(e){if("function"!=typeof e[1])throw new Ie(o);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var i=e[r];if(yt(i[0],this,n))return yt(i[1],this,n)}}))},xn.conforms=function(e){return function(e){var t=Da(e);return function(n){return ur(n,e,t)}}(ar(e,1))},xn.constant=tu,xn.countBy=ms,xn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},xn.curry=function e(t,n,r){var o=Qi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},xn.curryRight=function e(t,n,r){var o=Qi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},xn.debounce=Ds,xn.defaults=Aa,xn.defaultsDeep=Ea,xn.defer=Ns,xn.delay=js,xn.difference=$o,xn.differenceBy=Uo,xn.differenceWith=zo,xn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:ga(t))<0?0:t,r):[]},xn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:ga(t)))<0?0:t):[]},xn.dropRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0,!0):[]},xn.dropWhile=function(e,t){return e&&e.length?di(e,so(t,3),!0):[]},xn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&vo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ga(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ga(r))<0&&(r+=o),r=n>r?0:ma(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},xn.filter=function(e,t){return(qs(e)?Ct:gr)(e,so(t,3))},xn.flatMap=function(e,t){return mr(Ls(e,t),1)},xn.flatMapDeep=function(e,t){return mr(Ls(e,t),c)},xn.flatMapDepth=function(e,t,n){return n=n===i?1:ga(n),mr(Ls(e,t),n)},xn.flatten=Vo,xn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},xn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===i?1:ga(t)):[]},xn.flip=function(e){return Qi(e,512)},xn.flow=nu,xn.flowRight=ru,xn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},xn.functions=function(e){return null==e?[]:Sr(e,Da(e))},xn.functionsIn=function(e){return null==e?[]:Sr(e,Na(e))},xn.groupBy=Ss,xn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},xn.intersection=Yo,xn.intersectionBy=Qo,xn.intersectionWith=Ko,xn.invert=Ta,xn.invertBy=Ma,xn.invokeMap=Cs,xn.iteratee=ou,xn.keyBy=_s,xn.keys=Da,xn.keysIn=Na,xn.map=Ls,xn.mapKeys=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},xn.mapValues=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},xn.matches=function(e){return Fr(ar(e,1))},xn.matchesProperty=function(e,t){return xr(e,ar(t,1))},xn.memoize=Rs,xn.merge=ja,xn.mergeWith=Ra,xn.method=su,xn.methodOf=au,xn.mixin=uu,xn.negate=Ps,xn.nthArg=function(e){return e=ga(e),Yr((function(t){return $r(t,e)}))},xn.omit=Pa,xn.omitBy=function(e,t){return Fa(e,Ps(so(t)))},xn.once=function(e){return Ts(2,e)},xn.orderBy=function(e,t,n,r){return null==e?[]:(qs(t)||(t=null==t?[]:[t]),qs(n=r?i:n)||(n=null==n?[]:[n]),Ur(e,t,n))},xn.over=cu,xn.overArgs=Ws,xn.overEvery=du,xn.overSome=fu,xn.partial=Fs,xn.partialRight=xs,xn.partition=As,xn.pick=Wa,xn.pickBy=Fa,xn.property=pu,xn.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},xn.pull=Zo,xn.pullAll=Xo,xn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,so(n,2)):e},xn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,i,n):e},xn.pullAt=es,xn.range=hu,xn.rangeRight=gu,xn.rearg=Bs,xn.reject=function(e,t){return(qs(e)?Ct:gr)(e,Ps(so(t,3)))},xn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return qr(e,i),n},xn.rest=function(e,t){if("function"!=typeof e)throw new Ie(o);return Yr(e,t=t===i?t:ga(t))},xn.reverse=ts,xn.sampleSize=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ga(t),(qs(e)?Jn:Kr)(e,t)},xn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},xn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},xn.shuffle=function(e){return(qs(e)?Zn:ei)(e)},xn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&vo(e,t,n)?(t=0,n=r):(t=null==t?0:ga(t),n=n===i?r:ga(n)),ti(e,t,n)):[]},xn.sortBy=Es,xn.sortedUniq=function(e){return e&&e.length?oi(e):[]},xn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},xn.split=function(e,t,n){return n&&"number"!=typeof n&&vo(e,t,n)&&(t=n=i),(n=n===i?p:n>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?wi(sn(e),0,n):e.split(t,n):[]},xn.spread=function(e,t){if("function"!=typeof e)throw new Ie(o);return t=null==t?0:yn(ga(t),0),Yr((function(n){var r=n[t],i=wi(n,0,t);return r&&Et(i,r),yt(e,this,i)}))},xn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},xn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ga(t))<0?0:t):[]},xn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:ga(t)))<0?0:t,r):[]},xn.takeRightWhile=function(e,t){return e&&e.length?di(e,so(t,3),!1,!0):[]},xn.takeWhile=function(e,t){return e&&e.length?di(e,so(t,3)):[]},xn.tap=function(e,t){return t(e),e},xn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ie(o);return ta(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ds(e,t,{leading:r,maxWait:t,trailing:i})},xn.thru=hs,xn.toArray=pa,xn.toPairs=xa,xn.toPairsIn=Ba,xn.toPath=function(e){return qs(e)?At(e,Fo):la(e)?[e]:Ii(Wo(wa(e)))},xn.toPlainObject=va,xn.transform=function(e,t,n){var r=qs(e),i=r||Qs(e)||ca(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Zs(o)?Bn(Ve(e)):{}}return(i?wt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},xn.unary=function(e){return Os(e,1)},xn.union=ns,xn.unionBy=rs,xn.unionWith=is,xn.uniq=function(e){return e&&e.length?ui(e):[]},xn.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},xn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},xn.unset=function(e,t){return null==e||li(e,t)},xn.unzip=os,xn.unzipWith=ss,xn.update=function(e,t,n){return null==e?e:ci(e,t,mi(n))},xn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ci(e,t,mi(n),r)},xn.values=$a,xn.valuesIn=function(e){return null==e?[]:Ht(e,Na(e))},xn.without=as,xn.words=Za,xn.wrap=function(e,t){return Fs(mi(t),e)},xn.xor=us,xn.xorBy=ls,xn.xorWith=cs,xn.zip=ds,xn.zipObject=function(e,t){return hi(e||[],t||[],er)},xn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jr)},xn.zipWith=fs,xn.entries=xa,xn.entriesIn=Ba,xn.extend=Sa,xn.extendWith=Ca,uu(xn,xn),xn.add=wu,xn.attempt=Xa,xn.camelCase=Ua,xn.capitalize=za,xn.ceil=bu,xn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ya(n))==n?n:0),t!==i&&(t=(t=ya(t))==t?t:0),sr(ya(e),t,n)},xn.clone=function(e){return ar(e,4)},xn.cloneDeep=function(e){return ar(e,5)},xn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},xn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},xn.conformsTo=function(e,t){return null==t||ur(e,t,Da(t))},xn.deburr=Ha,xn.defaultTo=function(e,t){return null==e||e!=e?t:e},xn.divide=Su,xn.endsWith=function(e,t,n){e=wa(e),t=ai(t);var r=e.length,o=n=n===i?r:sr(ga(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},xn.eq=$s,xn.escape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(V,Kt):e},xn.escapeRegExp=function(e){return(e=wa(e))&&ne.test(e)?e.replace(te,"\\$&"):e},xn.every=function(e,t,n){var r=qs(e)?St:pr;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},xn.find=ys,xn.findIndex=Ho,xn.findKey=function(e,t){return kt(e,so(t,3),wr)},xn.findLast=vs,xn.findLastIndex=qo,xn.findLastKey=function(e,t){return kt(e,so(t,3),br)},xn.floor=Cu,xn.forEach=ws,xn.forEachRight=bs,xn.forIn=function(e,t){return null==e?e:yr(e,so(t,3),Na)},xn.forInRight=function(e,t){return null==e?e:vr(e,so(t,3),Na)},xn.forOwn=function(e,t){return e&&wr(e,so(t,3))},xn.forOwnRight=function(e,t){return e&&br(e,so(t,3))},xn.get=Ia,xn.gt=Us,xn.gte=zs,xn.has=function(e,t){return null!=e&&ho(e,t,Er)},xn.hasIn=Oa,xn.head=Go,xn.identity=iu,xn.includes=function(e,t,n,r){e=Gs(e)?e:$a(e),n=n&&!r?ga(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Nt(e,t,n)>-1},xn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ga(n);return i<0&&(i=yn(r+i,0)),Nt(e,t,i)},xn.inRange=function(e,t,n){return t=ha(t),n===i?(n=t,t=0):n=ha(n),function(e,t,n){return e>=vn(t,n)&&e<yn(t,n)}(e=ya(e),t,n)},xn.invoke=ka,xn.isArguments=Hs,xn.isArray=qs,xn.isArrayBuffer=Vs,xn.isArrayLike=Gs,xn.isArrayLikeObject=Ys,xn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Lr(e)==y},xn.isBuffer=Qs,xn.isDate=Ks,xn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},xn.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(qs(e)||"string"==typeof e||"function"==typeof e.splice||Qs(e)||ca(e)||Hs(e)))return!e.length;var t=po(e);if(t==C||t==I)return!e.size;if(Co(e))return!Rr(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},xn.isEqual=function(e,t){return kr(e,t)},xn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?kr(e,t,i,n):!!r},xn.isError=Js,xn.isFinite=function(e){return"number"==typeof e&&hn(e)},xn.isFunction=Zs,xn.isInteger=Xs,xn.isLength=ea,xn.isMap=ra,xn.isMatch=function(e,t){return e===t||Dr(e,t,uo(t))},xn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,uo(t),n)},xn.isNaN=function(e){return ia(e)&&e!=+e},xn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(e)},xn.isNil=function(e){return null==e},xn.isNull=function(e){return null===e},xn.isNumber=ia,xn.isObject=ta,xn.isObjectLike=na,xn.isPlainObject=oa,xn.isRegExp=sa,xn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=d},xn.isSet=aa,xn.isString=ua,xn.isSymbol=la,xn.isTypedArray=ca,xn.isUndefined=function(e){return e===i},xn.isWeakMap=function(e){return na(e)&&po(e)==M},xn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Lr(e)},xn.join=function(e,t){return null==e?"":gn.call(e,t)},xn.kebabCase=qa,xn.last=Jo,xn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ga(n))<0?yn(r+o,0):vn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Dt(e,Rt,o,!0)},xn.lowerCase=Va,xn.lowerFirst=Ga,xn.lt=da,xn.lte=fa,xn.max=function(e){return e&&e.length?hr(e,iu,Ar):i},xn.maxBy=function(e,t){return e&&e.length?hr(e,so(t,2),Ar):i},xn.mean=function(e){return Pt(e,iu)},xn.meanBy=function(e,t){return Pt(e,so(t,2))},xn.min=function(e){return e&&e.length?hr(e,iu,Pr):i},xn.minBy=function(e,t){return e&&e.length?hr(e,so(t,2),Pr):i},xn.stubArray=mu,xn.stubFalse=yu,xn.stubObject=function(){return{}},xn.stubString=function(){return""},xn.stubTrue=function(){return!0},xn.multiply=_u,xn.nth=function(e,t){return e&&e.length?$r(e,ga(t)):i},xn.noConflict=function(){return ot._===this&&(ot._=Fe),this},xn.noop=lu,xn.now=Is,xn.pad=function(e,t,n){e=wa(e);var r=(t=ga(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ui(dn(i),n)+e+Ui(cn(i),n)},xn.padEnd=function(e,t,n){e=wa(e);var r=(t=ga(t))?on(e):0;return t&&r<t?e+Ui(t-r,n):e},xn.padStart=function(e,t,n){e=wa(e);var r=(t=ga(t))?on(e):0;return t&&r<t?Ui(t-r,n)+e:e},xn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(wa(e).replace(re,""),t||0)},xn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ha(e),t===i?(t=e,e=0):t=ha(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Sn();return vn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Vr(e,t)},xn.reduce=function(e,t,n){var r=qs(e)?It:xt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},xn.reduceRight=function(e,t,n){var r=qs(e)?Ot:xt,i=arguments.length<3;return r(e,so(t,4),n,i,fr)},xn.repeat=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ga(t),Gr(wa(e),t)},xn.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},xn.result=function(e,t,n){var r=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++r<o;){var s=null==e?i:e[Fo(t[r])];s===i&&(r=o,s=n),e=Zs(s)?s.call(e):s}return e},xn.round=Lu,xn.runInContext=e,xn.sample=function(e){return(qs(e)?Kn:Qr)(e)},xn.size=function(e){if(null==e)return 0;if(Gs(e))return ua(e)?on(e):e.length;var t=po(e);return t==C||t==I?e.size:Rr(e).length},xn.snakeCase=Ya,xn.some=function(e,t,n){var r=qs(e)?Tt:ni;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},xn.sortedIndex=function(e,t){return ri(e,t)},xn.sortedIndexBy=function(e,t,n){return ii(e,t,so(n,2))},xn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&$s(e[r],t))return r}return-1},xn.sortedLastIndex=function(e,t){return ri(e,t,!0)},xn.sortedLastIndexBy=function(e,t,n){return ii(e,t,so(n,2),!0)},xn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if($s(e[n],t))return n}return-1},xn.startCase=Qa,xn.startsWith=function(e,t,n){return e=wa(e),n=null==n?0:sr(ga(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},xn.subtract=Au,xn.sum=function(e){return e&&e.length?Bt(e,iu):0},xn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},xn.template=function(e,t,n){var r=xn.templateSettings;n&&vo(e,t,n)&&(t=i),e=wa(e),t=Ca({},t,r,Ki);var o,s,a=Ca({},t.imports,r.imports,Ki),u=Da(a),l=Ht(a,u),c=0,d=t.interpolate||we,f="__p += '",p=Ae((t.escape||we).source+"|"+d.source+"|"+(d===J?de:we).source+"|"+(t.evaluate||we).source+"|$","g"),h="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(p,(function(t,n,r,i,a,u){return r||(r=i),f+=e.slice(c,u).replace(be,Jt),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var g=Ne.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(U,""):f).replace(z,"$1").replace(H,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Xa((function(){return Ce(u,h+"return "+f).apply(i,l)}));if(m.source=f,Js(m))throw m;return m},xn.times=function(e,t){if((e=ga(e))<1||e>d)return[];var n=p,r=vn(e,p);t=so(t),e-=p;for(var i=$t(r,t);++n<e;)t(n);return i},xn.toFinite=ha,xn.toInteger=ga,xn.toLength=ma,xn.toLower=function(e){return wa(e).toLowerCase()},xn.toNumber=ya,xn.toSafeInteger=function(e){return e?sr(ga(e),-9007199254740991,d):0===e?e:0},xn.toString=wa,xn.toUpper=function(e){return wa(e).toUpperCase()},xn.trim=function(e,t,n){if((e=wa(e))&&(n||t===i))return Ut(e);if(!e||!(t=ai(t)))return e;var r=sn(e),o=sn(t);return wi(r,Vt(r,o),Gt(r,o)+1).join("")},xn.trimEnd=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.slice(0,an(e)+1);if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,0,Gt(r,sn(t))+1).join("")},xn.trimStart=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,Vt(r,sn(t))).join("")},xn.truncate=function(e,t){var n=30,r="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ga(t.length):n,r="omission"in t?ai(t.omission):r}var s=(e=wa(e)).length;if(Zt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var u=n-on(r);if(u<1)return r;var l=a?wi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+r;if(a&&(u+=l.length-u),sa(o)){if(e.slice(u).search(o)){var c,d=l;for(o.global||(o=Ae(o.source,wa(fe.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;l=l.slice(0,f===i?u:f)}}else if(e.indexOf(ai(o),u)!=u){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r},xn.unescape=function(e){return(e=wa(e))&&G.test(e)?e.replace(q,un):e},xn.uniqueId=function(e){var t=++je;return wa(e)+t},xn.upperCase=Ka,xn.upperFirst=Ja,xn.each=ws,xn.eachRight=bs,xn.first=Go,uu(xn,(vu={},wr(xn,(function(e,t){Ne.call(xn.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),xn.VERSION="4.17.21",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn})),wt(["drop","take"],(function(e,t){zn.prototype[e]=function(n){n=n===i?1:yn(ga(n),0);var r=this.__filtered__&&!t?new zn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,p),type:e+(r.__dir__<0?"Right":"")}),r},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),wt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}})),zn.prototype.compact=function(){return this.filter(iu)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new zn(this):this.map((function(n){return Tr(n,e,t)}))})),zn.prototype.reject=function(e){return this.filter(Ps(so(e)))},zn.prototype.slice=function(e,t){e=ga(e);var n=this;return n.__filtered__&&(e>0||t<0)?new zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ga(t))<0?n.dropRight(-t):n.take(t-e)),n)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(p)},wr(zn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=xn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(xn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof zn,l=a[0],c=u||qs(t),d=function(e){var t=o.apply(xn,Et([e],a));return r&&f?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=s&&!f,g=u&&!p;if(!s&&c){t=g?t:new zn(this);var m=e.apply(t,a);return m.__actions__.push({func:hs,args:[d],thisArg:i}),new Un(m,f)}return h&&g?e.apply(this,a):(m=this.thru(d),h?r?m.value()[0]:m.value():m)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(qs(i)?i:[],e)}return this[n]((function(n){return t.apply(qs(n)?n:[],e)}))}})),wr(zn.prototype,(function(e,t){var n=xn[t];if(n){var r=n.name+"";Ne.call(Mn,r)||(Mn[r]=[]),Mn[r].push({name:t,func:n})}})),Mn[Fi(i,2).name]=[{name:"wrapper",func:i}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vn(t,e+s);break;case"takeRight":e=yn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,d=c.length,f=0,p=vn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return fi(e,this.__actions__);var h=[];e:for(;u--&&f<p;){for(var g=-1,m=e[l+=t];++g<d;){var y=c[g],v=y.iteratee,w=y.type,b=v(m);if(2==w)m=b;else if(!b){if(1==w)continue e;break e}}h[f++]=m}return h},xn.prototype.at=gs,xn.prototype.chain=function(){return ps(this)},xn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},xn.prototype.next=function(){this.__values__===i&&(this.__values__=pa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},xn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var r=Bo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},xn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Un(t,this.__chain__)}return this.thru(ts)},xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},xn.prototype.first=xn.prototype.head,st&&(xn.prototype[st]=function(){return this}),xn}();ot._=ln,(r=function(){return ln}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},4883:(e,t,n)=>{var r=n(5835);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},8253:(e,t,n)=>{var r=n(158);e.exports=function(){return r.Date.now()}},5892:(e,t,n)=>{var r=n(1241),i=n(408)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},9174:e=>{e.exports=function(){return[]}},647:e=>{e.exports=function(){return!1}},8172:(e,t,n)=>{var r=n(6897),i=n(3619);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:o,maxWait:t,trailing:s})}},5053:(e,t,n)=>{var r=n(2383),i=n(3619),o=n(1878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):s.test(e)?NaN:+e}},3270:(e,t,n)=>{var r=n(430);e.exports=function(e){return null==e?"":r(e)}},2169:(e,t,n)=>{"use strict";const r=n(4561);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new r;let n=0;const i=async(e,r,...i)=>{n++;const o=(async()=>e(...i))();r(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(r,...o)=>new Promise((s=>{((r,o,...s)=>{t.enqueue(i.bind(null,r,o,...s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},8021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(3034);class i extends Error{constructor(e){super(e),this.name="TimeoutError"}}class o{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){var n;const r={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&(null===(n=this._queue[this.size-1])||void 0===n?void 0:n.priority)>=t.priority)return void this._queue.push(r);const i=function(e,t,n){let r=0,i=e.length;for(;i>0;){const n=Math.trunc(i/2);let s=r+n;o=e[s],t.priority-o.priority<=0?(r=++s,i-=n+1):i=n}var o;return r}(this._queue,r);this._queue.splice(i,0,r)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}const s=()=>{},a=new i;class u extends r{constructor(e){var t,n,r,i;if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:o,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(i=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==i?i:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,r)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const i=void 0===this._timeout&&void 0===t.timeout?e():function(e,t,n,r){let i;const o=new Promise(((o,s)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");t!==Number.POSITIVE_INFINITY?(r={customTimers:{setTimeout,clearTimeout},...r},i=r.customTimers.setTimeout.call(void 0,(()=>{try{o(n())}catch(e){s(e)}}),t),(async()=>{try{o(await e)}catch(e){s(e)}finally{r.customTimers.clearTimeout.call(void 0,i)}})()):o(e)}));return o.clear=()=>{clearTimeout(i),i=void 0},o}(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&r(a)})),o=await i;n(o),this.emit("completed",o)}catch(e){r(e),this.emit("error",e)}this._next()}),t),this._tryToStartAnother(),this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onSizeLessThan(e){if(!(this._queue.size<e))return new Promise((t=>{const n=()=>{this._queue.size<e&&(this.removeListener("next",n),t())};this.on("next",n)}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}},2956:(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t),n.d(t,{Cmd:()=>j,DEPRECATED_mergeChildReducers:()=>ue,combineReducers:()=>ae,getCmd:()=>P,getModel:()=>W,install:()=>G,isLoop:()=>R,liftState:()=>x,loop:()=>F,mergeChildReducers:()=>le,reduceReducers:()=>ce});var i,o=Array.prototype.concat,s=function(e){return o.apply([],e)};function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=Symbol("isCmd"),h=Symbol("dispatch"),g=Symbol("getState"),m="RUN",y="ACTION",v="SET_TIMEOUT",w="SET_INTERVAL",b="LIST",S="MAP",C="NONE";function _(e){return!!e&&!!e[p]}function L(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return A(e,{dispatch:t,wrappedDispatch:t,getState:n,loopConfig:r})}function A(e,t){switch(e.type){case m:return function(e,t){var n,i,o=t.dispatch,s=t.getState,a=t.loopConfig,u=e.successActionCreator||function(){};n=e.failActionCreator?function(t){return a.DONT_LOG_ERRORS_ON_HANDLED_FAILURES||console.error(t),e.failActionCreator(t)}:console.error;try{var l=e.func.apply(void 0,function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(n){return n===h?e:n===g?t:n}))}(e.args,o,s));if((i=l)&&"object"===r(i)&&"function"==typeof i.then&&!e.forceSync)return l.then(u,n).then((function(e){return e?[e]:[]}));var c=u(l);return c?Promise.resolve([c]):null}catch(t){if(!e.failActionCreator)throw console.error(t),t;var d=n(t);return d?Promise.resolve([d]):null}}(e,t);case y:return Promise.resolve([e.actionToDispatch]);case v:case w:return function(e,t){var n,r=function(){var n=A(e.nestedCmd,t);n&&n.then((function(e){e.forEach((function(e){return t.wrappedDispatch(e)}))}))};return n=e.type===w?setInterval(r,e.delayMs):setTimeout(r,e.delayMs),e.scheduledActionCreator?Promise.resolve([e.scheduledActionCreator(n)]):null}(e,t);case b:return e.sequence?function(e,t){var n=e.cmds,r=e.batch,i=void 0!==r&&r,o=n.length?n[0]:null;if(!o)return null;var a=new Promise((function(e){var r=A(o,t);(r=r||Promise.resolve([])).then((function(r){(i?Promise.resolve():Promise.all(r.map((function(e){return t.wrappedDispatch(e)})))).then((function(){var o=A(D(n.slice(1),{batch:i,sequence:!0}),t);o?o.then((function(t){e(r.concat(t))})):e(r)}))}))})).then(s);return i?a:a.then((function(){return[]}))}(e,t):function(e,t){var n=e.cmds,r=e.batch,i=void 0!==r&&r,o=n.map((function(e){var n=A(e,t);return!n||i?n:n.then((function(e){return Promise.all(e.map((function(e){return t.wrappedDispatch(e)})))}))})).filter((function(e){return e}));return 0===o.length?null:Promise.all(o).then(s).then((function(e){return i?e:[]}))}(e,t);case S:var n=A(e.nestedCmd,d(d({},t),{},{wrappedDispatch:function(n){return t.wrappedDispatch(e.tagger.apply(e,u(e.args).concat([n])))}}));return n?n.then((function(t){return t.map((function(t){return e.tagger.apply(e,u(e.args).concat([t]))}))})):null;case C:return null;default:throw new Error("Invalid Cmd type ".concat(e.type))}}function E(e){var t=e.result,n=e.success;return n&&this.successActionCreator?this.successActionCreator(t):!n&&this.failActionCreator?this.failActionCreator(t):null}function I(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.testInvariants)throw Error("Redux Loop: Detected usage of Cmd.run's testInvariants option in production code. This should only be used in tests.");n.testInvariants;var r=a(n,["testInvariants"]);return Object.freeze(d((f(t={},p,!0),f(t,"type",m),f(t,"func",e),f(t,"simulate",E),t),r))}function O(){return this.actionToDispatch}function T(e,t,n,r,i){var o;return Object.freeze((f(o={},p,!0),f(o,"type",r),f(o,"nestedCmd",e),f(o,"delayMs",t),f(o,"scheduledActionCreator",n.scheduledActionCreator),f(o,"simulate",M),o))}function M(e,t){var n=this.nestedCmd.simulate(t),r=null;return Array.isArray(n)?r=n:n&&(r=[n]),this.scheduledActionCreator?[this.scheduledActionCreator(e)].concat(r):r}function k(e){return s(this.cmds.map((function(t,n){return t.simulate(e[n])})).filter((function(e){return e})))}function D(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.testInvariants)throw Error("Redux Loop: Detected usage of Cmd.list's testInvariants option in production code. This should only be used in tests.");n.testInvariants;var r=a(n,["testInvariants"]);return Object.freeze(d((f(t={},p,!0),f(t,"type",b),f(t,"cmds",e),f(t,"simulate",k),t),r))}function N(e){var t=this,n=this.nestedCmd.simulate(e);return Array.isArray(n)?n.map((function(e){return t.tagger.apply(t,u(t.args).concat([e]))})):n?this.tagger.apply(this,u(this.args).concat([n])):null}const j={run:I,action:function(e){var t;return Object.freeze((f(t={},p,!0),f(t,"type",y),f(t,"actionToDispatch",e),f(t,"simulate",O),t))},setTimeout:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return T(e,t,n,v)},setInterval:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return T(e,t,n,w)},clearTimeout:function(e){return I(clearTimeout,{args:[e]})},clearInterval:function(e){return I(clearInterval,{args:[e]})},list:D,map:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return Object.freeze((f(n={},p,!0),f(n,"type",S),f(n,"tagger",t),f(n,"nestedCmd",e),f(n,"args",i),f(n,"simulate",N),n))},none:Object.freeze((f(i={},p,!0),f(i,"type",C),f(i,"simulate",(function(){return null})),i)),dispatch:h,getState:g};var R=function(e){return Array.isArray(e)&&2===e.length&&_(e[1])&&!_(e[0])},P=function(e){return R(e)?e[1]:null},W=function(e){return R(e)?e[0]:e},F=function(e,t){return[e,t]},x=function(e){return R(e)?e:F(e,j.none)},B=function(e,t){return"\nException thrown when running Cmds from action: ".concat(e,".\n\nThrown exception: \n").concat(t,"\n")};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V={DONT_LOG_ERRORS_ON_HANDLED_FAILURES:!1,ENABLE_THUNK_MIGRATION:!1};function G(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},V,e);return function(e){return function(n,r,i){var o=H(x(r),2),s=o[0],a=o[1],u=[],l=function(e){return function(t,n){var r=e(t,n),i=H(x(r),2),o=i[0],s=i[1];return u.push({originalAction:n,cmd:s}),o}},c=e(l(n),s,i);function d(e){var n=e.originalAction,r=L(e.cmd,f,c.getState,t);return r?r.then((function(e){if(e.length)return Promise.all(e.map(f))})).catch((function(e){throw console.error(B(n.type,e)),e})):null}function f(e){if(t.ENABLE_THUNK_MIGRATION&&"function"==typeof e)return e(f,c.getState);var n,r,i=c.dispatch(e),o=u;return u=[],(n=o,r=n.map(d).filter((function(e){return e})),0===r.length?Promise.resolve():1===r.length?r[0]:Promise.all(r).then((function(){}))).then((function(){return i}))}return d({originalAction:{type:"@@ReduxLoop/INIT"},cmd:a}),U(U({},c),{},{dispatch:f,replaceReducer:function(e){return c.replaceReducer(l(e))}})}}}function Y(e){switch(e.length){case 0:return j.none;case 1:return e[0];default:return j.list(e)}}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){return function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var s=[],a=!1,u=Object.keys(e).reduce((function(t,r){var o=e[r];if(!o)return a||(t=K({},t),a=!0),delete t[r],t;var u=o.apply(void 0,[t[r],n].concat(i));return R(u)&&(s.push(P(u)),u=W(u)),t[r]!==u&&a?t[r]=u:t[r]!==u&&(t=K(K({},t),{},J({},r,u)),a=!0),t}),t);return F(u,Y(s))}}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(){return console.warning("mergeChildReducers is deprecated. Use reduceReducers or combineReducers instead."),re.apply(void 0,arguments)}function re(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var s,a=e;R(a)&&(s=P(a),a=W(a));var u=s?[s]:[],l=!1,c=Object.keys(n).reduce((function(e,r){var o=n[r];if(!o)return l||(e=ee({},e),l=!0),delete e[r],e;var s=o.apply(void 0,[e[r],t].concat(i));return R(s)&&(u.push(P(s)),s=W(s)),e[r]!==s&&l?e[r]=s:e[r]!==s&&(e=ee(ee({},e),{},te({},r,s)),l=!0),e}),a);return F(c,Y(u))}function ie(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const se=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var s=t.reduce((function(e,t){var r=t.apply(void 0,[e.newState,n].concat(i));return R(r)?{newState:W(r),cmds:[].concat(ie(e.cmds),[P(r)])}:{newState:r,cmds:e.cmds}}),{newState:e,cmds:[]}),a=s.newState,u=s.cmds;return F(a,Y(u))}};function ae(){return Z.apply(void 0,arguments)}function ue(){return re.apply(void 0,arguments)}function le(){return ne.apply(void 0,arguments)}function ce(){return se.apply(void 0,arguments)}},586:(e,t,n)=>{var r=n(6589),i=n(2708),o=i;o.v1=r,o.v4=i,e.exports=o},8726:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]}},6338:(e,t,n)=>{var r,i=n.g.crypto||n.g.msCrypto;if(i&&i.getRandomValues){var o=new Uint8Array(16);r=function(){return i.getRandomValues(o),o}}if(!r){var s=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),s[t]=e>>>((3&t)<<3)&255;return s}}e.exports=r},6589:(e,t,n)=>{var r=n(6338),i=n(8726),o=r(),s=[1|o[0],o[1],o[2],o[3],o[4],o[5]],a=16383&(o[6]<<8|o[7]),u=0,l=0;e.exports=function(e,t,n){var r=t&&n||0,o=t||[],c=void 0!==(e=e||{}).clockseq?e.clockseq:a,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,p=d-u+(f-l)/1e4;if(p<0&&void 0===e.clockseq&&(c=c+1&16383),(p<0||d>u)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,l=f,a=c;var h=(1e4*(268435455&(d+=122192928e5))+f)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=255&h;var g=d/4294967296*1e4&268435455;o[r++]=g>>>8&255,o[r++]=255&g,o[r++]=g>>>24&15|16,o[r++]=g>>>16&255,o[r++]=c>>>8|128,o[r++]=255&c;for(var m=e.node||s,y=0;y<6;++y)o[r+y]=m[y];return t||i(o)}},2708:(e,t,n)=>{var r=n(6338),i=n(8726);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},4561:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},2380:(e,t,n)=>{var r=n(1921);e.exports="string"==typeof r?r:r.toString()},4361:function(e,t,n){"use strict";var r,i,o,s,a,u,l,c,d,f,p,h,g,m=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},y=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const w=n(8832),b=v(n(2551)),S=n(6192),C=n(1298),_=n(1298),L=v(n(306));class A{constructor(e){r.set(this,void 0),i.set(this,void 0),m(this,r,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};y(this,r,"f").transmit(C.HEARTBEAT_CHANNEL,t),m(this,i,setInterval((()=>{y(this,r,"f").transmit(C.HEARTBEAT_CHANNEL,t)}),C.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(y(this,i,"f")),m(this,i,void 0,"f")}}r=new WeakMap,i=new WeakMap;class E{constructor(e,t,n="app"){o.set(this,void 0),m(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){y(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return y(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return y(this,o,"f").channelAddContextListener(this.id,e,t)}}o=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){s.set(this,!1),a.set(this,void 0),u.set(this,!1),l.set(this,""),c.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),d.set(this,{}),f.set(this,{}),p.set(this,[]),h.set(this,void 0),g.set(this,void 0),m(this,h,e,"f"),m(this,a,new A(e),"f"),m(this,g,t,"f");const n=()=>!0===S.Globals?.FSBL?.Clients?.WindowClient?.options?.customData?.interop?.autoConnect;if(S.Globals?.FSBL?.addEventListener?S.Globals?.FSBL.addEventListener("onReady",(()=>{n()&&this.connectWhenFSBLIsReady()})):window.addEventListener("FSBLReady",(()=>{n()&&this.connectWhenFSBLIsReady()})),window.Event){const e=new Event("fdc3Ready");window&&window.dispatchEvent(e)}}meta(){return{uuid:y(this,l,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(y(this,f,"f")[t?.type]??[]).concat(y(this,f,"f")["*"]??[]).forEach((({handler:n,channel:r})=>{e.meta.channel!==r&&(e.meta.channel||r)||n(t)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,r=y(this,d,"f")[t];n&&(r||[]).forEach((e=>e(n)))}handleIncoming(e){switch(b.default.log("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e)}}releaseQueue(){const e=e=>(void 0!==e?.meta?.uuid&&(e.meta.uuid=y(this,l,"f")),e);y(this,p,"f").forEach((async t=>{const{message:n,handler:r,resolve:i}=t,{err:o,response:s}=await y(this,h,"f").query(C.SERVER_CHANNEL,e(n),r);i({err:o,receiveMessage:s?.data})})),m(this,p,[],"f")}async connectWhenFSBLIsReady(){y(this,u,"f")||(m(this,u,!0,"f"),await y(this,g,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(y(this,s,"f")){const{err:r,response:i}=await y(this,h,"f").query(C.SERVER_CHANNEL,e,t);n({err:r,receiveMessage:i?.data})}else y(this,p,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=y(this,g,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;b.default.log(`fdc3.connect StartupData for ${t}`,e),m(this,l,t,"f");const r={type:"register",meta:this.meta(),payload:{clientChannel:y(this,c,"f"),windowName:t,authenticationToken:n}};y(this,h,"f").query(C.SERVER_CHANNEL,r,(e=>{e?b.default.error("connect error",e):(y(this,h,"f").addResponder(y(this,c,"f"),((e,t)=>{if(e||!t){const t=_.errorAsString(e??"No request received on responder");b.default.error(`FinsembleDesktopAgent can't listen on channel ${y(this,c,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),m(this,s,!0,"f"),this.releaseQueue())})),y(this,a,"f").start(y(this,l,"f"))}stop(){y(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{y(this,h,"f").removeResponder(y(this,c,"f")),m(this,s,!1,"f")}))}async getCurrentContext(e){const t={type:"currentContextRequest",meta:this.meta(),payload:{contextType:e}},{err:n,receiveMessage:r}=await this.exchange(t);return n?null:"currentContext"===r?.type&&r.payload.context?r.payload.context:null}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:r,receiveMessage:i}=await this.exchange(n);return r?null:"currentContext"===i?.type?i.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t}};this.exchange(n)}async getSystemChannels(){const e={type:"systemChannelRequest",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e);return t?[]:("systemChannels"===n?.type?n?.payload?.channels:[]).map((e=>new E(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.OpenError.ResolverUnavailable;if(o.payload.error)throw o.payload.error}async findIntent(e,t){const n={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.appIntent)throw"Invalid response returned from InteropService for findIntent. No appIntent and no error.";return o.payload.appIntent}async findIntentsByContext(e){const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:n}=await this.exchange(t),r=n;if(r.payload.error)throw r.payload.error;return r.payload.intents||[]}async raiseIntent(e,t,n){const r={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:i,receiveMessage:o}=await this.exchange(r),s=o;if(i)throw w.ResolveError.ResolverUnavailable;if(s.payload.error)throw s.payload.error;if(!s.payload.data)throw"Invalid response returned from InteropService for raiseIntent. No data.";return s.payload.data}async raiseIntentForContext(e,t){const n={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.data)throw"Invalid response returned from InteropService for raiseIntentForContext. No data.";return o.payload.data}addIntentListener(e,t){y(this,d,"f")[e]=_.mmAdd(y(this,d,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),y(this,d,"f")[e]=_.mmRemove(y(this,d,"f"),e,t)}}}channelAddContextListener(e,t,n){const r=n?t:"*";n||(n=t);const i={handler:n,channel:e};y(this,f,"f")[r]=_.mmAdd(y(this,d,"f"),r,i);let o={type:"subscribeContext",meta:this.meta(),payload:{contextType:r}};return e&&(o.meta.channel=e),this.exchange(o),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:r}};e&&(t.meta.channel=e),y(this,f,"f")[r]=_.mmRemove(y(this,d,"f"),r,i),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new E(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),r=n;if(t)throw t;if(r.payload.error)throw r.payload.error;if(!r.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return r.payload.data.map((e=>new E(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:L.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,g=new WeakMap},7703:function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InteropAdmin=void 0;const s=o(n(9319)),a=o(n(2551)),u=n(1298),l=n(8832);class c{constructor(){r.set(this,window.name)}async addAppDefinitions(e){const t={type:"addAppDefinitions",meta:{uuid:i(this,r,"f")},payload:{apps:e}};await s.default.query(u.SERVER_CHANNEL,t)}async removeAppDefinitions(e){const t={type:"removeAppDefinitions",meta:{uuid:i(this,r,"f")},payload:{apps:e}};await s.default.query(u.SERVER_CHANNEL,t)}async setAuthenticationToken(e){const t={type:"setAuthenticationToken",meta:{uuid:i(this,r,"f")},payload:{authenticationToken:e}};await s.default.query(u.SERVER_CHANNEL,t)}async registerUIResolverListener(e){s.default.addResponder(u.INTENT_RESOLVER_CHANNEL,(async(t,n)=>{let r,i;if(t)Promise.reject(`registerUIResolverListener failed. It can only be invoked once, system wide (router error: ${t})`);else{const t=n?.data;try{r=await e(t)}catch(e){a.default.log(`registerUIResolverListener IntentResolution rejected ${e}`),i={error:l.ResolveError.ResolverUnavailable}}n?.sendQueryResponse(null,i||r)}}));const t={type:"registerUIResolver",meta:{uuid:i(this,r,"f")}};await s.default.query(u.SERVER_CHANNEL,t)}}t.InteropAdmin=c,r=new WeakMap,t.default=c},1298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.HEARTBEAT_INTERVAL=t.HEARTBEAT_CHANNEL=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=function(e,t,n){return(e[t]||[]).concat([n])},t.concatNoDups=function(e,t){const n=Array.isArray(t)?t:[t],r=e?n.concat(e):n;return Array.from(new Set(r))},t.mmRemove=function(e,t,n){return(e[t]||[]).filter((e=>e===n))},t.errorAsString=function(e){return e?.message??e??null},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.HEARTBEAT_CHANNEL="FSBL.FDC3.Interop.Server",t.HEARTBEAT_INTERVAL=4e3,t.AnonymousAuthenticationToken={authenticationKeyType:"unauthenticated",meta:{name:"Anonymous app"}}},7e3:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDesktop=void 0;const l=n(3854),c=n(1742),d=n(8774),f=n(5688),p=u(n(3699)),h=s(n(8379)),g=n(6192),m=n(3998),y=s(n(5959)),v=u(n(5020)),w=u(n(2551)),b=u(n(7703)),S=u(n(9319)),C=n(6925),_=n(7274),L=n(7580),A=u(n(710)),E=u(n(5376)),I=u(n(3190)),O=u(n(9562)),T=u(n(9499)),M=u(n(8970)),k=u(n(3862)),D=u(n(6008)),N=u(n(7346)),j=u(n(10)),R=u(n(8718)),P=u(n(9321)),W=u(n(2807)),F=u(n(4068)),{APPLICATION_STATE_CHANNEL:x}=h;let B=!1,$="windowName was not set",U={},z={type:"Unknown component type"};const H=e=>{(e=>{window.addEventListener("beforeunload",(t=>{e.clickedMailTo?(e.clickedMailTo=!1,t.preventDefault()):e.windowClose()})),document.querySelector("body")?.addEventListener("click",(t=>{"a"===t.target.tagName.toLowerCase()&&t.target.href.includes("mailto")&&(e.clickedMailTo=!0)}))})(e)};t.FSBLDesktop=class{constructor(){this.FinsembleWindow=f.FinsembleWindow,this.ConfigUtils=m.ConfigUtilInstance,this.RESTUtils=y,this.UserNotification=p.default,this.SystemManagerClient=v.default,this.clickedMailTo=!1,this.isInitialized=!1,this.displayStartupTimeoutError=!0,this.dependencyManager=l.FSBLDependencyManagerSingleton,this.System=c.System,r.set(this,C.Startup.getInstance()),this.remoteRedux={remoteReduxClientEnhancer:d.remoteReduxClientEnhancer},this.internal={interopAdmin:new b.default},this.Clients={RouterClient:S.default,AuthenticationClient:A.default,WindowClient:E.default,DistributedStoreClient:I.default,LauncherClient:O.default,DragAndDropClient:T.default,LinkerClient:M.default,StorageClient:k.default,WorkspaceClient:D.default,DialogManager:N.default,ConfigClient:j.default,HotkeyClient:R.default,SearchClient:P.default,NotificationClient:W.default,SmartDesktopClient:F.default,Logger:w.default}}getFSBLInfo(e){return new Promise((t=>{a(this,r,"f").onReady((()=>{this.Clients.ConfigClient.getValue({field:"finsemble"},((n,r)=>{const i={FSBLVersion:r.system.FSBLVersion,gitHash:r.system.gitHash};e&&e(i),t(i)}))}))}))}addEventListener(e,t){a(this,r,"f").onReady(t)}shutdownApplication(){S.default.transmit("Application.shutdown",{})}restartApplication(e){S.default.transmit("Application.restart",e||{})}onShutdown(){w.default.deprecated("FSBL.onShutdown(). This has been non-functional for many versions.")}windowClose(){for(const e in this.Clients){const t=this.Clients[e];t.onClose&&t.onClose()}for(const e in g.Globals._FSBLCache.windows)g.Globals._FSBLCache.windows[e].handleWrapRemoveRequest();S.default.disconnectAll()}signalSuccessfulStart(e,t){c.System.isBrowserView()||(S.default.publish(`Finsemble.${e}.componentReady`,{name:e}),v.default.publishBootStatus(t,"components","completed")),w.default.system.log("publishBootStatus",t,"components","completed",U.customData)}startApp(){return new Promise((async e=>{if(B)return console.warn("FSBL.startApp called twice."),e(null);B=!0,await c.System.ready();const{finWindow:t}=await(async e=>{const t=await L.getSystemStartupData(),n=t?.customData?.authenticationToken,r=c.System.Window.getCurrent();return $=r.name,U=L.getManifestFromStartupData(t)??{},z=t?.customData?.component,e.setStartupData({windowName:$,authenticationToken:n}),{finWindow:r}})(a(this,r,"f"));w.default.system.debug(`WINDOW LIFECYCLE:STARTUP: System.ready invoked in ${$}`),console.debug(`WINDOW LIFECYCLE:STARTUP: System.ready invoked in ${$}`);const n=L.getRouterConfig({windowName:$,systemManifest:U});await S.default.start(n),w.default.system.debug(`WINDOW LIFECYCLE:STARTUP: Router is ready in ${$}`),console.debug(`WINDOW LIFECYCLE:STARTUP: Router is ready in ${$}`),S.default.transmit(`${$}.onSpawned`,{name:$},{suppressWarnings:!0});try{const{wrap:e}=await f.FinsembleWindow.getInstance({name:$,uuid:t.uuid});g.Globals.finsembleWindow=e}catch(e){"Cannot Wrap Service Manager or Services"!==e&&w.default.system.error(`Unable to get Finsemble Window Instance for ${$}`,e)}const i=await(async e=>new Promise((t=>{const n=S.default.subscribe(x,((r,i)=>{S.default.unsubscribe(n);const o="authenticated"!==i.data.state&&"ready"!==i.data.state,s=z?.component?.neededClients??(o?["ConfigClient","LauncherClient","DistributedStoreClient","WindowClient","AuthenticationClient","searchClient","storageClient"]:(e=>Object.entries(e.Clients).flatMap((e=>{const[t,n]=e;return n.initialize?[t]:[]})))(e));t(s)}))})))(this);await(async(e,t)=>new Promise((n=>{const r=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1)));for(let t=0;t<r.length;t++){const n=e.Clients[r[t]];n.windowName=$,n.initialize&&n.initialize()}w.default.system.debug("COMPONENT LIFECYCLE:STARTUP:Using the following Finsemble clients for startup:",t),console.log("COMPONENT LIFECYCLE:STARTUP:Using the following Finsemble clients for startup:",t),l.FSBLDependencyManagerSingleton.startup.waitFor({clients:t},(()=>{n()}))})))(this,i),document.getElementsByTagName("html")[0].classList.add("finsemble"),a(this,r,"f").ready(),w.default.start(),w.default.debug(`WINDOW LIFECYCLE:STARTUP: FSBL Online in ${$}`),_.start(U,z.type),this.signalSuccessfulStart($,z.type),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{H(this)})):H(this),window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return w.default.error(e.message,`File: ${e.filename}`,`Line: ${e.lineno}`,`Column: ${e.colno}`,`Error Stack: \n ${t}`),!1})),window.addEventListener("unhandledrejection",(e=>{w.default.error("Unhandled rejection","reason",e.reason)})),e(null)}))}stopApp(){B=!1,this.windowClose()}},r=new WeakMap},7580:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const i=r(n(2551)),o=n(1742),s=n(3998),a={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},u=e=>{if(!e)return i.default.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&o&&r;return i.default.system.debug(`Transport crossDomain=${u} (${n}:${r}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=e?.finsemble,{sameDomainTransport:r="SharedWorker",crossDomainTransport:o="IPCBus"}=n??{},s=u(t)?o:r;return i.default.system.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),console.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),s},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:r})=>n?((e,n)=>{if(i.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const r=e.finsemble,i=r?.router?.transportSettings??r?.IAC??{},o=r?.notificationURL??`${r.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:r.moduleRoot,transportName:t.getRecommendedTransport(e),transportSettings:i,notificationURL:o}}return i.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...a,windowName:n}})(n,e):{...a,windowName:e,transportSettings:r??{}},t.getSystemStartupData=async()=>new Promise((e=>{o.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=e?.manifest;return t?.finsemble&&s.ConfigUtilInstance.resolveConfigVariables(t.finsemble,t.finsemble),t}},7274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.start=void 0;const i=n(1742),o=r(n(2551));t.start=(e,t)=>{"smartDesktopDesigner"!==t&&((e=>{const t=e?.finsemble?.documentRoot;if(t){const e=new URL("./assets/css/theme.css",t),n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href",e.href),document.head.appendChild(n),FSBL.Clients.RouterClient.addListener("Finsemble-ui-change.themeUpdate",((e,t)=>{const n=t?.data;if(n)for(const[e,t]of Object.entries(n))document.documentElement.style.setProperty(e,String(t));else o.default.error("FSBL.entry.ts: Expected CSS for Finsemble-ui-change.themeUpdate but got error",e)}))}else o.default.system.error("Could not find manifest entry: finsemble.documentRoot")})(e),FSBL.Clients.RouterClient.addListener("Finsemble-ui-change.taskbarIconUpdate",(()=>{FSBL.Clients.Logger.system.log("Finsemble-ui-change: dynamic taskbar icon change -- resetting component icon"),FSBL.Clients.ConfigClient.getValue({field:"startup_app"},((e,{applicationIcon:t})=>{e?FSBL.Clients.Logger.system.error(`error updating taskbar icon: ${e}`):i.System.Window.getCurrent().setTaskbarIcon({iconURL:t})}))})))}},6925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const r=n(1298),i=n(6192),o=n(586),s=n(4971);class a{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:r.AnonymousAuthenticationToken,windowName:`Unknown window-${o.v4()}`}}static getInstance(){return a.instance?a.instance:a.instance=s.singleton("Startup",a)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}ready(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()})),i.Globals.dispatchEvent&&i.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=a,a.instance=null},7348:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(7664),u=o(n(9886)),l=s(n(2551)),c=window;t.default=class{constructor(e,t){this.values={},this.listeners=[],this.registeredDispatchListeners=[],this.mapping={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e&&l.default.system.error("DistributedStoreClient",e),!t.data.store)return;t.data.field||(t.data.field=null);const n=this.name+(t.data.field?`.${t.data.field}`:""),r=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(n,r)},this.routerClient=t,this.isGlobal=e.global,this.name=e.store?e.store:"finsemble",e.values&&(this.values=e.values),this.lst=this.listeners,u.initObject(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,this.handleDispatchedMessages.bind(this))}handleDispatchedMessages(e,t){for(let e=0;e<this.registeredDispatchListeners.length;e++)this.registeredDispatchListeners[e](t.data)}setValue(e,t){if(e.field||l.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||l.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};return c.distributedStoreClient.routerClient.query("storeService.setValue",n,(e=>{if(t)return t(e)}))}const n=u.checkForObjectChange(this.values,e.field,this.mapping);return u.setPath(this.values,e.field,e.value),u.mapField(this.values,e.field,this.mapping),n&&this.sendRemovals(n),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t?t(null):null}publishObjectUpdates(e,t){const n=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,u.byString(this.values,e)),e=n[e]}sendRemovals(e){for(let t=0;t<e.length;t++)this.triggerListeners(`${this.name}.${e[t]}`,u.byString(this.values,e[t]))}setValues(e,t){return e?Array.isArray(e)?void a.each(e,((e,t)=>{this.setValue(e,t)}),(e=>t?t(e):null)):l.default.system.error("DistributedStore.setValues:params must be an array"):l.default.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return t?t("no field provided"):"no field provided";if(this.isGlobal)return this.getGlobalValue(e,t);const n=u.byString(this.values,e.field);return void 0!==n?t?t(null,n):n:t?t("couldn't find a value"):null}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return this.getValue(e,t);if(this.isGlobal)return this.getGlobalValues(e,t);const n={};for(let t=0;t<e.length;t++){const r=e[t],i="string"==typeof r?r:r.field,o=u.byString(this.values,i);n[i]=o}return t?t(null,n):n}getGlobalValue(e,t){c.distributedStoreClient.routerClient.query("storeService.getValue",{store:this.name,field:e.field},((e,n)=>e?t(e):t(e,n.data)))}getGlobalValues(e,t){c.distributedStoreClient.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,n)=>e?t(e):t(e,n.data)))}removeValue(e,t){if(!e.field){if(void 0===e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");a.map(e,this.removeValue,((e,n)=>t(e,n)))}destroy(e){const t={store:this.name,global:this.isGlobal};c.distributedStoreClient.removeStore(t,(t=>t?e(t):e(null,!0)))}changeSub(e){this.subs||(this.subs=[]),this.subs[e]||(this.isGlobal&&c.distributedStoreClient.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,n){"function"==typeof e&&(t=e,e={});let{field:r}=e;const i=this.name+(r?`.${r}`:"");return this.listeners[i]?this.listeners[i].push(t):this.listeners[i]=[t],this.changeSub(i),n?n():null}addListeners(e,t,n){if(!Array.isArray(e))return this.addListener(e,t,n);for(let n=0;n<e.length;n++){let i=null;const o=e[n];var r;"string"==typeof o?i=o:o.field&&(({field:i}=o),r=e[n].listener);const s=this.name+(i?`.${i}`:"");r||t&&"function"==typeof t&&(r=t),this.listeners[s]?this.listeners[s].push(r):this.listeners[s]=[r],this.changeSub(s)}return n?n():null}removeListener(e,t,n){"function"==typeof e&&(n=t,t=e,e={});let{field:r}=e;const i=this.name+(r?`.${r}`:"");if(this.listeners[i])for(let e=0;e<this.listeners[i].length;e++)if(this.listeners[i][e]===t)return this.listeners[i].splice(e,1),n?n(null,!0):null;return n?n(null,!1):null}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&this.removeListener(e,t,n),n("missing fields");let r=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var i;"string"==typeof s?o=s:s.field&&(({field:o}=s),i=e[n].listener);const a=this.name+(o?`.${o}`:"");if(!i){if(!t||"function"!=typeof t)continue;i=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===i&&(this.listeners[a].splice(e,1),r++)}return r<e.length?n("All listeners could not be found",!1):n?n(null,!0):null}triggerListeners(e,t){if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?(l.default.system.debug("DistributedStore.triggerListeners",e,t),this.listeners[e][n](null,{field:e,value:t})):l.default.system.warn("DistributedStoreClient:triggerListeners: listener is not a function",e,n,this.listeners[e][n])}}},710:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationClient=void 0;const i=r(n(3712)),o=n(2669),s=n(5688),a=n(4232);class u extends o._BaseClient{constructor(e){super(e),this.publishAuthorization=(e,t)=>{i.default.args(e,"string",t,"object"),this.routerClient.transmit("AuthenticationService.authorization",{user:e,credentials:t})},this.getCurrentCredentials=e=>{this.routerClient.query("authentication.currentCredentials",null,((t,n)=>{const r=t?null:n.data;e(t,r)}))},this.transmitSignOnToAuthService=e=>{i.default.args(e,"object"),this.logger.system.debug("AUTHORIZATION: Transmitting SignOn To AuthService"),this.routerClient.transmit("authentication.dialogSignOnToAuthService",e)},this.appSignOn=(e,t,n)=>{this.logger.system.debug(`AUTHORIZATION: Signing on to app ${e}`),i.default.args(e,"string",t,"object",n,"function"),this.routerClient.query("authentication.appSignOn",{signOnKey:e,params:t},{timeout:-1},((e,t)=>{n&&n(e,t.data)}))},this.appRejectAndRetrySignOn=(e,t,n)=>{this.logger.system.warn("AUTHORIZATION: appRejectAndRetrySignOn",e),i.default.args(e,"string",t,"object",n,"function"),this.routerClient.query("authentication.appRejectAndRetrySignOn",{signOnKey:e,params:t},{timeout:-1},((e,t)=>{n&&n(e,t.data)}))},this.appAcceptSignOn=e=>{this.logger.system.info("AUTHORIZATION: Accepted application sign on.",e),i.default.args(e,"string"),this.routerClient.transmit("authentication.appAcceptSignOn",{signOnKey:e})},this.appRejectSignOn=e=>{this.logger.system.error("AUTHORIZATION: Rejected application sign on.",e),i.default.args(e,"string"),this.routerClient.transmit("authentication.appRejectSignOn",{signOnKey:e})},this.completeOAUTH=(e,t,n)=>{if(this.logger.system.log("completeOAUTH",t),i.default.args(t,"object="),!t){t={};const e=new URLSearchParams(window.location.search);for(const n of e.entries())t[n[0]]=n[1]}const r=()=>{this.routerClient.query("authentication.completeOAUTH",{err:e,params:t},((e,t)=>{let{data:r}=t;n?.(e,r)}))};t.state?r():this.isInAService?this.logger.system.error("OAUTH Error. This functionality is not yet available in services."):this.finsembleWindow.getOptions(((e,n)=>{t.state=n.customData.OAuthState,r()}))},this.start=e=>{if(a.iAmAServiceWindow())return this.isInAService=!0,void(e&&e());s.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{"Cannot Wrap Service Manager or Services"===t?this.isInAService=!0:this.finsembleWindow=n,e&&e()}))},this.beginAuthentication=this.beginAuthentication.bind(this)}beginAuthentication(e,t){this.routerClient.query("authentication.beginAuthentication",e,((e,n)=>{t(e,n.data)}))}}t.AuthenticationClient=u;var l=new u({onReady:e=>{l.start(e)},name:"authenticationClient"});t.default=l},2669:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const i=r(n(9319)),o=r(n(2551)),s=n(1742),a=n(3854);t._BaseClient=class{constructor(e){this.status="offline",this.startupTime=0,this.initialized=!1,this.startupDependencies={services:[],clients:[]},this.finsembleWindow=null,this.windowName="",this.clientReadyQueue=[],this.processClientReadyQueue=()=>{for(const e of this.clientReadyQueue)e();this.clientReadyQueue=[]},this.onReady=e=>{this.clientReadyQueue.push(e),"online"===this.status&&this.processClientReadyQueue()},this.setClientOnline=()=>{this.status="online";const e=`STARTUP:CLIENT ONLINE:${this.finWindow?.name}:${this.name}`;this.startupTime=window.performance.now()-this.startupTime;const t=()=>{this.logger.system.debug(e),this.processClientReadyQueue(),a.FSBLDependencyManagerSingleton.setClientOnline(this.name)};this._onReady?this._onReady(t):t()},this.initialize=(e=Function.prototype)=>{this.initialized||(this.initialized=!0,this.startupTime=performance.now(),this.finWindow=s.System.Window.getCurrent(),this.windowName=this.finWindow.name,this.logger.system.debug("Baseclient Init Router Ready",this.name),a.FSBLDependencyManagerSingleton.startup.waitFor(this.startupDependencies,(()=>{e(),this.setClientOnline()})))},this.onClose=e=>{e&&e()},this.name=e.name,this._onReady=e.onReady,this.startupDependencies=e.startupDependencies||{services:[],clients:[]},this.logger=o.default,this.routerClient=i.default}}},10:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(3712)),s=n(2669),a=r(n(5020)),u=r(n(2551));class l extends s._BaseClient{constructor(e){super(e),this.listeners=[],this.changeSub=e=>{this.subs||(this.subs={}),this.subs[e]||(this.routerClient.query("configService.addListener",e,(t=>{t&&u.default.system.error("Error adding listener to config service",t),this.routerClient.subscribe(e,this.handleChanges)})),this.subs[e]=!0)},this.handleChanges=(e,t)=>{e&&u.default.system.error(e),t.data.field||(t.data.field=null);const n=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(t.data.field?t.data.field:"configService",n)},this.triggerListeners=(e,t)=>{if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?this.listeners[e][n](null,{field:e,value:t}):u.default.system.warn("ConfigClient:triggerListeners: listener is not a function",e)},this.set=(e,t)=>{u.default.system.debug("ConfigClient.Set",e),"function"==typeof e?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.set",e,((e,n)=>{t(e,n?n.data:null)}))},this.processAndSet=this.processAndSet.bind(this),this.getValue=this.getValue.bind(this),this.getValues=this.getValues.bind(this),this.setValue=this.setValue.bind(this),this.setValues=this.setValues.bind(this),this.removeValue=this.removeValue.bind(this),this.removeValues=this.removeValues.bind(this),this.addListener=this.addListener.bind(this),this.addListeners=this.addListeners.bind(this),this.removeListener=this.removeListener.bind(this),this.removeListeners=this.removeListeners.bind(this),this.setPreference=this.setPreference.bind(this),this.getPreferences=this.getPreferences.bind(this),this.unsetPreference=this.unsetPreference.bind(this)}getValue(e,t=Function.prototype){return"string"==typeof e&&(e={field:e}),new Promise(((n,r)=>{if(!e.field){const e="no field provided";return r(e),t(e)}this.routerClient.query("configService.getValue",{field:e.field},((e,i)=>e?(r(e),t(e)):(n({err:e,data:i.data}),t(e,i.data))))}))}getValues(e,t=Function.prototype){return"function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e)?this.getValue(e,t):new Promise((n=>{this.routerClient.query("configService.getValues",{fields:e},((e,r)=>e?t(e):(n({err:e,data:r.data}),t(e,r.data))))}))}setValue(e,t){const n={field:e.field,value:e.value};return this.routerClient.query("configService.setValue",n,(e=>t?t(e):null))}setValues(e,t){return e?Array.isArray(e)?this.routerClient.query("configService.setValues",e,(e=>t?t(e):null)):u.default.system.error("ConfigClient.SetValues. Params must be an array"):u.default.system.error("ConfigClient.SetValues. No params given")}removeValue(e,t=Function.prototype){if(void 0!==e){if(e.field||"string"!=typeof e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t=Function.prototype){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");i.map(e,this.removeValue,((e,n)=>t(e,n)))}addListener(e,t,n){let r=null;"function"==typeof e&&(t=e,e={field:r}),({field:r}=e);const i="configService"+(r?`.${r}`:"");return this.listeners[i]?this.listeners[i].push(t):this.listeners[i]=[t],this.changeSub(i),n?n():null}addListeners(e,t,n){if(!Array.isArray(e))return this.addListener({field:e.field},t,n);for(let n=0;n<e.length;n++){let i=null;const o=e[n];var r;"string"==typeof o?i=o:o.field&&(({field:i}=o),r=o.listener);const s="configService"+(i?`.${i}`:"");r||t&&"function"==typeof t&&(r=t),this.listeners[s]?this.listeners[s].push(r):this.listeners[s]=[r],this.changeSub(s)}return n?n():null}removeListener(e,t,n){let r=null;"function"==typeof e&&(n=t,t=e,e={field:r}),({field:r}=e);const i=this.name+(r?`.${r}`:"");if(this.listeners[i])for(let e=0;e<this.listeners[i].length;e++)if(this.listeners[i][e]===t)return this.listeners[i].pop(e),n?n(null,!0):null;return n?n(null,!1):null}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&this.removeListener(e,t,n),n?.("missing fields");let r=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var i;"string"==typeof s?o=s:s.field&&(({field:o}=s),i=e[n].listener);const a="configService"+(o?`.${o}`:"");if(!i){if(!t||"function"!=typeof t)continue;i=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===i&&(this.listeners[a].pop(n),r++)}return r<e.length?n?.("All listeners could not be found",!1):n?n(null,!0):null}get(e,t){u.default.system.debug("ConfigClient.Get",e),u.default.system.deprecated("This functionality has been deprecated. It will be removed in a future Finsemble release. Use getValue instead.",e),1===arguments.length?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.get",e,((e,n)=>{t(e,n?n.data:null)}))}processAndSet(e,t){if(u.default.system.debug("ConfigClient.processAndSet",e),o.default.args(e,"object",t,"function=")&&o.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";u.default.system.warn("ConfigClient.processAndSet:",e),t&&t(e,null)}else this.routerClient.query("config.processAndSet",e,((e,n)=>{t&&t(e,n?n.data:null)}))}setPreference(e,t){this.routerClient.query("PreferencesService.setPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}async getPreferences(e){await a.default.waitForStartup("preferencesService"),this.routerClient.query("PreferencesService.getPreferences",{},((t,n)=>{u.default.system.debug("ConfigClient.getPreferences response",n),e&&e(t,n?n.data:null)}))}async unsetPreference(e,t){u.default.system.debug("ConfigClient.unsetPreference",e),this.routerClient.query("PreferencesService.unsetPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}}const c=new l({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=c},7346:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(9562)),s=r(n(5376)),a=r(n(3190)),u=r(n(3712)),l=n(2669),c=n(5688),d=r(n(2551)),f=n(1742),p=n(4232);s.default.initialize(),o.default.initialize(),a.default.initialize();class h extends l._BaseClient{constructor(e){super(e),this.getParametersFromInDialog=()=>{const{inputParams:e}=s.default.getSpawnData();return d.default.system.debug(`DialogManagerClient:getParametersFromInDialog: ${JSON.stringify(e)}`),e},this.respondAndExitFromInDialog=e=>{u.default.args(e,"any"),d.default.system.debug(`DialogManagerClient:respondAndExitFromInDialog: ${JSON.stringify(e)}`);const{responseChannel:t}=s.default.getSpawnData();this.routerClient.transmit(t,e)},this.getAvailableDialog=(e,t)=>{this.DialogStore.getValue("dialogs.available",((n,r)=>{for(const n in r){const i=r[n];if(i.componentType===e)return t(i)}t(null)}))},this.generateDialogReadyChannel=e=>`Dialog.${e.windowName+e.uuid}.ready`,this.showDialog=()=>{const e=this.generateDialogReadyChannel(o.default.myWindowIdentifier);this.routerClient.transmit(e,{userInputTimeout:void 0===this.userInputTimeout?1e4:this.userInputTimeout})},this.sendQueryToDialog=(e,t,n)=>{function r(t){console.warn(`No response from dialog ${e.windowName} after ${t/1e3} seconds. Check to make sure your dialog is sending back data.`)}this.moveDialogFromAvailableToOpened(e);const i=`Dialog.${e.windowName+e.uuid}.Show`,s=this.generateDialogReadyChannel(e);let a;const u=(n,i)=>{a=setTimeout(r.bind(null,i.data.userInputTimeout),i.data.userInputTimeout),d.default.perf.info("DialogManagerClient:sendQueryToDialog:Dialog: ShowWindow Start"),o.default.showWindow(e,{monitor:t.monitor||"mine",left:"center",top:"center"},((e,t)=>{c.FinsembleWindow.getInstance({name:t.finWindow.name},((e,t)=>{t.bringToFront(),t.focus()})),d.default.perf.info("DialogManagerClient:sendQueryToDialog:ShowWindow finish")})),this.routerClient.removeListener(s,u)};this.routerClient.addListener(s,u),d.default.perf.info("DialogManagerClient:sendQueryToDialog ShowWindow Query begin."),this.routerClient.query(i,t,((t,r)=>{clearTimeout(a),this.moveDialogFromOpenedToAvailable(e),n(t,r.data)}))},this.moveDialogFromOpenedToAvailable=e=>{this.DialogStore.getValue("dialogs",((t,n)=>{const r=n.opened,i=n.available;delete r[e.windowName],i[e.windowName]=e,this.DialogStore.setValue({field:"dialogs.opened",value:r}),this.DialogStore.setValue({field:"dialogs.available",value:i})}))},this.moveDialogFromAvailableToOpened=e=>{this.DialogStore.getValue("dialogs",((t,n)=>{const r=n.available,i=n.opened;delete r[e.windowName],i[e.windowName]=e,this.DialogStore.setValue({field:"dialogs.available",value:r}),this.DialogStore.setValue({field:"dialogs.opened",value:i})}))},this.registerModal=()=>{this.isModal&&(f.System.getMonitorInfo((e=>{const t=e.virtualScreen;t.width=t.right-t.left,t.height=t.bottom-t.top,this.finsembleWindow.setBounds({bounds:t})})),this.DialogStore.setValue({field:"modalIdentifier",value:o.default.myWindowIdentifier}))},this.showModal=e=>{this.DialogStore.getValue("modalIdentifier",(async(t,n)=>{if(null==n)return;const{wrap:r}=await c.FinsembleWindow.getInstance({uuid:n.uuid,name:n.windowName});r.updateOptions({options:{opacity:.4}},(()=>{r.show((()=>{r.bringToFront((()=>{this.finsembleWindow.focus((()=>{this.finsembleWindow.bringToFront(),e&&"function"==typeof e&&e()}))}))}))}))}))},this.open=(e,t,n)=>{this.getAvailableDialog(e,(r=>{r?this.sendQueryToDialog(r,t,n):o.default.spawn(e,{options:{customData:{foreign:{clients:{dialogManager:{isDialog:!0}}}}}},(()=>{this.open(e,t,n)}))}))},this.DialogStore=null,this.isDialog=!1,this.isModal=!1,this.RESPONDER_CHANNEL=null,this.openerMessage=null,this.registerDialogCallback=e=>{this.routerClient.addResponder(this.RESPONDER_CHANNEL,((t,n)=>{this.openerMessage=n,e(t,n)}))},this.hideModal=()=>{this.DialogStore.getValue("modalIdentifier",(async(e,t)=>{if(null==t)return;const{wrap:n}=await c.FinsembleWindow.getInstance({uuid:t.uuid,name:t.windowName});n.hide()}))},this.respondToOpener=e=>{d.default.system.info("DialogManagerClient:RespondToOpener:",e),this.openerMessage.sendQueryResponse(null,e),!1!==e.hideModalOnClose&&this.hideModal(),this.finsembleWindow.hide(),this.openerMessage=null},this.registerWithStore=e=>{if(this.isDialog){const t=o.default.myWindowIdentifier;this.RESPONDER_CHANNEL=`Dialog.${t.windowName+t.uuid}.Show`,this.DialogStore.setValue({field:`dialogs.available.${t.windowName}`,value:t},e)}else e()},this.checkIfWindowIsDialog=e=>{let t=null;try{this.isDialog=s.default?.options?.customData?.foreign?.clients?.dialogManager?.isDialog}catch(e){t=e}e&&e(t)},this.createStore=e=>{a.default.createStore({store:"DialogStore",values:{dialogs:{opened:{},available:{}}},global:!0},((t,n)=>{this.DialogStore=n,e()}))},this.getFinsembleWindow=e=>{if(!this.isDialog)return e();c.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{this.finsembleWindow=n,e()}))},this.spawnDialog=this.spawnDialog.bind(this)}spawnDialog(e,t,n,r){u.default.args(e,"object",t,"object",n,"function");const i=p.getRandomWindowName("DialogChannel");e.data={inputParams:t,responseChannel:i},e.left||0===e.left||e.right||0===e.right||(e.left="center"),e.top||0===e.top||e.bottom||0===e.bottom||(e.top="center"),this.routerClient.addListener(i,((e,t)=>{n(e,t.data),this.routerClient.removeListener(i,r)})),o.default.spawn("dialogTemplate",e,((e,t)=>{e&&(d.default.system.error("ERROR",e),n(e,t)),r&&r(e,t)}))}}var g=new h({startupDependencies:{clients:["distributedStoreClient","windowClient"]},onReady(e){g.checkIfWindowIsDialog(),i.series([g.createStore.bind(g),g.registerWithStore.bind(g),g.getFinsembleWindow.bind(g),e=>{o.default.onReady(e)},e=>{s.default.onReady(e)}],e)},name:"dialogManager"});t.default=g},3190:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(2669),o=r(n(7348));let s;const a=window;let u;const l={};function c(e,t){return u.routerClient.query("storeService.getStore",e,(function(e,n){return e?t(e):t(e,new s(n.data,u.routerClient))}))}function d(e,t){u.routerClient.query("storeService.removeStore",e,((e,n)=>t(e,!e&&n.data)))}class f extends i._BaseClient{constructor(e){super(e),this.load=function(e){e()},u=this,this.ls=l}getStore(e,t){return e.global?c(e,t):e.store&&l[e.store]?t(null,l[e.store]):c(e,t)}createStore(e,t=Function.prototype){let n=new Promise(((n,r)=>{if(e.global)return this.routerClient.query("storeService.createStore",e,((e,i)=>{if(e)return r(e),t(e);const o=new s(i.data,u.routerClient);return n({err:e,data:o}),t(e,o)}));if(l[e.store])return n({err:null,data:l[e.store]}),t(null,l[e.store]);const i=new s(e,u.routerClient);return l[i.name]=i,n({err:null,data:i}),t(null,i)}));return n.catch((e=>{console.log(e)})),n}removeStore(e,t){return e.global?d(e,t):l[e.store]?(delete l[e.store],t(null,!0)):void d(e,t)}}var p=new f({startupDependencies:{},onReady(e){s=o.default,p.load(e)},name:"distributedStoreClient"});a.distributedStoreClient=p,t.default=p},9499:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(2551)),s=r(n(3712)),a=n(2669),u=r(n(8970)),l=r(n(9562)),c=r(n(5376)),d=r(n(3190)),f=n(5688),p=n(6420),h=n(1742),g=n(2380),m=n(1639).Z,y=n(5090).Z,v="DragAndDropClient.prepareDrag",w="DragAndDropClient.dragStart",b="DragAndDropClient.dragEnd",S={DROP:"drop",SPAWN:"spawn",LINKER:"linker"};class C extends a._BaseClient{constructor(e){super(e),s.default.args(e,"object=")&&e&&s.default.args2("params.onReady",e.onReady,"function="),this.emitters={},this.sourceData=[],this.receivers={},this.receiveResponder=!1,this.linkerListener=!1,this.openLinkerDataByDefault=!0,this.SHARE_METHOD=S,this.bindAllFunctions()}bindAllFunctions(){const e=this;for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){const n=e[t];n instanceof Function&&n!==C&&(e[t]=e[t].bind(e))}}setEmitters(e){if(!Array.isArray(e.emitters))return;const t=this;e.emitters.forEach((e=>{t.emitters[e.type]=e})),this.routerClient.publish(`${this.windowName}Finsemble.Sharer`,{emitterEnabled:!!Object.keys(t.emitters).length,receiverEnabled:!!Object.keys(t.receivers).length}),this.receiveResponder||(this.routerClient.addResponder(`${this.windowName}.Share`,((e,n)=>{t.emit.call(t,e,n)})),this.receiveResponder=!0)}addReceivers(e){if(!Array.isArray(e.receivers))return;const t=this;e.receivers.forEach((e=>{const n=e.type.toString();t.receivers[n]?t.receivers[n].push(e):t.receivers[n]=[e]})),this.routerClient.publish(`${this.windowName}Finsemble.Sharer`,{emitterEnabled:!!Object.keys(t.emitters).length,receiverEnabled:!!Object.keys(t.receivers).length});const n=c.default.getSpawnData();n&&n.sharedData&&c.default.getComponentState({field:"Finsemble.DealtWithSpawnSharedData"},((e,r)=>{r||c.default.setComponentState({field:"Finsemble.DealtWithSpawnSharedData",value:"done"},(()=>{t.handleSharedData(n.sharedData,S.SPAWN)}))})),!this.linkerListener&&this.openLinkerDataByDefault&&(u.default.subscribe("Finsemble.DragAndDropClient",((e,n)=>{n.originatedHere()||Object.keys(e).forEach((n=>{if(t.canReceiveData(n)){const r={};r[n]=e[n],t.handleSharedData(r,S.LINKER)}}))})),this.linkerListener=!0)}updateReceivers(e){if(!Array.isArray(e.receivers))return;const t=this;e.receivers.forEach((e=>{const n=e.type.toString();t.receivers[n]||(t.receivers[n]=[]);const r=t.receivers[n];for(let t=0;t<r.length;t++)r[t].handler===e.oldHandler&&(r[t].handler=e.handler);t.receivers[n].push(e.handler)})),t.linkerListener||(u.default.subscribe("Finsemble.DragAndDropClient",((e,n)=>{n.originatedHere()||t.handleSharedData(e,S.LINKER)})),t.linkerListener=!0)}removeReceivers(e){if(!Array.isArray(e.receivers))return;const t=this;e.receivers.forEach((e=>{const n=e.type.toString();if(!t.receivers[n])return;const r=t.receivers[n];for(let t=0;t<r.length;t++)if(r[t].handler===e.handler){r.splice(t,1);break}}))}dragStart(e){const t={FSBL:!0,window:this.windowName};this.routerClient.transmit(v,Object.keys(this.emitters)),e.dataTransfer.setData("text/plain",JSON.stringify(t))}dragStartWithData(e,t){this.routerClient.transmit(w,Object.keys(t));const n={FSBL:!0,containsData:!0,window:this.windowName,data:t};e.dataTransfer.setData("text/plain",JSON.stringify(n))}handleSharedData(e,t){const n=this;Object.keys(n.receivers).forEach((r=>{const i=n.receivers[r],s={};Object.keys(e).forEach((t=>{o.default.system.info("DragAndDropClient:handleSharedData:Data value:",t),i[0].type instanceof RegExp?t.match(i.type)&&(s[t]=e[t]):i[0].type==t&&(s[t]=e[t])})),Object.keys(s).length&&i.forEach((e=>{e.handler(null,{data:s,shareMethod:t})}))}))}drop(e){const t=this;e.dataTransfer||(e.dataTransfer=e.originalEvent.dataTransfer);let n=e.dataTransfer.getData("text/plain");if(n){try{n=JSON.parse(n)}catch(e){return}if(n.FSBL)if(e.preventDefault(),e.stopPropagation(),n.containsData)t.handleSharedData(n.data,S.DROP);else{const e=n.window,r=this.sourceData,i=[];for(let e=0;e<r.length;e++){const n=r[e];t.canReceiveData(n)&&i.push(n)}t.routerClient.query(`${e}.Share`,i,((e,n)=>{t.handleSharedData(n.data,S.DROP)}))}}}emit(e,t){const n={},r=this;i.each(t.data,((e,t)=>{const i=r.emitters[e];i.data&&"function"==typeof i.data?(n[e]=i.data(),t()):(n[e]=i.data,t())}),(()=>{t.sendQueryResponse(null,n)}))}getComponentsThatCanReceiveType(e,t){o.default.deprecated("DragAndDropClient.getComponentsThatCanReceiveType has been deprecated. Use LauncherClient.getComponentsThatCanReceiveDataTypes instead."),l.default.getComponentsThatCanReceiveDataTypes({dataTypes:[e]},((n,r)=>{t(n,r&&r[e]?r[e].componentTypes:[])}))}openSharedData(e,t){p.openSharedData(e,t)}addWindowHighlight(e){const t=document.createElement("div");t.id="fsbl-share-scrim",t.className="fsbl-share-scrim";const n=document.createElement("style");n.innerHTML=g;const r=document.createElement("img");e?(r.src=m,r.className="ff-share",document.addEventListener("dragover",this.dragover),document.addEventListener("drop",this.drop)):(t.className="fsbl-share-scrim no",r.src=y,r.className="ff-delete-circle"),t.appendChild(n),t.appendChild(r),document.body.appendChild(t),this.finsembleWindow.updateOptions({options:{opacity:1}})}removeWindowHighlight(){const e=document.getElementById("fsbl-share-scrim");e&&e?.parentNode?.removeChild(e),document.removeEventListener("dragover",this.dragover),document.removeEventListener("drop",this.drop),this.finsembleWindow.updateOptions({options:{opacity:1}})}canReceiveData(e,t=null){Array.isArray(e)||(e=[e]);const n=this;let r=!1;t||(t=Object.keys(n.receivers),r=!0);for(let i=0;i<e.length;i++){const o=e[i];for(let e=0;e<t.length;e++){if(!r){if(o===t[e])return!0;continue}let i=n.receivers[t[e]];if(i.length)if(i=i[0],i.type instanceof RegExp){if(o.match(i.type))return!0}else if(o===i.type)return!0}}return!1}dragover(e){return e.preventDefault(),!1}addListeners(e){const t=this;window.addEventListener("dragend",(()=>{t.routerClient.transmit(b,{})})),this.routerClient.addListener(v,((e,t)=>{t.originatedHere()&&(h.System.isBrowserView()?this.routerClient.transmit(w,Object.keys(this.emitters)):h.System.hasBrowserView()||this.routerClient.transmit(w,t.data))})),this.routerClient.addListener(w,((e,n)=>{this.sourceData=n.data,!t.canReceiveData(this.sourceData)||n.originatedHere()?t.addWindowHighlight(!1):t.addWindowHighlight(!0)})),this.routerClient.addListener(b,(()=>{t.removeWindowHighlight()})),e(),d.default.createStore({store:"Finsemble-Share",global:!0},((e,n)=>{t.store=n}))}getFinsembleWindow(e){f.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{this.finsembleWindow=n,e()}))}}var _=new C({startupDependencies:{clients:["windowClient","distributedStoreClient"]},onReady(e=Function.prototype){i.parallel([e=>{_.addListeners(e)},e=>{u.default.onReady(e)},e=>{l.default.onReady(e)},e=>{_.getFinsembleWindow(e)}],((t,n)=>e(t,n)))},name:"dragAndDropClient"});t.default=_},8718:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(5939),o=n(2669),s=r(n(9319)),a=r(n(2551)),u=n(7063).F,l=window,c=new i.EventEmitter;function d(e,t=u){const n=[];return e.keys.forEach((e=>{if("string"!=typeof e)return a.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const r=t[e];if(!r)return a.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);n.push(r)})),n}const f=function(e){this.cb=e,this.shift=!1,this.ctrl=!1,this.cmd=!1,this.capsLock=!1,this.initialize()};f.prototype.keyup=function(e){switch(e.key){case"Shift":return this.shift=!1,void this.cb({key:e.key,e,keystroke:this});case"Control":case"Alt":return this.ctrl=!1,void this.cb({key:e.key,e,keystroke:this});case"Meta":case"Win":return this.cmd=!1,void this.cb({key:e.key,e,keystroke:this})}this.key&&this.cb({key:this.key,e,keystroke:this})},f.prototype.keydown=function(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.cb({key:e.key,e,keystroke:this})}},f.prototype.keypress=function(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)},f.prototype.initialize=function(){const e=this;document.addEventListener("keyup",(t=>{e.keyup(t)})),document.addEventListener("keydown",(t=>{e.downValue=t.key,e.keydown(t)})),document.addEventListener("keypress",(t=>{e.keypress(t)})),window.addEventListener("blur",(t=>{e.ctrl=!1,e.cb({key:"Control",e:t,keystroke:e})}))};const p=[];class h extends o._BaseClient{constructor(e){super(e),this.onClose=e=>{this.removeAllHotkeys(e)},this.keyMap=u,this.listenForHotkeys=this.listenForHotkeys.bind(this),this.routerClient=s.default,this.localListeners={}}addLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addLocalHotkey"),a.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e);const r=d({keys:e}).sort().toString(),i=()=>{document.hasFocus()&&t()};this.localListeners[r]||(this.localListeners[r]={}),this.localListeners[r][t]=i,c.addListener(r,i),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}addBrowserHotkey(e,t){this.KeyStroke||(this.KeyStroke=new f((e=>{const{key:t,keystroke:n}=e,r=[t];n.ctrl&&r.push("control"),n.shift&&r.push("shift"),n.alt&&r.push("alt"),n.cmd&&r.push("command");const i=r.sort().toString();p.forEach((e=>{const t=e.keyString.toUpperCase(),n=i.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))})));const n=d({keys:e}).sort().toString();p.push({keyString:n,handler:t})}removeLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeLocalHotkey"),a.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e);const r=d({keys:e}).sort().toString(),i=this.localListeners[r][t];c.removeListener(r,i),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}addGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addGlobalHotkey"),a.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const r=d({keys:e}).sort().join("+");c.addListener(r,t),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}removeGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeGlobalHotkey"),a.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const r=d({keys:e}).sort().join("+");c.removeListener(r,t),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}listenForHotkeys(){const e=this;this.routerClient.addListener("HotkeyTriggered",((t,n)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):n.data.windows.includes(e.windowName)&&c.emit(n.data.keys)}))}removeAllHotkeys(e){c.removeAllListeners(),this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName},e)}}const g=new h({onReady(e){g.listenForHotkeys(),e&&e()},name:"hotkeyClient"});l.Keystroke=f,t.default=g},9562:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(2669),u=s(n(5376)),l=o(n(6420)),c=s(n(3712)),d=n(1742),f=s(n(2551)),p=n(5688),h=window,g={};class m extends a._BaseClient{constructor(e){super(e),c.default.args(e,"object=")&&e&&c.default.args2("params.onReady",e.onReady,"function="),this.windowClient=e.clients.windowClient}getComponentList(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.componentList",{},((n,r)=>{e(n,r.data),t({err:n,data:r.data})}))}))}getComponentDefaultConfig(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.componentList",{},((r,i)=>{const o=i.data[e];t(r,o),n({err:r,data:o})}))}))}getMonitorInfo(e={},t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfo"),"all"===e.monitor?n.getMonitorInfoAll(t):new Promise((r=>{l.getMyWindowIdentifier((i=>{e.windowIdentifier||(e.windowIdentifier=i),n.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data),f.default.system.log("MONITOR: launcherClient.getMonitorInfo query response data",n.data),r({err:e,data:n.data})}))}))}))}getMonitorInfoAll(e=Function.prototype){return c.default.args(e,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfoAll"),new Promise(((t,n)=>{this.routerClient.query("Launcher.getMonitorInfoAll",{},((r,i)=>{r&&(n({err:r}),e(r)),t({err:r,data:i.data}),e(r,i.data)}))}))}registerComponent(e,t=Function.prototype){return new Promise((n=>{this.routerClient.query("LauncherService.registerComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))}))}unRegisterComponent(e,t=Function.prototype){return e.componentType?new Promise((n=>{this.routerClient.query("LauncherService.unRegisterComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))})):t("No componentType provided")}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,t,n){const r=this;let i=this.locatorToIdentifier(t),o=`${i.windowName}:${i.uuid}`;i.windowName||(o=i.componentType),!1!==g[o]?(n.position||(n.position="absolute"),this.showWindow(t,n,(function(t,n){if(!n)return;const{finWindow:i}=n;var s=function(){g[o]=!0,r.windowClient.isMouseOverDOMElement(e,(e=>{g[o]=!e})),i.removeEventListener("blurred",s)};i.addEventListener("blurred",s)}))):g[o]=!0}showWindow(e,t,n=Function.prototype){c.default.args(e,"object",t,"object=",n,"function=");const r=this;return t||(t={}),(t=l.clone(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e),new Promise((e=>{l.getMyWindowIdentifier((i=>{t.relativeWindow||(t.relativeWindow=i),r.routerClient.query("Launcher.showWindow",t,(async(t,r)=>{if(t)return e({err:t}),n(t);const i=r.data.windowIdentifier;r.data.windowIdentifier.name=r.data.windowIdentifier.windowName;const{wrap:o}=await p.FinsembleWindow.getInstance({name:i.windowName});r.data.finWindow=o,e({err:t,data:r.data}),n(t,r.data)}))}))}))}spawn(e,t,n=Function.prototype){const r=this;return c.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=l.clone(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),f.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`),new Promise((i=>{l.getMyWindowIdentifier((o=>{t.launchingWindow=o,r.callSpawn(t,((t,r)=>{f.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,t),i({err:t,response:r}),n(t,r)}))}))}))}callSpawn(e,t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.perf.debug("CallSpawn","start","from spawn to callback",e),new Promise((r=>{function i(e,n){t(e,n),r({err:e,data:n})}n.routerClient.query("Launcher.spawn",e,(async(e,t)=>{if(f.default.system.debug("CallSpawn","Initial launcher callback params",e,t),f.default.perf.debug("CallSpawn","Initial launcher callback",t),e)return i(e,t.data),f.default.system.error("LauncherClient.callSpawn",e);t.data.windowIdentifier.name=t.data.windowIdentifier.windowName;var r=t.data;if(r.windowDescriptor.native)return i(e,r);const o=r.windowIdentifier,{wrap:s}=await p.FinsembleWindow.getInstance({name:o.windowName});r.finWindow=s;const a=`Finsemble.${r.windowIdentifier.windowName}.componentReady`,u=n.routerClient.subscribe(a,((t,o)=>{if(t)return f.default.system.error(t);o&&0===Object.keys(o.data).length||(f.default.perf.debug("CallSpawn","stop"),i(e,r),n.routerClient.unsubscribe(u))}))}))}))}getMonitor(e,t=Function.prototype){return f.default.system.deprecated("This method is deprecated and will be removed in a future release. Method getMonitorInfo should be used instead."),c.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}getMyWindowIdentifier(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{l.getMyWindowIdentifier((n=>{e(n),t(n)}))}))}getActiveDescriptors(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.getActiveDescriptors",{},((n,r)=>{n&&f.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}getActiveAndPendingWindowNames(e=Function.prototype){return new Promise((t=>{this.routerClient.query("Launcher.getActiveAndPendingWindowNames",{},((n,r)=>{n&&f.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}async getPendingWindows(){const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return e&&f.default.system.error("Error retrieving pending windows:",e),{err:e,data:t.data}}addUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}removeUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}bringWindowsToFront(e={},t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}hyperFocus(e,t=Function.prototype){return f.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.windowList||e.groupName||e.componentType||(e.windowList=[this.myWindowIdentifier]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.hyperFocus",e),t(),Promise.resolve()}minimizeWindows(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.minimizeWindows",e),t(),Promise.resolve()}createWindowGroup(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),c.default.args(e.groupName,"string"),new Promise((n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}this.routerClient.query("LauncherService.createWindowGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}addWindowsToGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),c.default.args(e.groupName,"string"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}getGroupsForWindow(e,t=Function.prototype){return c.default.args(t,"function="),"function"==typeof e&&(t=e,e=null),new Promise((n=>{e&&e.windowIdentifier?this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,r)=>{n({err:e,data:r.data}),t(e,r.data)})):this.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}addToGroups(e,t=Function.prototype){return c.default.args(t,"function="),c.default.args(e.groupNames,"array"),e.windowIdentifier||(e.windowIdentifier=this.myWindowIdentifier),new Promise((n=>{this.routerClient.query("LauncherService.addWindowToGroups",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){const t=this;if(void 0!==h.FSBL){function n(){t.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${t.windowName}`,((e,n)=>{Array.isArray(n.data)&&t.windowClient.setComponentState({field:"finsemble:windowGroups",value:n.data})}))}h.FSBL.addEventListener("onReady",(()=>{t.windowClient.onReady((()=>{t.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{if(!e&&r)return t.addToGroups({groupNames:r},n);n()}))}))}))}setInterval((()=>{t.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName,componentType:"finsemble",isBrowserView:d.System.isBrowserView()})}),1e3),this.getMyWindowIdentifier((n=>{t.myWindowIdentifier=n,e&&e()}))}}let y;function v(e){return(e=e||{}).windowClient||(e.windowClient=u.default),new m({clients:e,onReady(e){f.default.system.debug("launcherClient ready",window.name),f.default.perf.debug("LauncherClientReadyTime","stop"),y.start(e)},name:"launcherClient"})}y=v(),y.constructInstance=v,t.default=y},8970:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7664),o=r(n(3712)),s=n(2669),a=r(n(5376)),u=r(n(9562)),l=r(n(3190)),c=r(n(2551)),d=r(n(7184));c.default.system.debug("Starting LinkerClient");const f=c.default.system.info,p=c.default.system.debug;function h(e){return e.windowName.replace(/\./g,"_")}function g(e,t){return t&&t(null,e),e}class m extends s._BaseClient{constructor(e){super(e),this.stateChangeListeners=[],this.allChannels=[],this.channels={},this.clients={},this.channelListenerList=[],this.dataListenerList={},this.handleListeners=(e,t)=>{const n=this.dataListenerList[t.data.type];if(n&&n.length>0)for(let e=0;e<n.length;e++)n[e](t.data.data,{data:t.data.data,header:t.header,originatedHere:t.originatedHere})},this.onClose=e=>{const t=h(this.windowClient.getWindowIdentifier());this.clients[t]&&(this.clients[t]=null,this.updateClientInStore(t)),this.linkerStore.removeListener({field:`clients.${t}`},this.clientsKeyValueChangeStoreListener,((e,n)=>{n||c.default.system.warn("Linker Client Onclose: clientsKeyValueChangeStoreListener removeListener failed",t)})),this.linkerStore.removeListener({field:{}},this.anyFieldChangeStoreListener,((e,t)=>{t||c.default.system.warn("Linker Client Onclose: anyFieldChangeStoreListener removeListener failed")})),c.default.system.debug("LINKER-4 cleanup",t),e&&e()},this.groups=this.channels,this.allGroups=this.allChannels,this.onLinksUpdate={push:e=>{this.stateChangeListeners.push(((t,n)=>{n&&(n.groups=n.channels),e(t,{groups:n})}))}},this.linkerWindow=null,this.loading=!1,o.default.args(e,"object=")&&e&&o.default.args2("params.onReady",e.onReady,"function="),this.launcherClient=e.clients.launcherClient,this.windowClient=e.clients.windowClient,this.distributedStoreClient=e.clients.distributedStoreClient,this.clientsKeyValueChangeStoreListener=this.clientsKeyValueChangeStoreListener.bind(this),this.anyFieldChangeStoreListener=this.anyFieldChangeStoreListener.bind(this)}getChannel(e){return this.allChannels.filter((t=>t.name===e)).length>0}createChannel(e,t){return c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.createChannel","PARAMS",e),o.default.args(e,"object"),e.name?this.getChannel(e.name)?(p(`LinkerClient.createChannel: Channel ${e.name} Already Exists`),g(this.allChannels,t)):(this.allChannels.push(e),this.allGroups=this.allChannels,this.linkerStore.setValue({field:"channels",value:this.allChannels}),g(this.allChannels,t)):(p("LinkerClient.createChannel: Name is required"),g(this.allChannels,t))}removeChannel(e,t){if(f("LinkerClient.removeChannel","NAME",e),c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),o.default.args(e,"string"),!this.getChannel(e))return p(`Channel ${e}does not exist`,null),g(this.allChannels,t);const n=this.allChannels;for(let t=0;t<n.length;t++)if(e===n[t].name){n.splice(t,1);break}this.linkerStore.setValue({field:"channels",value:this.allChannels});const{clients:r}=this;for(const t in r){const n=r[t];for(const t in n.channels)if(e===t){delete n[t];break}}return this.linkerStore.setValue({field:"clients",value:this.clients}),g(this.allChannels,t)}updateClientInStore(e){this.linkerStore.setValue({field:`clients.${e}`,value:this.clients[e]})}linkToChannel(e,t,n){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.linkToChannel","CHANNEL",e,"COMPONENT",t),o.default.args(e,"string",t),t||(t=this.windowClient.getWindowIdentifier());const r=h(t);if(this.clients[r]||(this.clients[r]={client:t,channels:{}}),Array.isArray(e))for(let t=0;t<e.length;t++)this.clients[r].channels[e[t]]=!0;else this.clients[r].channels[e]=!0;return this.updateClientInStore(r),g(this.getState(t),n)}unlinkFromChannel(e,t,n){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unlinkFromChannel","CHANNEL",e,"WINDOW IDENTIFIER",t),o.default.args(e,"string",t),t||(t=this.windowClient.getWindowIdentifier());const r=h(t),i=this.clients[r];if(Array.isArray(e))for(let t=0;t<e.length;t++)delete i.channels[e[t]];else if(e){if(!i||!i.channels[e]){const i=this.clients[r];return p(`Component was not in specified channel ${e}`,i,i.channels[e]),g(this.getState(t),n)}delete i.channels[e]}else for(const e in i.channels)delete i.channels[e];return this.updateClientInStore(r),g(this.getState(t),n)}getAllChannels(e){return f("LinkerClient.getAllChannels"),g(this.allChannels,e)}getState(e,t){c.default.system.warn("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.getState","WINDOW IDENTIFIER",e);const n={channels:[],allChannels:this.allChannels};if(e||(e=this.windowClient.getWindowIdentifier()),!Object.keys(this.clients).length)return g(n,t);const r=h(e),i=this.clients[r];return i?(n.channels=this.allChannels.filter((e=>i.channels&&!0===i.channels[e.name])),c.default.system.debug("LINKER-3",this.allChannels,"state.channels",n.channels,"key",r,"windowIdentifier",e,"componentEntry",i),i.active||(i.active=!0,this.linkerStore.setValue({field:`clients.${r}`,value:i})),g(n,t)):g(n,t)}unsubscribe(e,t){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.unsubscribe","DATA TYPE",e),o.default.args(e,"string"),this.dataListenerList[e]&&(t?this.dataListenerList[e]=this.dataListenerList[e].filter((e=>e!==t)):delete this.dataListenerList[e])}publish(e,t){f("LinkerClient.publish","PARAMS",e),o.default.args(e.dataType,"string",e.data,"any");let{channels:n}=e;n||(n=Object.keys(this.channels));for(let t=0;t<n.length;t++){const r=n[t];this.routerClient.transmit(`${r}.${e.dataType}`,{type:e.dataType,data:e.data}),this.routerClient.transmit(r,{type:e.dataType,data:e.data})}return g({},t)}subscribe(e,t){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.subscribe","DATA TYPE",e),o.default.args(e,"string",t,"function"),this.dataListenerList[e]?this.dataListenerList[e].includes(t)||this.dataListenerList[e].push(t):this.dataListenerList[e]=[t]}getLinkedComponents(e,t){c.default.system.deprecated("This method is deprecated and will be removed in a future release. Please use FSBL.Interop which provides channel linking automatically."),f("LinkerClient.getLinkedComponents","PARAMS",e);const n=[];if(e||(e={}),e.channels&&!Array.isArray(e.channels)&&(o.default.args(e.channels,"string"),e.channels=[e.channels]),e.componentTypes&&!Array.isArray(e.componentTypes)&&(o.default.args(e.componentTypes,"string"),e.componentTypes=[e.componentTypes]),e.componentTypes&&o.default.args(e.componentTypes,"array"),e.windowIdentifier){const t=h(e.windowIdentifier),n=Object.keys(this.clients[t].channels);e.channels?e.channels=e.channels.filter((e=>n.includes(e))):e.channels=n}e.channels||(e.channels=this.getAllChannels().map((e=>e.name)));for(const t in this.clients){let r=this.clients[t];if(!r)continue;r.channels||(r=r[Object.keys(r)[0]]);const i=Object.keys(r.channels).filter((t=>e?.channels?.includes(t))).length;let o=!0;e.componentTypes&&(o=e.componentTypes.includes(r.client.componentType)),r.active&&i&&o&&n.push({windowName:r.client.windowName,componentType:r.client.componentType,uuid:r.client.uuid,channels:Object.keys(r.channels)})}return g(n,t)}updateListeners(){for(let e=this.channelListenerList.length-1;e>=0;e--){const t=this.channelListenerList[e];Object.keys(this.channels).filter((e=>e==t)).length||(this.routerClient.removeListener(t,this.handleListeners),this.channelListenerList.splice(e,1))}const e=Object.keys(this.channels);for(let t=0;t<e.length;t++){const n=e[t];this.channelListenerList.includes(n)||(this.routerClient.addListener(n,this.handleListeners),this.channelListenerList.push(n))}const t=this.getState();for(let e=0;e<this.stateChangeListeners.length;e++)this.stateChangeListeners[e](null,t)}onStateChange(e){this.stateChangeListeners.push(e)}persistState(e){console.info("saving state",e),this.windowClient.setComponentState({field:"Finsemble_Linker",value:e})}clientsKeyValueChangeStoreListener(e,t){if(p("My Channels Updated"),!t.value)return;const n=t.value.channels||t.value.groups,r=d.default(n,this.channels);n&&!r&&(this.persistState(n),this.channels=n,this.updateListeners())}anyFieldChangeStoreListener(e,t){const{values:n}=t.value;this.allChannels=n.channels,n.groups&&(this.allChannels=n.groups),c.default.system.debug("LINKER-2",this.allChannels),this.allGroups=this.allChannels,this.clients=n.clients}start(e){this.dontPersistYet=!0,p("LinkerClient Loading Channels");const t=this.windowClient.getWindowIdentifier(),n=h(t);this.distributedStoreClient.getStore({store:"Finsemble_Linker",global:!0},((r,i)=>{this.linkerStore=i,i.getValues(["channels",`clients.${n}`],((r,i)=>{i&&i.channels&&(this.allChannels=i.channels,c.default.system.debug("LINKER-1",this.allChannels),this.allGroups=this.allChannels),this.windowClient.getComponentState({field:"Finsemble_Linker"},((r,o)=>{this.channels=[],this.clients[n]={client:t,active:!0,channels:{}},o?(this.channels=o,this.clients[n].channels=o):i[`clients.${n}`]?.channels&&(this.clients[n].channels=i[`clients.${n}`].channels),this.updateClientInStore(n);const s=this.windowClient.getSpawnData();if(s&&s.linker){let e=s.linker.channels;s.linker.groups&&(e=s.linker.groups),this.linkToChannel(e,t)}else this.updateListeners();e()}))})),i.addListener({field:`clients.${n}`},this.clientsKeyValueChangeStoreListener),i.addListener({},this.anyFieldChangeStoreListener)}))}hyperFocus(e){this.launcherClient.hyperFocus({windowList:this.getLinkedComponents({channels:e})})}bringAllToFront(e){const{channel:t,restoreWindows:n}=e;this.launcherClient.bringWindowsToFront({restoreWindows:n,windowList:this.getLinkedComponents({channels:t})})}createGroup(e,t){return this.createChannel(e,t)}deleteGroup(e,t){return this.removeChannel(e,t)}addToGroup(e,t,n){const r=this.linkToChannel(e,t);return n&&n(null,r),r}removeFromGroup(e,t,n){const r=this.unlinkFromChannel(e,t);return n&&n(null,r),r}getAllGroups(e){const t=this.getAllChannels();return e&&e(t),t}getGroups(e,t){const n=this.getState(e);return n.groups=n.channels,g(n,t)}unSubscribe(e,t){this.unsubscribe(e,t)}getLinkedWindows(e,t){return e||(e={}),e.groups=e.channels,e.windowIdentifier=e.client,this.getLinkedComponents(e,t)}windowIdentifier(e,t){return g(this.windowClient.getWindowIdentifier(),t)}openLinkerWindow(e){if(o.default.args(e,"function"),this.loading)return;const t=()=>{this.routerClient.query("Finsemble.LinkerWindow.Show",{groups:this.getGroups().groups,windowIdentifier:this.windowClient.getWindowIdentifier(),windowBounds:this.windowClient.getWindowBounds()},(()=>{}))};this.linkerWindow?this.linkerWindow.isShowing((e=>{e?this.linkerWindow.hide():t()})):t()}}function y(e){return(e=e||{}).windowClient||(e.windowClient=a.default),e.launcherClient||(e.launcherClient=u.default),e.distributedStoreClient||(e.distributedStoreClient=l.default),new m({clients:e,startupDependencies:{clients:["windowClient","distributedStoreClient","launcherClient"]},onReady(t){p("Linker onReady"),setTimeout((()=>{i.parallel([e=>{v.start(e)},t=>{e.launcherClient.onReady(t)}],t)}),0)},name:"linkerClient"})}const v=y();v.constructInstance=y,t.default=v},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalLogger=void 0;const{debug:n,warn:r,log:i,error:o}=console,s=()=>{},a=s,u={warn:r,info:s,log:i,debug:n,error:o,verbose:a,deprecated:o},l={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},c={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:l,system:l,perf:l};function d(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=d,this.setting=()=>c,this.callStack=()=>function(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}(),this.unregisterClient=()=>{},this.setRouterClient=()=>{},this.warn=r,this.info=s,this.log=i,this.debug=n,this.error=o,this.verbose=a,this.system=u,this.perf=u,this.deprecated=o}}},2551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerConstructor=void 0;const r=n(1742),i=n(5729),o=n(6925),s={Error:!0,Warn:!0,Info:!1,Log:!0,Debug:!1,Verbose:!1,LocalOnly:!1},a={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},u=n(8172);t.LoggerConstructor=function(e){const i=this;let l;i.RouterClient=e&&e.RouterClient;let c=!1,d=!1;const f=i;let p,h,g=0,m=0;this.startupTime=0;let y=[];if("undefined"==typeof window)return;let v=r.System.Window.getCurrent().name;window.top!==window&&(v=`${v}.Frame`),this.onLogStateChangeCallback=[];let w={console:a,dev:s,system:s,perf:s};function b(e,t,n){this.category=e,!l&&r.System.isBrowserView()&&(l=r.System.getViewId()),this.logClientName=l?`${v}: view-${l}`:v,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+g}function S(e,t){e&&e.dev&&(w=e,i.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){f.system.debug("Logger updateQueueBasedOnState",e,g,"QUEUE LENGTH",y.length,w);const t=[];for(let n=0,{length:r}=y;n<r;n++)if(w[y[n].category][y[n].logType]&&!w[y[n].category].LocalOnly)e&&(y[n].logTimestamp=y[n].logTimestamp+g),t.push(y[n]);else if(w[y[n].category][y[n].logType]&&w[y[n].category].LocalOnly){const e=y[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}y=t}(t)}function C(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}this.onStateChanged=e=>{-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)},this.setClientName=function(e){console.error("logger.setClientName() is deprecated"),v=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),v},this.clearMessageList=function(){y=[]},this.callStack=function(){return C()},this.setting=function(){return w};const _=console.error,L=console.warn,A=console.info,E=console.log,I=console.debug;function O(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?O(t):t)),[])}function T(e,t){try{e.apply(console,O(t))}catch(e){(t=[]).push(C())}}let M=()=>{y.length>0&&(i.RouterClient.transmit("logger.service.logMessages",y),f.clearMessageList())};function k(e,n,r){let i,o=!1,s=!0;"forceObjectsToLogger"===r[0]&&(o=!0,s=!1,r.splice(0,1)),r=r.map((e=>s&&function(e){const t=[],n=[e];let r=0,i=0;for(;n.length&&i<1e3;){i++;const e=n.pop();if("boolean"==typeof e)r+=4;else if("string"==typeof e)r+=2*e.length;else if("number"==typeof e)r+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return r}(e)>5e4?(T(A,["Message too large to send to the logger.",r]),"Log argument greater than 50KB. Check local Console to see output of the object."):e));try{for(let e=0;e<r.length;e++)r[e]instanceof Error&&(r[e]=r[e].toString());i=new b(e,n,JSON.stringify(r))}catch(t){r.splice(0,r.length),r.push(C()),i=new b(e,n,`*** Logging Error: ${JSON.stringify(r)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(i)?function(e){if(y.length<2e4)y.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",y.length);let e,n=0;for(;e=y.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(i):++m<=5&&T(A,[`"Filtered Logger Message (${m} of first 5 shown)`,i]),d&&M()}function D(){const{windowName:e}=o.Startup.getInstance().getStartupData();v=e,window.top!==window&&(v=`${v}.Frame`);const t=`finsemble.logger.client.${v}`;!l&&r.System.isBrowserView()&&(l=r.System.getViewId()),f.system.debug("logger.service.registering",v),r.System.Window.getCurrent().getOptions((n=>{const r=n?.customData?.component?.centralLoggerNamePrefix;i.RouterClient.query("logger.service.register",{clientName:v,clientChannel:t,windowName:e,viewId:l,centralLoggerNamePrefix:r},((e,t)=>{if(e)setTimeout(D,750);else{for(const e of y)e.viewId=l;d=!0,f.system.debug("logger.service.registered"),p=t.data,"routerService"!==v?(g=h,S(p,!0)):S(p,!1),k("system","Debug",["Logger Registered"]),M()}}))})),i.RouterClient.addListener(t,((e,t)=>{f.system.debug("logger.client.setLogState",t.data),p=t.data,S(p,!1)}))}M=u(M,"routerService"===v?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),w.dev.Error&&!w.dev.LocalOnly&&k("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),T(_,e)},this.warn=function(){if(w.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),w.dev.Warn&&!w.dev.LocalOnly&&k("dev","Warn",e),w.dev.Warn&&w.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),T(L,e))}},this.info=function(){if(w.dev.Info){const e=Array.prototype.slice.call(arguments);w.dev.Info&&!w.dev.LocalOnly&&k("dev","Info",e),w.dev.Info&&w.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),T(A,e))}},this.log=function(){if(w.dev.Log){const e=Array.prototype.slice.call(arguments);w.dev.Log&&!w.dev.LocalOnly&&k("dev","Log",e),w.dev.Log&&w.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),T(E,e))}},this.debug=function(){if(w.dev.Debug){const e=Array.prototype.slice.call(arguments);w.dev.Debug&&!w.dev.LocalOnly&&k("dev","Debug",e),w.dev.Debug&&w.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),T(I,e))}},this.verbose=function(){if(w.dev.Verbose){const e=Array.prototype.slice.call(arguments);w.dev.Verbose&&!w.dev.LocalOnly&&k("dev","Verbose",e),w.dev.Verbose&&w.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),T(I,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),w.system.Error&&!w.system.LocalOnly&&k("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),T(_,e)},this.system.warn=function(){if(w.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),w.system.Warn&&!w.system.LocalOnly&&k("system","Warn",e),w.system.Warn&&w.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),T(L,e))}},this.system.info=function(){if(w.system.Info){const e=Array.prototype.slice.call(arguments);w.system.Info&&!w.system.LocalOnly&&k("system","Info",e),w.system.Info&&w.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),T(A,e))}},this.system.log=function(){if(w.system.Log){const e=Array.prototype.slice.call(arguments);w.system.Log&&!w.system.LocalOnly&&k("system","Log",e),w.system.Log&&w.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),T(E,e))}},this.system.debug=function(){if(w.system.Debug){const e=Array.prototype.slice.call(arguments);w.system.Debug&&!w.system.LocalOnly&&k("system","Debug",e),w.system.Debug&&w.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),T(I,e))}},this.system.verbose=function(){if(w.system.Verbose){var e=Array.prototype.slice.call(arguments);w.system.Verbose&&!w.system.LocalOnly&&k("system","Verbose",e),w.system.Verbose&&w.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),T(I,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),w.perf.Error&&!w.perf.LocalOnly&&k("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),T(_,e)},this.perf.warn=function(){if(w.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),w.perf.Warn&&!w.perf.LocalOnly&&k("perf","Warn",e),w.perf.Warn&&w.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),T(L,e))}},this.perf.info=function(){if(w.perf.Info){const e=Array.prototype.slice.call(arguments);w.perf.Info&&!w.perf.LocalOnly&&k("perf","Info",e),w.perf.Info&&w.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),T(A,e))}},this.perf.log=function(){if(w.perf.Log){const e=Array.prototype.slice.call(arguments);w.perf.Log&&!w.perf.LocalOnly&&k("perf","Log",e),w.perf.Log&&w.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),T(E,e))}},this.perf.debug=function(){if(w.perf.Debug){const e=Array.prototype.slice.call(arguments);w.perf.Debug&&!w.perf.LocalOnly&&k("perf","Debug",e),w.perf.Debug&&w.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),T(I,e))}},this.perf.verbose=function(){if(w.perf.Verbose){const e=Array.prototype.slice.call(arguments);w.perf.Verbose&&!w.perf.LocalOnly&&k("perf","Verbose",e),w.perf.Verbose&&w.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),T(I,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){f.system.debug("logger.service.unregister",v,e,l),M();const n=e||{clientName:v,viewId:l};i.RouterClient.query("logger.service.unregister",n,t)},this.isLogMessage=function(e){return"logger.service.logMessages"===e},this.status="offline",this.setRouterClient=e=>{this.RouterClient=e},this.start=function(){let e;this.startupTime=performance.now(),i.RouterClient||(console.log("No instance of the RouterClient found for this instance of the Logger. Dynamically requiring it."),i.RouterClient=n(9319).default);const t=()=>{e=i.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(i.status="online",f.system.debug("Logger onReady",v),i.RouterClient.calibrateTimeWithRouterService((e=>{h=e,c||(i.startupTime=performance.now()-i.startupTime,D(),c=!0)})),i.RouterClient.unsubscribe(e))}))};"routerService"===window.name?i.RouterClient.query("logger.service.register",{},(e=>{e?setTimeout(t,750):t()})):i.RouterClient.onReady(t),r.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{i.unregisterClient()}))}},t.Logger="undefined"!=typeof window?new t.LoggerConstructor:new i.LocalLogger,t.default=t.Logger},2807:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationClient=t.ActionTypes=t.ROUTER_NAMESPACE=void 0;const i=n(2283);Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return i.ActionTypes}});const o=r(n(5320)),s=r(n(2521)),a=r(n(631)),u=r(n(5016)),l=n(4232),c=n(2669),d=r(n(10)),f=r(n(5376)),p=r(n(9562)),h=r(n(3014)),g="notification.",m="unsubscribe";t.ROUTER_NAMESPACE={ACTION_PREFIX:"notification.action."};class y extends c._BaseClient{constructor(e){super(e),this.subscriptions=[],this.Notification=o.default,this.ActionTypes=i.ActionTypes,this.Subscription=s.default,this.Action=a.default,this.Filter=u.default,this.actionTypes=i.ActionTypes,this.publicEventManager=new h.default({name:"notificationClient",sourceType:"notification"})}async applyOverrides(){const{data:e}=await d.default.getValue("finsemble.servicesConfig.notifications.applyNotificationOverrides");if(!e)return;const t=f.default.getWindowIdentifier().windowName,{data:n}=await p.default.getActiveDescriptors(),r=Object.keys(n).filter((e=>e===t)).map((e=>n[e]));let i,o="Unknown Source";function s(e,t){const{componentType:n}=f.default.getWindowIdentifier();t.finsembleSource=o,v.notify(JSON.parse(JSON.stringify({title:e,options:t})))}1!==r.length?this.logger.warn("Unable to fetch component to extract type or display name"):(i=r[0],o=i.customData?.component?.displayName||i.componentType);const a=window.Notification;s.requestPermission=a.requestPermission.bind(a),Object.defineProperty(s,"permission",{get:function(){return a.permission}}),window.Notification=s}setup(){window&&window.addEventListener&&window.addEventListener("unload",(()=>{this.unsubscribeAll()}))}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}query(e,t,n,r){return new Promise((async(i,o)=>{try{null==n&&(n=g),this.logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.routerClient.query(n+e,t,(()=>{}));s.err?(this.logger.system.error("Error: ",s.err),o(s.err)):(this.logger.system.log(`${e} raw response: `,s),r&&r(null,s.response.data.data),i(s.response.data.data))}catch(e){this.logger.system.error("Error: ",e),r&&r(e),o(e)}}))}async fetchHistory(e,t){return this.logger.system.info("FetchHistory() called with params: ",e,t),await this.query("fetch_history",{options:e,filter:t})}async getLastIssuedAt(e){return this.logger.system.info("getLastIssued called with params: ",e),await this.query("last_issued",e)}async performAction(e,t){return this.logger.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await this.query("perform_action",{notifications:e,action:t})}async markRead(e){this.logger.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_read",{notifications:e,isRead:!0})}async markUnread(e){this.logger.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_unread",{notifications:e,isRead:!1})}deleteNotifications(e){return this.logger.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(this.query("delete",e))}catch(e){n(e)}}))}async notify(e){this.logger.system.info("notify() called with params: ",e);try{await this.query("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await l.sleep(500),await this.notify(e)}}async subscribe(e,t){this.logger.system.info("subscribe() called with params: ",e,t);const n=await this.query("subscribe",JSON.parse(JSON.stringify(e)));return this.logger.system.info("Got a return value containing a channel",n),await this.monitorChannel(n.channel,t),this.subscriptions.push(n),n}async unsubscribe(e){this.logger.system.info("unsubscribe() called with params: ",e),await this.query(m,e),this.cleanupSubscription(e)}removeResponder(e,t){null==t&&(t=g),this.routerClient.removeResponder(t+e)}unsubscribeAll(){this.logger.system.info("unsubscribeAll() called"),this.subscriptions.forEach((e=>{this.query(m,e.id).then(),this.removeResponder(e.id)})),this.subscriptions=[]}async mute(e){return this.logger.system.info("mute() called with params: ",e),await this.query("mute",{filter:e})}async unmute(e){return this.logger.system.info("unmute() called with params: ",e),await this.query("unmute",{filter:e})}async getSources(){return this.logger.system.info("getSources() called"),await this.query("sources",{})}async getMuteFilters(){return this.logger.system.info("getSources() called"),await this.query("mute_filters",{})}async getPreferences(){return this.logger.system.info("getPreferences() called"),await this.query("preferences",{})}cleanupSubscription(e){const t=this.subscriptions.findIndex((t=>t.id===e));t>-1&&(this.removeResponder(this.subscriptions[t].channel),this.subscriptions.splice(t,1))}addResponder(e,t,n){null==n&&(n=g),this.logger.system.info(`Adding responder for endpoint: ${n+e}`),this.routerClient.addResponder(n+e,((n,r)=>{if(this.logger.system.info(`Message received on ${e}: `,r),n)this.logger.system.error(`Failed to setup ${e} responder`,n);else try{this.logger.system.info(`Processing message on channel ${e}: `,r);const n=t(r.data);this.logger.system.info(`Message response on ${e}: `,n),r.sendQueryResponse(null,{status:"success",data:n})}catch(n){this.logger.system.error("Failed to process query",n),r.sendQueryResponse(n)}}))}monitorChannel(e,t){return new Promise((n=>{this.logger.system.info("Listening for messages on channel",e),this.addResponder(e,(e=>{this.logger.system.info("Notification received: ",e.id);try{t(e)}catch(e){this.logger.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})),n()}))}}t.NotificationClient=y;const v=new y({onReady:function(e){v.applyOverrides(),v.setup(),this.logger.system.log("notificationClient Online"),e()},name:"notificationClient"});t.default=v},568:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClientConstructor=void 0;const i=r(n(2369)),o=r(n(3712)),s=r(n(3699)),a=n(1742),u=n(2551),l=n(6192),c=n(5729),d=n(586),f=[];let p=u.Logger;function h(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?h(e[n],null):t[n];return t}t.RouterClientConstructor=function(){let e,t;const n={},r={},u={},g={},m={},y={},v={},w={},b={},S={};let C,_=null,L=!1;const A=[];function E(){this.header={origin:C,type:"initialHandshake"}}function I(e,t){this.header={origin:C,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function O(e){this.header={origin:C,type:"addListener",channel:e}}function T(e,t,n){this.header={origin:C,type:"transmit",channel:e},this.data=t,this.options=n}function M(e){this.header={origin:C,type:"removeListener",channel:e}}function k(e){this.header={origin:C,type:"addResponder",channel:e}}function D(e,t,n){this.header={origin:C,type:"query",queryID:e,channel:t},this.data=n}function N(e,t,n){this.header={origin:C,type:"queryResponse",queryID:e,error:t},this.data=n}function j(e){this.header={origin:C,type:"removeResponder",channel:e}}function R(e,t){this.header={origin:C,type:"subscribe",subscribeID:e,topic:t}}function P(e,t){this.header={origin:C,type:"unsubscribe",subscribeID:e,topic:t}}function W(e,t){this.header={origin:C,type:"publish",topic:e},this.data=t}function F(e,t,n,r){this.header={origin:C,type:"notify",subscribeID:e,topic:t,error:n},this.data=r}function x(e,t,n){this.header={origin:C,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:C,type:"removePubSubResponder",topic:e}}function $(e){_?_.send(e):(p.system.info("RouterClient: Queuing message since router initialization not complete",e),f.push(e))}function U(){return this.header.origin===this.header.lastClient}function z(e,t){p.system.info("RouterClient: outgoing query response","CHANNEL",this.header.channel,"RESPONSE DATA",t,"QUERY ID",this.header.queryID),$(new N(this.header.queryID,e,t))}function H(e,t){const n=e[t.header.channel];void 0===n?p.system.warn(`RouterClient: no query responder define on channel ${t.header.channel} incoming from ${t.header.origin}`,t):t.header.error?(p.system.warn("RouterClient: queryResponder error",t),n(t.header.error,null),delete e[t.header.channel]):(t.originatedHere=U,t.sendQueryResponse=z.bind(t),p.system.info("RouterClient: incoming query","CHANNEL",t.header.channel,"FROM",t.header.origin,"QUERY MESSAGE",t),n(null,t))}function q(e,t){if(e)p.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{g[this.header.topic]=t;const n=y[this.header.topic];if(void 0!==n)for(let r=0;r<n.length;r++)p.system.info("RouterClient: sending pubsub notify","TOPIC",this.header.topic,"NOTIFY DATA",t),$(new F(n[r],this.header.topic,e,t))}}function V(e,t){var n,r,i;(function(e){let t=!1;return void 0===e&&(t=!0),t})(t)||$(new F(this.header.subscribeID,this.header.topic,e,t)),e?p.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",this.header.topic,"MESSAGE",this):(n=y,r=this.header.topic,i=this.header.subscribeID,r in n?n[r].push(i):n[r]=[i],p.system.info("RouterClient: incoming subscription added","TOPIC",this.header.topic,"MESSAGE",this))}function G(){!function(e,t,n){let r=!1;if(t in e){const i=y[t];for(let o=0;o<i.length;o++)if(n===i[o]){i.splice(o,1),0===i.length&&delete e[t],r=!0,p.system.info("RouterClient: PubSub removeListener","TOPIC",t,"FROM",n);break}}r||p.system.warn(`RouterClient: tried to remove non-existent listener on ${t} from ${JSON.stringify(n)}`)}(y,this.header.topic,this.header.subscribeID)}function Y(i){switch(p.system.verbose("Incoming Message Type",i.header.type,i),i.header.type){case"transmit":!function(e,t){const n=e[t.header.channel]||[],r=[];if(Array.isArray(n)&&0!==n.length){t.originatedHere=U,n.forEach((e=>{r.push(e)}));for(let e=0;e<r.length;e++)p.isLogMessage(t.header.channel)||p.system.info("RouterClient: incoming transmit","CHANNEL",t.header.channel,"FROM",t.header.origin,"MESSAGE",t),r[e](null,t)}else p.system.warn(`RouterClient: no listener for incoming transmit on channel ${t.header.channel} from ${t.header.origin}`,t)}(n,i);break;case"query":H(r,i);break;case"queryResponse":!function(e,t){const n=e[t.header.queryID];void 0===n?p.system.warn("RouterClient: no handler for incoming query response","QUERY ID",t.header.queryID):(function(e,t){const n=e[t];void 0!==n&&clearTimeout(n)}(S,t.header.queryID),t.header.error?(p.system.debug("RouterClient: incoming queryResponse error",t.header,"QUERY ID",t.header.queryID),n(t.header.error,t)):(p.system.info("RouterClient: incoming query response","RESPONSE MESSAGE",t,"QUERY ID",t.header.queryID),n(null,t)),delete e[t.header.queryID])}(b,i);break;case"notify":!function(e,t){const n=e[t.header.subscribeID];void 0===n?p.system.warn("RouterClient: no subscription handler defined for incoming notify for subscriberID",t.header.subscribeID,t):t.header.error?(p.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(t.header.error,t)):(t.originatedHere=U,p.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(v,i);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in m)if(m[n].test(e.header.topic)){t=u[n];break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e):(e.sendNotifyToAllSubscribers=q,t.publishCallback?(p.system.info("RouterClient: incoming PubSub publish callback invoked","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),t.publishCallback(null,e)):(p.system.info("RouterClient: incoming PubSub publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),e.sendNotifyToAllSubscribers(null,e.data)))}(i);break;case"subscribe":!function(e){p.system.info("RouterClient: PubSub subscribe","TOPIC",e.header.topic);let t=u[e.header.topic];if(void 0===t)for(const n in m)if(m[n].test(e.header.topic)){t=u[n];let r=g[e.header.topic];void 0===r&&(r=g[n]),g[e.header.topic]=r;break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming subscribe",e):e.header.error?p.system.warn(`RouterClient: pubsub error received from router service: ${JSON.stringify(e.header.error)}`):(e.sendNotifyToSubscriber=V,t.subscribeCallback?(e.data=g[e.header.topic],t.subscribeCallback(null,e)):e.sendNotifyToSubscriber(null,g[e.header.topic]))}(i);break;case"unsubscribe":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in m)if(m[n].test(e.header.topic)){t=u[n];break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e):(e.removeSubscriber=G,t.unsubscribeCallback?(p.system.info("RouterClient: incoming unsubscribe callback","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),t.unsubscribeCallback(null,e)):(p.system.info("RouterClient: incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),e.removeSubscriber()))}(i);break;case"timeCalibration":const o=()=>{t?t(i):setTimeout((()=>{o()}),10)};o();break;case"initialHandshakeResponse":e()}}function Q(e,t){t.header.lastClient=C,t.header.incomingTransportInfo=e,Y(t)}this.startupTime=0,this.notificationURL="";const K=(t,n,r)=>{let o,a;p.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,l,c,d,h=!1,g=0;const m=t=>{a=0,p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),_=t,e=d,c(),o=setInterval(c,200)};u=e=>{p.system.error("RouterClientError",e)};const y=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),i.default.getTransport(t,n,Q,C,"RouterService").then(m).catch(u)};l=()=>{if(clearInterval(o),g++,g<=3)p.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",g,t),y();else{const e="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";p.system.error(e,t),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",e,{url:this.notificationURL})}},c=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),$(new E),a++>50&&l()},d=()=>{if(!h){if(p.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${C} with transport ${_.identifier()}`),h=!0,clearInterval(o),f)for(let e=0;e<f.length;e++){p.system.debug("RouterClient: firing queued msg");const t=f[e];_.send(t)}r&&r()}},y()};function J(){return`${C}.${d.v4()}`}function Z(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}this.calibrateTimeWithRouterService=function(e){let n,r=0,i=1/0;t=function(t){r++,r>5?function(t){let r=0;for(let e=1;e<5;e++){const o=t.clientBaseTime[e-1],s=t.clientBaseTime[e]-o,a=t.serviceBaseTime[e-1]-(o+s/2);s<i&&(i=s,n=a),r+=a,p.system.debug("calibrationCalculation Intermediate Values","lastRRT",s,"lastOffset",a,"fastestOffset",n,"fastestRRT",i)}r/=4,p.system.debug("RouterClient calibrationCalculation","Average Offset",r,"Chosen FastestOffset",n,t),e(n)}(t):(t.clientBaseTime.push(l.Globals.performance.timing.navigationStart+l.Globals.performance.now()),$(new I(t.clientBaseTime,t.serviceBaseTime)))},t(new I([],[]))},this.onReady=e=>new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};L?n():A.push(n)})),this.addListener=function(e,t){p.system.info("RouterClient.addListener","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];return void 0===i||0===i.length?(e[t]=[n],r=!0):i.push(n),r}(n,e,t)&&$(new O(e))},this.transmit=function(e,t,n={suppressWarnings:!1}){p.isLogMessage(e)||p.system.info("RouterClient.transmit","TO CHANNEL",e,"EVENT",t),o.default.args(e,"string",t,"any"),$(new T(e,t,n))},this.removeListener=function(e,t){p.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];if(void 0!==i){const e=i.indexOf(n);e>-1?(i.splice(e,1),0===i.length&&(r=!0)):p.system.warn(`no listener defined for channel: ${t}`)}return r}(n,e,t)&&$(new M(e))},this.addResponder=(e,t)=>{if(p.system.info("RouterClient.addResponder","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;return void 0===e[t]&&(e[t]=n,r=!0),r}(r,e,t))$(new k(e));else{const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;p.system.warn(n),t(n,null)}},this.query=(e,t,n,r)=>{const i=`${J()}.${e}`,s=window.performance.timing.navigationStart+window.performance.now(),a=window.performance.timing.navigationStart,u=window.performance.now();return p.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u}),r||(r=n,n={timeout:2e4}),o.default.args(e,"string",t,"any=",n,"object=",r,"function"),n=n||{},o.default.args2("params.timeout",n.timeout,"number"),new Promise((function(o){b[i]=(l,c)=>{o({err:l,response:c}),"function"==typeof r?r(l,c):p.system.warn("No response event handler passed to RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u})},l.Globals.runningInFSBLUnitTest||function(e,t,n,r){r>0&&(e[t]=setTimeout((()=>{p.system.warn(`RouterClient: timeout waiting on query response on channel ${n} for queryID ${t} on timer ${e[t]} timeout=${r}`)}),r))}(S,i,e,n.timeout),$(new D(i,e,t))}))},this.removeResponder=e=>{p.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),Z(r,e)&&$(new j(e))},this.addPubSubResponder=(e,t,n,r)=>{let i,s;p.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),o.default.args(e,"any",t,"object=",n,"object="),n=n||{},o.default.args2("params.subscribeCallback",n.subscribeCallback,"function=","params.publishCallback",n.publishCallback,"function=")&&o.default.args2("params.unsubscribeCallback",n.unsubscribeCallback,"function="),void 0===n.subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback?(t=t||{},$(new x(e.toString(),t,!0)),s="success"):!function(e,t,n,r){let i=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(m[e.toString()]=e,p.system.info(`RouterClient: PubSub RegEx added for topic ${e.toString()}`)),u[e.toString()]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:r},i=!0),i}(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)?(i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,p.system.error(i)):(t=t||{},g[e.toString()]=h(t),$(new x(e.toString(),t,!1)),s="success"),r&&r(i,s)},this.removePubSubResponder=e=>{p.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any"),Z(u,e)?(delete g[e.toString()],delete m[e.toString()],$(new B(e))):p.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)},this.subscribe=(e,t)=>{p.system.info("RouterClient.subscribe","TOPIC",e),o.default.args(e,"string",t,"function");const n=J();return function(e,t,n,r){e[t]=n,w[t]=r}(v,n,t,e),$(new R(n,e)),{subscribeID:n,topic:e}},this.publish=(e,t)=>{p.system.info("RouterClient.publish","TOPIC",e,"EVENT",t),o.default.args(e,"string",t,"any"),$(new W(e,t))},this.unsubscribe=e=>{p.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e),o.default.args(e,"object")&&o.default.args2("subscribeIDStruct.subscribeID",e.subscribeID,"string"),!function(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}(v,e.subscribeID)?p.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):$(new P(e.subscribeID,e.topic))},this.trustedMessage=function(e){let t=!0;return p.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t},this.disconnectAll=function(){p.system.info("RouterClient.disconnectAll");for(const e in n)p.system.debug(`RouterClient.disconnectAll is removing listener on ${e}`),$(new M(e)),delete n[e];for(const e in r)p.system.debug(`RouterClient.disconnectAll is removing responder on ${e}`),$(new j(e)),delete r[e];for(const e in u)p.system.debug(`RouterClient.disconnectAll is removing pubsub responder on ${e}`),$(new B(e)),delete u[e.toString()],delete g[e.toString()],delete m[e.toString()];for(const e in v){const t=w[e];p.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),$(new P(e,t)),delete v[e],delete w[e]}},this.start=e=>new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return p.warn(e),t(e)}this.started=!0,p=new c.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(p=new c.LocalLogger),C=`RouterClient.${e.windowName}.${d.v4()}`;const n=`"RouterClient Check: connecting new client for ${C}`;p.system.debug(n),console.debug(n),K(e,e.transportName,(()=>{!function(){for(p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),L=!0;A.length>0;)p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked"),A.shift()()}(),t(null)}))})),this.stop=()=>{this.disconnectAll(),i.default.close(),this.started=!1}}},9319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const r=n(568),i=n(2551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",r.RouterClientConstructor),i.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},9321:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(2551)),o=n(2669),s=n(6420);i.default.system.debug("Starting searchClient");class a extends o._BaseClient{constructor(){super(...arguments),this.providers={},this.resultProviders={},this.searchResultsList=[],this.isSearching=!1,this.unRegister=this.unregister,this.handleResults=(e,t)=>{t.data.searchId&&t.data.searchId==this.searchId&&(this.resultProviders[t.data.provider.channel]=t.data,this.searchResultsList.push(t.data),this.resultsCallback(null,this.searchResultsList))}}register(e,t){return e.name?e.searchCallback?void this.routerClient.query("Search.register",{name:e.name,channel:`${this.finWindow?.name}.${e.name}`,providerActionTitle:e.providerActionTitle,providerActionCallback:!!e.providerActionCallback},((n,r)=>{if(n)return t?t(n):console.error(n);const i=`${this.finWindow?.name}.${e.name}`;return this.providers[e.name]=e.name,this.routerClient.addResponder(`Search.Provider.${i}`,((t,n)=>{if(t)return console.error(t);n&&e.searchCallback(n.data,((e,t)=>{n.sendQueryResponse(e,t)}))})),this.routerClient.addResponder(`Search.Provider.ItemAction.${i}`,((t,n)=>{if(t)return console.error(t);n&&e.itemActionCallback&&e.itemActionCallback(n.data,s.windowNameFromRouterHeader(n.header),((e,t)=>{n.sendQueryResponse(e,t)}))})),e.providerActionCallback&&this.routerClient.addResponder(`Search.Provider.Action.${i}`,((t,n)=>{if(t)return console.error(t);n&&e.providerActionCallback&&e.providerActionCallback(s.windowNameFromRouterHeader(n.header),((e,t)=>{n.sendQueryResponse(e,t)}))})),t?t(null,r.data):null})):t?.("no provider callback provided"):t?.("no provider name provided")}unregister(e,t){if(!e.name)return t?.("Provider name was not provided");const n=`${this.finWindow?.name}.${e.name}`;this.routerClient.query("Search.unregister",{channel:n},(()=>(this.routerClient.removeResponder(`Search.Provider.${n}`),this.routerClient.removeResponder(`Search.Provider.ItemAction.${n}`),this.routerClient.removeResponder(`Search.Provider.Action.${n}`),delete this.providers[e.name],t?t():null)))}search(e,t){this.isSearching||(this.routerClient.addPubSubResponder(`Search.${this.finWindow?.name}`),this.routerClient.subscribe(`Search.${this.finWindow?.name}`,this.handleResults),this.isSearching=!0),this.searchResultsList=[],e.windowName=this.finWindow?.name,this.routerClient.query("Search.search",e,((e,n)=>{if(e)return t(e);this.resultsCallback=t,this.searchId=n.data.searchId}))}invokeItemAction(e,t){this.routerClient.query(`Search.Provider.ItemAction.${e.provider}`,{item:e,action:t})}invokeProviderAction(e){this.routerClient.query(`Search.Provider.Action.${e.channel}`,{})}}const u=new a({onReady(e){e&&e()},name:"searchClient"});t.default=u},4068:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="SmartDesktopClient",r="Finsemble-ui-change";var i;!function(e){e[e.JS=0]="JS",e[e.CSS=1]="CSS",e[e.JSON=2]="JSON",e[e.Text=3]="Text",e[e.Image=4]="Image",e[e.GIF=5]="GIF",e[e.Icon=6]="Icon"}(i||(i={}));class o{async getSDServerInfo(){return await FSBL.System.getSDServerInfo()}static async isEnabled(){let{enabled:e}=await FSBL.System.getSDServerInfo();return e}async applicationRoot(){let{applicationRoot:e}=await FSBL.System.getSDServerInfo();return e||null}async projectConfig(){let{projectConfig:e}=await FSBL.System.getSDServerInfo();return e||null}async getApps(){FSBL.Clients.Logger.log("SmartDesktopClient.getApps");let{err:e,response:t}=await FSBL.Clients.RouterClient.query(`${n}.getApps`,{});return FSBL.Clients.Logger.log("SmartDesktopClient.getApps result",e||"successful",t),{err:e,apps:t?.data.applications??[]}}async getMenus(){FSBL.Clients.Logger.log("ConfigClient getValue 'finsemble.toolbarMenus'");let{err:e,data:t}=await FSBL.Clients.ConfigClient.getValue({field:"finsemble.toolbarMenus"});return FSBL.Clients.Logger.log("finsemble.toolbarMenus result",e||"successful",t),{err:e,menus:t}}async getAppConfig(e){FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfig",e);let{err:t,response:r}=await FSBL.Clients.RouterClient.query(`${n}.getAppConfig`,{appName:e});return FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfig result",t||"successful",r),{err:t,config:r?.data??{}}}async getAppConfigTemplate(){FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfigTemplate");let e={appId:"123",name:"",manifest:{window:{url:"",width:1280,height:600},foreign:{components:{"App Launcher":{launchableByUser:!0},"Window Manager":{persistWindowState:!0,FSBLHeader:!0}}}},manifestType:"vendor_type",version:"1",title:"app title",tooltip:"app tip",description:"",images:[{url:"string"}],contactEmail:"string",supportEmail:"string",publisher:"string",icons:[{icon:"string"}],customConfig:[{name:"string",value:"string"}],intents:[{name:"string",displayName:"string",contexts:["string"],customConfig:{}}]};return FSBL.Clients.Logger.log("SmartDesktopClient.getAppConfigTemplate result",e),{config:e}}async addApp(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.addApp",e,t);let{err:r}=await FSBL.Clients.RouterClient.query(`${n}.addApp`,{appName:e,appConfig:t});return FSBL.Clients.Logger.log("SmartDesktopClient.addApp result",r||"successful"),{err:r}}async addMenu(e){FSBL.Clients.Logger.log("SmartDesktopClient.addMenu");let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.addMenu`,{menuConfig:e});return await this.syncMenuConfig(),FSBL.Clients.Logger.log("SmartDesktopClient.addMenu result",t||"successful"),{err:t}}async syncMenuConfig(){FSBL.Clients.Logger.log("SmartDesktopClient.syncMenuConfig");let{response:e}=await FSBL.Clients.RouterClient.query(`${n}.getMenus`,{});await FSBL.Clients.ConfigClient.setValue({field:"finsemble.toolbarMenus",value:e?.data?.menus||{}}),FSBL.Clients.Logger.log("SmartDesktopClient.syncMenuConfig completed")}async updateApp(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.updateApp",e,t);let{err:r}=await FSBL.Clients.RouterClient.query(`${n}.updateApp`,{appName:e,appConfig:t});return FSBL.Clients.Logger.log("SmartDesktopClient.updateApp result",r||"successful"),{err:r}}async updateMenu(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.updateMenu",e,t);let{err:r}=await FSBL.Clients.RouterClient.query(`${n}.updateMenu`,{menuId:e,menuConfig:t});return await this.syncMenuConfig(),FSBL.Clients.Logger.log("SmartDesktopClient.updateMenu result",r||"successful"),{err:r}}async deleteApp(e){FSBL.Clients.Logger.log("SmartDesktopClient.deleteApp",e);let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.deleteApp`,{appName:e});return FSBL.Clients.Logger.log("SmartDesktopClient.deleteApp result",t||"successful"),{err:t}}async deleteMenu(e){FSBL.Clients.Logger.log("SmartDesktopClient.deleteMenu",e);let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.deleteMenu`,{menuId:e});return await this.syncMenuConfig(),FSBL.Clients.Logger.log("SmartDesktopClient.deleteMenu result",t||"successful"),{err:t}}async updateTheme(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateTheme",e);let{err:t}=await FSBL.Clients.RouterClient.query(`${n}.updateTheme`,{theme:e});return FSBL.Clients.Logger.log("SmartDesktopClient.updateTheme result",t||"successful"),{err:t}}static onThemeUpdated(e){return FSBL.Clients.RouterClient.addListener(`${r}.themeUpdate`,e),FSBL.Clients.Logger.log("SmartDesktopClient.onThemeUpdated",e),()=>FSBL.Clients.RouterClient.removeListener(`${r}.themeUpdate`,e)}async uploadAssets(e,t){FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets",e);const n=await this.applicationRoot();return new Promise((r=>{const o=`${n}/project/assets`,s=new FormData,a=[];for(let t=0;t<e.length;t++){let n=e[t];const o={key:`file-${t}`,name:n.file.name,type:n.file.type,size:n.file.size,targetPath:n.targetPath};let u=null,l=[];if(-1===n.type.indexOf(i.Image)||/\.(jpe?g|png)$/i.test(n.file.name)||(l.push("PNG"),l.push("JPEG")),-1===n.type.indexOf(i.GIF)||/\.(gif)$/i.test(n.file.name)||l.push("GIF"),-1===n.type.indexOf(i.Icon)||/\.(ico)$/i.test(n.file.name)||l.push("ICO"),l.length>0&&(u=`File must be of type ${[l.pop(),l.length>0?`${l.join(", ")} or `:""].reverse().join("")}`),u)return FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets wrong image type",u),r({err:u,paths:[]});FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets append",o.key,n.file),s.append(o.key,n.file),a.push(o)}s.append("assets",JSON.stringify(a));var u=new XMLHttpRequest;FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets put",s,o),u.open("PUT",o,!0),u.addEventListener("progress",(e=>{t(Math.round(e.loaded/e.total*100))})),u.onreadystatechange=()=>{if(u.readyState===XMLHttpRequest.DONE)if(t(100),200!==u.status)FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets Failed Response",u.response),r({err:`Got response code: ${u.status}`,paths:[]});else try{const e=JSON.parse(u.response);FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets Response",u.response),r({err:null,paths:e.paths})}catch(e){r({err:"Couldn't parse response",paths:[]})}},FSBL.Clients.Logger.log("SmartDesktopClient.uploadAssets send",s),u.send(s)}))}async uploadImages(e,t){return this.uploadAssets(e.map((e=>({file:e,type:[i.Image,i.GIF]}))),t)}async uploadImage(e,t){return new Promise(((n,r)=>{this.uploadImages([e],t).then((e=>{n({err:e.err,path:e.paths[0]})})).catch(r)}))}async updateInstallerDescription(e){FSBL.Clients.Logger.log("SmartDesktopClient updateInstallerDescription",e);let{err:t}=await FSBL.RESTUtils.httpPatch("/project/installer",e);return FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerDescription Response",t||"successful"),{err:t}}async updateProjectSettings(e){console.log("SmartDesktopClient updateProjectSettings",e);let{err:t}=await FSBL.RESTUtils.httpPatch("/project/settings",e);return{err:t}}async getProjectSettings(){return(await FSBL.RESTUtils.httpGet("/project/settings")).getData}progressIndicator(e){FSBL.Clients.Logger.log("SmartDesktopClient.progressIndicator Console-Only",e),console.log("Console-Only Progress Indicator:",e)}async updateToolbarIcon(e){const t="assets/img/Finsemble_Toolbar_Icon.png";FSBL.Clients.Logger.log("SmartDesktopClient.updateToolbarIcon",t,e);let{err:n,paths:r}=await this.uploadAssets([{file:e,type:[i.Image,i.GIF],targetPath:t}],this.progressIndicator);return n||FSBL.Clients.RouterClient.transmit("Finsemble-ui-change.toolbarIconUpdate",{}),FSBL.Clients.Logger.log("SmartDesktopClient.updateToolbarIcon result",n||"successful"),{err:n,path:r[0]}}async updateTaskbarIcon(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateTaskbarIcon",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Image],targetPath:"assets/img/Finsemble_Taskbar_Icon.png"}],this.progressIndicator);return t||FSBL.Clients.RouterClient.transmit("Finsemble-ui-change.taskbarIconUpdate",{}),FSBL.Clients.Logger.log("SmartDesktopClient.updateTaskbarIcon result",t||"successful"),{err:t,path:n[0]}}async updateSystemTrayIcon(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateSystemTrayIcon",e);let{err:t,paths:r}=await this.uploadAssets([{file:e,type:[i.Image],targetPath:"assets/img/Finsemble_SystemTray_Icon.png"}],this.progressIndicator),{err:o}=await FSBL.Clients.RouterClient.query(`${n}.refreshSystemTrayIconConfig`,{});FSBL.Clients.Logger.log("SmartDesktopClient.updateSystemTrayIcon result",t||o?{error1:t,error2:o}:"successful");const s=t||o||null;return{err:s?s.toString():null,path:r[0]}}async updateInstallerIcon(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerIcon",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Icon],targetPath:"assets/img/installer_icon.ico"}],this.progressIndicator);return FSBL.Clients.Logger.log("SmartDesktopClient.updateSystemTrayIcon result",t||"successful"),{err:t,path:n[0]}}async updateInstallerGraphic(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerGraphic",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Image,i.GIF],targetPath:"assets/img/installer_spinner.gif"}],this.progressIndicator);return FSBL.Clients.Logger.log("SmartDesktopClient.updateInstallerGraphic result",t||"successful"),{err:t,path:n[0]}}async updateSplashScreen(e){FSBL.Clients.Logger.log("SmartDesktopClient.updateSplashScreen",e);let{err:t,paths:n}=await this.uploadAssets([{file:e,type:[i.Image,i.GIF],targetPath:"assets/img/FinsembleSplash.png"}],this.progressIndicator);return FSBL.Clients.Logger.log("SmartDesktopClient.updateSplashScreen result",t||"successful"),{err:t,path:n[0]}}static async updateThemeVariable(e,t){const n={};n[e]=t;const r=new o;return FSBL.Clients.Logger.log("SmartDesktopClient.updateThemeVariable",n),r.updateTheme(n)}async createProjectZip(e,t){const n=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.createProjectZip",n),new Promise(((r,i)=>{const o=t=>{const o=`${n}/project/${e}/zip?targetPath=${encodeURIComponent(t)}`;FSBL.Clients.Logger.log(o),fetch(o).then((e=>e.json())).then((e=>{r(e.file)})).catch(i)};t?o(t):finsembleWindow?finsembleWindow.showNativeOpenDialog({title:"Select an output directory",buttonLabel:"Save .zip file",properties:["openDirectory"]},((e,t)=>{t?.[0]?.filePaths?.length>0?o(t?.[0]?.filePaths[0]):i("No file selected")})):i("No finsembleWindow object")}))}async copyProjectFiles(e,t){const n=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.createProjectZip",n),new Promise(((r,i)=>{const o=t=>{const o=`${n}/project/${e}/copy?targetPath=${encodeURIComponent(t)}`;FSBL.Clients.Logger.debug(`copyProjectFiles: copying ${t}, ${o}`),fetch(o).then((e=>e.json())).then((e=>{e.error?i(e.error):r(e.files)})).catch(i)};t?o(t):finsembleWindow?finsembleWindow.showNativeOpenDialog({title:"Select Seed Project",buttonLabel:"Copy to Seed Project",properties:["openDirectory"]},((e,t)=>{t?.[0]?.filePaths?.length>0?o(t?.[0]?.filePaths[0]):i("No file selected")})):i("No finsembleWindow object")}))}async selectProjectPath(){return new Promise(((e,t)=>{finsembleWindow?finsembleWindow.showNativeOpenDialog({title:"Select Seed Project",buttonLabel:"Select Seed Project",properties:["openDirectory"]},((n,r)=>{if(r?.[0]?.filePaths?.length>0){const t=r?.[0]?.filePaths[0];FSBL.Clients.Logger.log("SmartDesktopClient.selectProjectPath",t),e(t)}else t("No file selected")})):t("No finsembleWindow object")}))}static checkValidProjectName(e){return/^[a-zA-Z0-9 \-_.]{1,}$/.test(e)&&/[a-zA-Z0-9]{1,}/.test(e)}static checkValidURL(e){return 0===e.length||/^https?:\/\/[^\s]+$/.test(e)}async publishToCosaicCloud(e){const t=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.publishToCosaicCloud",t),new Promise((async(n,r)=>{const i=`${t}/project/publish/cosaicCloud?uuid=${encodeURIComponent(e||"")}`,o=await fetch(i,{method:"PUT"}),s=await o.json();o.ok?n(s):r(s)}))}async getPublishProgress(){const e=await this.applicationRoot();return FSBL.Clients.Logger.log("SmartDesktopClient.getPublishProgress",e),new Promise(((t,n)=>{fetch(`${e}/project/publish/progress`).then((e=>e.json())).then((e=>{t(e)})).catch(n)}))}async resetProject(){const e=await this.applicationRoot();FSBL.Clients.Logger.log("SmartDesktopClient.resetProject",e);const t=`${e}/project/reset`,n=await fetch(t,{method:"PUT"}),r=await n.json(),i=n.ok?null:new Error(r.message);return n.ok&&FSBL.restartApplication(),[i,r]}async getAuthenticationProviders(){const e=await this.applicationRoot();FSBL.Clients.Logger.log("SmartDesktopClient.getAuthenticationProviders",e);const t=`${e}/authentication`,n=await fetch(t,{method:"get",headers:{Accept:"application/json"}}),r=await n.json();return r&&Array.isArray(r.providers)?r.providers:[]}async setAuthenticationProviders(e){const t=await this.applicationRoot();FSBL.Clients.Logger.log("SmartDesktopClient.setAuthenticationProviders",t);const n=`${t}/authentication`,r=await fetch(n,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({authenticationProviders:e})}),i=await r.json();return r.ok?null:new Error(i.message)}}t.default=o},3862:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const i=r(n(2169)),o=r(n(3712)),s=r(n(2551)),a=n(2669),u=n(4232),l=i.default(1);class c extends a._BaseClient{constructor(){super(...arguments),this.clientReady=!1,this.delete=this.remove}setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function="),this.routerClient.query("Storage.setUser",{user:e.user},((n,r)=>{(n?s.default.system.error:s.default.system.info)("APPLICATION LIFECYCLE:StorageClient.setUser",e,n,r),t&&t(n,r.data)}))}setStore(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t),this.routerClient.query("Storage.setStore",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.setStore",e,n),t&&t(e,n.data)}))}save(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function="),this.routerClient.query("Storage.save",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("Storage.save",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}save1(e){return l((()=>this.save(e)))}get(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.get",e,((e,i)=>{if(e)return s.default.system.error("Storage.get",e,i),t&&t(e,i?i.data:null),r(e,i?i.data:null);s.default.system.info("Storage.get",e,i),t&&t(e,i.data),n(i.data)}))}))}get1(e,t){return l((()=>this.get(e,t)))}keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t),this.routerClient.query("Storage.keys",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.keys",e,n),t&&t(e,n.data)}))}keys1(e){return l((()=>u.promisify(this.keys.bind(this))(e)))}getMultiple(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t),this.routerClient.query("Storage.getMultiple",e,((n,r)=>{(n?s.default.system.error:s.default.system.info)("StorageClient.getMultiple:",e,r),t&&t(n,r)}))}remove(e,t){return this.clientReady||s.default.system.error("storageClient invoked before ready"),new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.delete",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("StorageClient.delete",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}remove1(e){return l((()=>this.remove(e)))}clearCache(e){s.default.system.log("StorageClient.clearCache",e),this.routerClient.query("Storage.clearCache",null,((t,n)=>{(t?s.default.system.error:s.default.system.info)("StorageClient.clearCache",t,n),e&&e(t,n.data)}))}}t.StorageClient=c;var d=new c({onReady(e){e&&e(),d.clientReady=!0},name:"storageClient"});t.default=d},5376:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(7664),u=s(n(3862)),l=s(n(8718)),c=o(n(6420)),d=n(1742),f=n(2669),p=s(n(2551)),h=s(n(3712)),g=n(5688),m=n(3998),y=s(n(9319)),v=n(8379),w=s(n(10)),b=n(4232),S=n(89);let C;function _(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}class L extends f._BaseClient{constructor(e){super(e),this.showAtMousePosition=function(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())},h.default.args(e,"object=")&&e&&h.default.args2("params.onReady",e.onReady,"function="),this.options={},this.windowHash="",this.title=null,this.toolbarBottom=40,this.containers=[],this.componentState={},this.windowState="normal",this.hasHeader=!1,this.enableWindowsAeroSnap=!1,this.bindFunctions(),this.minimizeWithDockedWindows=this.minimize}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this),this.cacheInitialBounds=this.cacheInitialBounds.bind(this),this._setHeaderHeight=this._setHeaderHeight.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){this.setActive(!1)}onWindowFocused(){this.setActive(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",C.name),C.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:C.name}),C.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?FSBL.Clients.Logger.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes(this.getWindowNameForDocking()))))}close(e,t=(()=>{})){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=C;if(e.userInitiated&&n)return n.close(e,t);C.close(e,t)}getWindowHash(){return this.windowHash}getWindowTitle(){return this.title}retrieveMonitorDimensions(e=Function.prototype){c.getMonitor(null,(t=>{C.updateOptions({options:{monitorDimensions:t.monitorRect}}),e&&e(t.monitorRect)}))}listenForHashChanges(){d.System.hasBrowserView()||(C.updateOptions({url:window.top.location.href},(()=>{})),function(e){const{pushState:t}=e;e.pushState=function(n){"function"==typeof e.onpushstate&&e.onpushstate({state:n}),t.apply(e,arguments),C.updateOptions({url:window.top.location.href},(()=>{}))};const{replaceState:n}=e;e.replaceState=function(t){"function"==typeof e.onreplacestate&&e.onreplacestate({state:t}),n.apply(e,arguments),C.updateOptions({url:window.top.location.toString()})}}(window.history),window.addEventListener("hashchange",(()=>{C.updateOptions({url:window.top.location.toString()},(()=>{}))})))}getInitialOptions(e){this.isInAService?(this.options={},p.default.system.debug("WindowClient:getting options empty",this.options),e()):C.getOptions(((t,n)=>{t&&(n={}),C.windowOptions=n,this.options=n,p.default.system.debug("WindowClient:getting options",this.options),e()}))}cacheInitialBounds(e){if(d.System.hasBrowserView())return e();this.cacheBounds((()=>{try{if(!C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState)return e();C.updateOptions({options:{url:window.top.location.toString()}})}catch(e){p.default.system.warn('customData.foreign.components["Window Manager" is undefined')}e()}))}setInitialWindowBounds(e){p.default.system.warn("`FSBL.Clients.WindowClient.setInitialWindowBounds is deprecated and will be removed in a future version of finsemble. Use 'getInitialOptions' and 'cacheInitialBounds' instead."),a.parallel([this.getInitialOptions,this.cacheInitialBounds],e)}getWindowBounds(){return{top:C.windowOptions.defaultTop,left:C.windowOptions.defaultLeft,width:C.windowOptions.defaultWidth,height:C.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(p.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),h.default.args(e,"object")&&h.default.args2("bounds.top",e.top,"number"),e){C.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}minimize(e){this.cacheBounds((()=>{C.minimize(null,(t=>{t&&p.default.system.error("WindowClient:minimize",t),e&&e(t)}))}))}setAlwaysOnTop(e,t){C.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e=(()=>{})){C.restore(null,(t=>{t&&p.default.system.error("WindowClient:restore",t),e(t)}))}cacheBounds(e){this.getBounds(((t,n)=>{if(t)return e(),console.warn("Get bounds error.",t,"Window may not be registered with the window service");C.updateOptions({options:{cachedLeft:n.left,defaultLeft:n.left,cachedTop:n.top,defaultTop:n.top,cachedWidth:n.width,defaultWidth:n.width,cachedHeight:n.height,defaultHeight:n.height}}),e&&e(n)}))}maximize(e){C.maximize(),e()}removeFinWindowEventListeners(){C.removeEventListener("maximized",this.onWindowMaximized),C.removeEventListener("restored",this.onWindowRestored),C.removeEventListener("blurred",this.onWindowBlurred),C.removeEventListener("focused",this.onWindowFocused),C.removeEventListener("close-requested",this.close),C.removeEventListener("minimized",this.onWindowMinimized)}injectDOM(e){if(p.default.system.debug("injectDOM",e),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div");t.innerHTML=`<div id="FSBLHeader"${e?` style=height:${e}`:""}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){if(e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),h.default.args(e,"object",t,"function"),C)return C.getComponentState(e,t);p.default.system.warn("Attempt to use getComponentState before component is ready or in a service"),e.windowName||(e.windowName=window.name);const n=this.getContainerHash(e.windowName);u.default.get({topic:v.WORKSPACE.CACHE_STORAGE_TOPIC,key:n},((n,r)=>{if(n)return p.default.system.error("Error retrieving window client's component state."),void t(n);const i=r;if(r&&e.field)this.componentState=i||{},t(n,i[e.field]);else{if(e.fields){const n={};for(let t=0;t<e.fields.length;t++)i[e.fields[t]]&&(n[e.fields[t]]=i[e.fields[t]]);return t(null,n)}if(r)return t(null,i);p.default.system.info("WindowClient:getComponentState:error, response, params",n,r,e),t("Not found",r)}}))}async setComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),C?C.setComponentState(e,t):this.isInAService?(t("Cannot call setComponentState in a service."),Promise.resolve()):(t("Cannot call setComponentState. The window may not be ready"),Promise.reject("The window is not yet ready to save state."))}async removeComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),(C||await g.FinsembleWindow.getInstance({name:e.windowName||window.name})).removeComponentState(e,t)}getWindowNameForDocking(){const e=C.parentWindow;return e?e.name:C.name}getContainerHash(e){return c.camelCase(this.windowHash,e)}formGroup(){C.formGroup()}registerWithDockingManager(e,t){C.parentWindow&&(p.default.system.debug("registerWithDockingManager ignore registration request if has a parent"),t&&t());const n=C.name,{uuid:r}=C;this.startedRegistrationWithDocking=!0,this.routerClient.query("DockingService.registerWindow",{name:n,uuid:r,options:e||{},windowType:"WebWindow"},(()=>{this.startedRegistrationWithDocking=!1,this.deregisterPlease&&(this.deregisterWithDockingManager(),this.deregisterPlease=!1),p.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete."),t&&t()}))}deregisterWithDockingManager(e){this.startedRegistrationWithDocking&&(this.deregisterPlease=!0);const t=C.name;this.routerClient.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})}bumpFixedElements(e){if("complete"!==document.readyState)return setTimeout((()=>{this.bumpFixedElements(e)}),100);if(!e)return;let{absolute:t,fixed:n,bumpBy:r}=e;if(!t&&!n)return;const i=document.getElementById("FSBLHeader");if(!i||0===i.children.length||!i.children[0].clientHeight)return setTimeout((()=>{this.bumpFixedElements(e)}),100);"auto"===r?r="0px":-1===new String(r).indexOf("px")&&(r=`${r}px`);const o=document.body.getElementsByTagName("*"),s=o.length;for(let e=0;e<s;e++){if("FSBLHeader"===o[e].id||o[e].classList.contains("fsbl-header"))continue;const i=window.getComputedStyle(o[e],null),s=["0","0px",0],a=i.getPropertyValue("top");t&&o[e].parentNode===document.body&&"absolute"==i.getPropertyValue("position")&&("all"==t?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==t&&s.includes(a)&&(o[e].style.top=r)),n&&"fixed"==i.getPropertyValue("position")&&("all"==n?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==n&&s.includes(a)&&(o[e].style.top=r))}}bringWindowToFront(){C.bringToFront({forceFocus:!0},(e=>{e?p.default.system.error(`WindowClient.bringWindowToFront: failure:${e}`):p.default.system.info("WindowClient.bringWindowToFront: success")}))}injectStylesheetOverride(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(C.windowOptions.customData.cssOverride)),document.body.appendChild(e)}checkIfChildApp(){if(C.windowOptions&&C.windowOptions.customData&&C.windowOptions.customData.parentUUID&&C.windowOptions.customData.parentUUID!==d.System.Application.getCurrent().uuid){const e=d.System.Application.wrap(C.windowOptions.customData.parentUUID);e.addEventListener("crashed",this.close.bind(null,!1)),e.addEventListener("initialized",this.close.bind(null,!1)),e.addEventListener("out-of-memory",this.close.bind(null,!1))}}preventUnintendedDropEvents(){function e(e){e.preventDefault()}window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&y.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,d.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&y.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,d.System.Window.getCurrent().updateOptions({resizable:!1}))};FSBL&&l.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){FSBL&&l.default.onReady((()=>{l.default.addBrowserHotkey(["ctrl","r"],C.reload)}))}addListeners(e=Function.prototype){this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),C.addListener("setParent",(()=>{p.default.system.info("WindowClient.setParent deregisterWithDockingManager"),this.deregisterWithDockingManager()})),C.addEventListener("maximized",this.onWindowMaximized),C.addEventListener("minimized",this.onWindowMinimized),C.addEventListener("restored",this.onWindowRestored),C.addEventListener("blurred",this.onWindowBlurred),C.addEventListener("focused",this.onWindowFocused),e()}updateHeaderState(e,t){this.commandChannel&&this.commandChannel(e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){C.ejectFromGroup()}setWindowTitle(e){p.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){h.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),C.setTitle(e)}getSpawnData(){if(!this.options.customData)return{};const{spawnData:e}=this.options.customData;return void 0===e?{}:e}getCurrentWindow(){return d.System.Window.getCurrent()}async getDesktopBoundingBox(e){let t=e;"string"==typeof e&&(t=document.querySelector(e));const n=t.getBoundingClientRect(),r=await C.getBounds(),i=r.data;let o,s;r.err?(o=this.options.defaultTop,s=this.options.defaultLeft):(o=i.top,s=i.left);const a={top:o+n.top,left:s+n.left,width:n.width,height:n.height,right:0,bottom:0};return a.right=a.left+a.width,a.bottom=a.top+a.height,a}isPointInBox(e,t){return t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top}isMouseOverDOMElement(e,t){this.getDesktopBoundingBox(e).then((e=>{d.System.getMousePosition(((n,r)=>{t(this.isPointInBox(r,e))}))}))}getWindowIdentifier(){var e=null;return this.options&&this.options.customData&&this.options.customData.component&&(e=this.options.customData.component.type),{windowName:C?C.name:window.name,uuid:C?C.uuid:null,componentType:e}}setActive(e){var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):_(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(_(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")}getBounds(e){C.getBounds(((t,n)=>{e(t,n)}))}setShape(e,t=Function.prototype){C.setShape(e,t)}startTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.startTilingOrTabbing",e),t()}startMovingWindow(e){d.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){d.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t=Function.prototype){console.debug("CancelTilingOrTabbing"),y.default.transmit("DockingService.cancelTilingOrTabbing",e),t()}sendIdentifierForTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.identifierForTilingOrTabbing",e),t()}stopTilingOrTabbing(e,t=Function.prototype){const n=()=>{y.default.query("DockingService.stopTilingOrTabbing",e,(()=>{t()})),y.default.transmit("DockingService.stopTilingOrTabbing",e)};return e.mousePosition?(n(),e.allowDropOnSelf?void 0:t()):d.System.getMousePosition(((r,i)=>{if(e.mousePosition=i,n(),!e.allowDropOnSelf)return t()}))}getStackedWindow(e,t){if(p.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!C.parentWindow&&e.create){const n=e=>{const{parentName:r}=e.data;C.setParent({windowName:r},((e,n)=>{t?.(e,n)})),C.removeListener("parent-set",n)};C.addListener("parent-set",n),FSBL.Clients.LauncherClient.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{p.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&t?.(e,null)}))}else C.getParent(t)}getMonitorInfo(e,t){c.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data)}))}))}fitToDOM(e,t){let n=document.documentElement.offsetHeight,r=this.options.width;"function"==typeof e&&(t=e,e=null),e&&e.padding&&(e.padding.height&&(n+=e.padding.height),e.padding.width&&(r+=e.padding.width)),e&&e.maxHeight&&n>e.maxHeight&&(n=e.maxHeight),p.default.system.debug("WindowClient.FitToDOM:newHeight",n,e),this.getMonitorInfo({},((e,i)=>{i&&(n>=i.availableRect.height&&(n=i.availableRect.height),r>=i.availableRect.width&&(r=i.availableRect.width)),p.default.system.debug("WindowClient.FitToDOM:fixBounds",n,r),C.getBounds(((e,i)=>{i.width!=r||i.height!=n?(i.width=r,i.height=n,C.setBounds({bounds:i},t)):"function"==typeof t&&t()}))}))}_setHeaderHeight(e){let t=document.getElementsByClassName("fsbl-header")[0];if(!t)return setTimeout((()=>{this._setHeaderHeight(e)}),100);let n=window.getComputedStyle(t,null).getPropertyValue("height");document.body.style.marginTop=n,e.bumpElements&&"auto"===e.bumpElements.bumpBy&&(e.bumpElements.bumpBy=n),this.bumpFixedElements(e.bumpElements)}async start(e=Function.prototype){if(h.default.args(e,"function"),b.iAmAServiceWindow())return this.isInAService=!0,e();setInterval((()=>{C&&document?.title&&this.title!==document.title&&(!FSBL.System.isBrowserView&&FSBL.System.hasBrowserView||this.setWindowTitlePrivate(document.title))}),200);const t=this;await w.default.getValue("finsemble");let n=null,r=!1,i=!1,o=!1;this.componentState={},(e=>{g.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{if(p.default.system.debug(`FinsembleWindow.getInstance ${this.finWindow?.name}`),"Cannot Wrap Service Manager or Services"==t)return this.isInAService=!0,this.windowHash=c.camelCase("activeWorkspace",window.name),e();!t&&n||p.default.system.error("wrap failure",t),this.finsembleWindow=n,({finsembleWindow:C}=this),this.windowHash=c.camelCase("activeWorkspace",C.name),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),e()}))})((()=>{this.retrieveMonitorDimensions(),this.getInitialOptions((()=>{if(!C||!C.windowOptions)return this.isInAService||p.default.system.error("Something went wrong attempting to get the current window."),e();({customData:n}=C.windowOptions),p.default.system.debug("getInitialOptions",n),n&&(r=S(n,"window.compound",!1),n.cssOverride&&(p.default.system.debug("Window has cssOverride. See local window to inspect object"),i=!0),o=!r&&S(n,["foreign","components","Window Manager","FSBLHeader"],!1)),a.parallel([function(e){i&&t.injectStylesheetOverride(),e()},function(e){w.default.getValue("finsemble",((n,r)=>{n&&p.default.system.error("Error reading windowService config from finsemble");const i=r.services.windowService.config.enableWindowsAeroSnap;t.enableWindowsAeroSnap=m.ConfigUtilInstance.getDefault(r,"config.servicesConfig.docking.enableWindowsAeroSnap",i),e()}))},function(e){if(d.System.isBrowserView())e();else{if(!n||!n.component||b.iAmAServiceWindow())return e();{let r=m.ConfigUtilInstance.getDefault(n,"customData.foreign.services.windowService.manageWindowMovement",!1);r||(r=m.ConfigUtilInstance.getDefault(n,"customData.foreign.services.dockingService.manageWindowMovement",!1));const i=m.ConfigUtilInstance.getDefault(n,"customData.foreign.components.Window Manager.FSBLHeader",!1),o=m.ConfigUtilInstance.getDefault(n,"customData.window.dockable",!1);r=r||i||o;let s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangable"},null);if(null===s&&(s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangeable"},r)),!r&&!s)return e();if(n.window.allowAutoArrange=s,n.window.snapping=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowSnapping",oldValue:"ignoreSnappingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreSnappingRequests&&(n.window.snapping=!n.foreign.services[e].ignoreSnappingRequests)}if(m.ConfigUtilInstance.getDefault(n,"customData.window.ephemeral",!1)&&!n.window.snapping&&(n.window.snapping=!1),n.window.tiling=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTiling",oldValue:"ignoreTilingAndTabbingRequests"},r),n.window.tabbing=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTabbing",oldValue:"ignoreTilingAndTabbingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreTilingAndTabbingRequests&&(n.window.tiling=!n.window.tiling,n.window.tabbing=!n.window.tabbing)}n.window.canGroup=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowGrouping",oldValue:"canGroup"},r),n.window.canMinimize=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowMinimize",oldValue:"canMinimize"},void 0),void 0===n.window.canMinimize&&(n.window.canMinimize=n.component.canMinimize,void 0===n.window.canMinimize&&(n.window.canMinimize=r)),void 0===n.window.canMaximize&&(n.window.canMaximize=n.component.canMaximize,void 0===n.window.canMaximize&&(n.window.canMaximize=r)),n.window.overwriteStartDocked=m.ConfigUtilInstance.getDefault(n,"customData.foreign.services.workspaceService.global",!1),t.registerWithDockingManager(n.window,(()=>{t.cacheInitialBounds(e)}))}}}],((t,n)=>e(t,n)))}))}))}}var A=new L({startupDependencies:{clients:["storageClient"]},onReady(e){A.start(e)},name:"windowClient"});t.default=A},6008:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(2669),u=o(n(6420)),l=s(n(3712)),c=s(n(2551)),d=n(8379),f=n(3998),p=s(n(3014));class h extends a._BaseClient{constructor(e){super(e),this.workspaces=[],this.setWorkspaces=this.setWorkspaceOrder,this.createNewWorkspace=this.createWorkspace,this.getWorkspaceDefinition=this.export,this.addWorkspaceDefinition=this.import,this.saveWorkspaceTemplateToConfigFile=this.exportToFile,l.default.args(e,"object=")&&e&&l.default.args2("params.onReady",e.onReady,"function="),this.publicEventManager=new p.default({name:"workspaceClient",sourceType:"workspace"})}_serviceResponseHandler(e,t,n,r,i=Function.prototype){if(e)return r(new Error(e)),i(e);t||(t={data:null}),n(t.data),i(null,t.data)}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}async addWindow(e,t=null){l.default.args(e,"object",t,"function=")&&e&&l.default.args2("params.name",e.name,"string");const{err:n,response:r}=await this.routerClient.query("WorkspaceService.addWindow",e,(()=>{}));if(c.default.system.log(`WORKSPACE LIFECYCLE: Window added:WorkspaceClient.addWindow: Name (${e.name})`),t&&t(n,r),!t&&n)throw n;return r}removeWindow(e,t=Function.prototype){l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),this.routerClient.query("WorkspaceService.removeWindow",e,((n,r)=>{if(n)return c.default.system.error(n);c.default.system.log(`WORKSPACE LIFECYCLE:WorkspaceClient.removeWindow:Window removed: Name (${e.name})`),t(n,r?r.data:null)}))}autoArrange(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{},u.getMyWindowIdentifier((e=>{this.routerClient.query("DockingService.autoArrange",{windowIdentifier:e},t)}))}minimizeAll(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.minimizeAll",e,t)}))}bringWindowsToFront(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.bringWindowsToFront",e,t)}))}async getActiveWorkspace(e){if(c.default.system.debug("WorkspaceClient.getActiveWorkspace"),this.activeWorkspace)return c.default.system.info("WorkspaceClient.getActiveWorkspace - returning from cache"),e&&e(null,{data:this.activeWorkspace}),{data:this.activeWorkspace};const{response:t}=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE,{});if(this.activeWorkspace=t.data,t.data.err)throw e&&e(t.data.err),new Error(t.data.err);return e&&e(null,{data:t.data??{}}),{data:t.data}}getWorkspaces(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaces"),new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACES,{},((r,i)=>{this._serviceResponseHandler(r,i,t,n,e)}))}))}getWorkspaceActions(e){return e(null,d.WORKSPACE.API_CHANNELS)}getWorkspaceNames(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaceNames"),this.workspaces?(c.default.system.info("WorkspaceClient.getWorkspaceNames - returning from cache"),Promise.resolve(this.workspaces)):new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACE_NAMES,{},((r,i)=>{this._serviceResponseHandler(r,i,t,n,e)}))}))}setWorkspaceOrder(e,t){const{workspaces:n}=e;return l.default.args(t,"function"),c.default.system.debug("WorkspaceClient.setWorkspaceOrder",e),new Promise(((r,i)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WORKSPACE_ORDER,n||e,((e,n)=>{this._serviceResponseHandler(e,n,r,i,t)}))}))}remove(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&!e.name&&!e.workspace&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.remove",e),new Promise((async(n,r)=>{e.name||(e.name=e.workspace?.name,delete e.workspace);const i=(await this.getActiveWorkspace()).data;if(e.name===i.name){c.default.system.error(`APPLICATION LIFECYCLE: Cannot remove active workspace: WorkspaceClient.remove:attempt to remove active workspace name:${i.name}`);const e="Cannot remove active workspace";return this._serviceResponseHandler(e,null,n,r,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.REMOVE,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}rename(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.oldName",e.oldName,"string","params.newName",e.newName,"string"),c.default.system.debug("WorkspaceClient.rename",e),new Promise(((n,r)=>{if(!e.overwriteExisting&&this.workspaceExists(e.newName)){const e="Workspace Already Exists";return this._serviceResponseHandler(e,null,n,r,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.RENAME,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}clone(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),delete e.name,e.newName||(e.newName=`${e.name}_clone`),e.removeOldWorkspace=!1,this.rename({removeOldWorkspace:!1,newName:e.newName,oldName:e.name},t)}save(e=Function.prototype){return c.default.system.debug("WorkspaceClient.save"),new Promise(((t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE,{},((r,i)=>{this._serviceResponseHandler(r,i,t,n,e)}))}))}workspaceExists(e){return l.default.args(e,"string"),this.workspaces.indexOf(e)>-1}saveAs(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.saveAs",e),new Promise(((n,r)=>{if(!e.force&&this.workspaceExists(e.name))return this._serviceResponseHandler("Workspace Already Exists",null,n,r,t);this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_AS,e,((e,i)=>{this._serviceResponseHandler(e,i,n,r,t)}))}))}async switchTo(e,t=Function.prototype){l.default.args(e,"object",t,"function")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.switchTo",e);const n=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.SWITCH_TO,e);if(n.err)throw t(n.err,null),new Error(n.err);return t(n),n}async _setWindowState(e){if(!this.activeWorkspace)throw"Workspace is not yet ready";if(!this.activeWorkspace.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";return c.default.system.debug("WorkspaceClient.setWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WINDOW_STATE,e)}async _getWindowState(e){return c.default.system.debug("WorkspaceClient.getWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WINDOW_STATE,e)}async isWorkspaceDirty(e=Function.prototype){l.default.args(e,"function"),c.default.system.debug("WorkspaceClient.isWorkspaceDirty");const{err:t,response:n}=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE_DIRTY,{},(()=>{}));return e(t,n),n.data}async createWorkspace(e,t,n=((e,t)=>{e&&(c.default.system.error(`Error creating workspace: ${e}`),c.default.system.info(`Result from create workspace: ${t}`))})){c.default.system.log(`WorkspaceClient: Creating Workspace Request for name "${e}"`);const r=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.NEW_WORKSPACE,{workspaceName:e})).response.data;!1!==t.switchAfterCreation&&await this.switchTo({name:r});const i={workspaceName:r};return n(null,i),i}export(e,t){return l.default.args(e,"object",t,"function")&&l.default.args2("params.workspaceName",e.workspaceName,"string"),c.default.system.debug("WorkspaceClient.export",e),new Promise(((n,r)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.EXPORT,e,((i,o)=>{const s={};s[e.workspaceName]=o.data,this._serviceResponseHandler(i,{data:s},n,r,t)}))}))}async import(e,t){l.default.args(e,"object",t,"function=")&&l.default.args2("params.workspaceJSONDefinition",e.workspaceJSONDefinition,"object"),c.default.system.debug("WorkspaceClient.import",e);const n=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.IMPORT,e)).response.data;if(n&&n.err)throw t(n.err),new Error(n.err);return t&&t(null,n),n}exportToFile(e){c.default.system.info("workspaceClient.saveWorkspaceTemplateToConfigFile",e),l.default.args(e,"object")&&l.default.args2("params.workspaceTemplateDefinition",e.workspaceTemplateDefinition,"object");const{workspaceTemplateDefinition:t}=e;if("object"==typeof t){const e=Object.keys(t)[0];if(e&&t[e].templateDefinitionFlag){const n={workspaceTemplates:t};f.ConfigUtilInstance.promptAndSaveJSONToLocalFile(`workspaceConfig-${e}`,n)}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile. Input is not a legal template")}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile: Input is not a legal object")}async start(e){this.routerClient.subscribe(d.WORKSPACE.UPDATE_PUBSUB,((t,n)=>{c.default.system.debug(`${d.WORKSPACE.UPDATE_PUBSUB} response`,t,n),t?c.default.system.error(t):(this.activeWorkspace=n.data.activeWorkspace,this.workspaces=n.data.workspaces,e&&e())}))}}let g=new h({onReady:e=>{g.start(e)},name:"workspaceClient"});t.default=g},6192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window},5959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.httpDelete=t.httpPatch=t.httpPut=t.httpPost=t.httpGet=void 0;const n=200;t.httpGet=async function(e){let t=null,r=null;return await fetch(e).then((r=>{if(r.status==n)return r.json();t=`http get err for ${e}: ${r.status} ${r.statusText}`})).then((e=>{r=e})).catch((e=>{t=e})),{err:t,getData:r}},t.httpPost=async function(e,t){let r=null;return await fetch(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then((t=>{t.status!=n&&(r=`http post err for ${e}: ${t.status} ${t.statusText}`)})).catch((e=>{r=e})),{err:r}},t.httpPut=async function(e,t){let r=null;return await fetch(e,{method:"PUT",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then((t=>{t.status!=n&&(r=`http put err for ${e}: ${t.status} ${t.statusText}`)})).catch((e=>{r=e})),{err:r}},t.httpPatch=async function(e,t){let r=null;return await fetch(e,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then((t=>{t.status!=n&&(r=`http patch err for ${e}: ${t.status} ${t.statusText}`)})).catch((e=>{r=e})),{err:r}},t.httpDelete=async function(e){let t=null;return await fetch(e,{method:"DELETE"}).then((r=>{r.status!=n&&(t=`http delete err for ${e}: ${r.status} ${r.statusText}`)})).catch((e=>{t=e})),{err:t}}},4971:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t)=>{const r=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(r)>-1||(n.g[r]=new t),n.g[r]}},8379:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeysClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(n=t.WINDOWSTATE||(t.WINDOWSTATE={}))[n.NORMAL=0]="NORMAL",n[n.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",n[n.MAXIMIZED=2]="MAXIMIZED",n[n.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",n[n.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","compositeComponentData"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},3854:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const i=n(5939),o=r(n(9319)),s=n(8379),a=r(n(5020)),u=r(n(2551));class l extends i.EventEmitter{constructor(e){super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),delete this.startupTimer}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout")}),1e4)}}function c(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class d{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=c();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new l({dependencies:e,callback:t});return r.setStartupTimer(),r.on("timeout",(()=>{this.onDependencyTimeout(r)})),this.dependencies[n]=r,this.checkDependencies(),r}onDependencyTimeout(e){const t=this.getOfflineClients();let n="APPLICATION LIFECYCLE:STARTUP:Dependency not online after 10 seconds.";t.length&&(n=`${n} Waiting for these clients: ${t.join(", ")}.`),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:r}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),r&&r())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=c();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(u.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class p extends i.EventEmitter{constructor(){super(),this.startup=new d,this.shutdown=new f,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=p,t.FSBLDependencyManagerSingleton=new p,t.default=t.FSBLDependencyManagerSingleton},4232:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.removeKeys=t.toRecord=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.getProp=t.composeRL=t.instrumentPromise=t.promisify=t.identity=t.isNumber=t.chunkArray=t.Timeout=t.mockLogger=t.capitalizeFirst=t.clone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const i=n(586),o=r(n(89)),s=r(n(5892)),a=r(n(7184)),u=r(n(5162)),l=n(3998),c=r(n(2551)),d=window;function f(e,t){if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return t("clone error",e),e}}function p(e,t){return new Promise(((n,r)=>{const i=setTimeout((()=>{clearTimeout(i),r(t)}),e)}))}function h(e,t,n){return`${e}.${t}.${n}`}function g(e,t,n){const r=`${h(e.baseString,e.newPath,e.newValue)}`;c.default.system.deprecated(`${h(e.baseString,t,n)} has been deprecated in favor of ${r}`)}t.guuid=function(){return i.v4()},t.iAmAServiceWindow=function(){return!(!d.finsembleServices||!d.finsembleServices.length)},t.isServiceInWindow=function(e){return d.finsembleServices&&d.finsembleServices.find((t=>t.name===e))},t.clone=f,t.capitalizeFirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.mockLogger=new class{constructor({debug:e}={debug:!0}){e?(this.system=console,this.system.debug=console.log):this.system={warn:Function.prototype,debug:Function.prototype,log:Function.prototype,info:Function.prototype,error:console.error}}isLogMessage(){return!0}start(){}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.chunkArray=function(e,t){if(e<=0)throw new Error("Can't chunk array by number less than 0");return t.reduce(((n,r,i)=>{if(i%e==0){const r=[];for(let n=i;n<i+e;n++)n<t.length&&r.push(t[n]);n.push(r)}return n}),[])},t.isNumber=function(e){return!(!e||Number.isNaN(Number(e)))&&Number(e)},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((r,i)=>{n.push(((e,t)=>e?i(e):r(t))),e.apply(t,n)}))}},t.instrumentPromise=async(e,t,n)=>{const r=`${t} end`;return e(`${t} start`),n.then((()=>e(r)))},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getProp=function e(t,n,r){const i=Array.isArray(n)?n:n.split(".").filter((e=>e.length));return i.length?e(t[i.shift()],i,r):void 0===t?r:t},t.getRandomWindowName=function(e="RouterClient"){return`${e}-${i.v4()}`},t.timeoutPromise=p,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,p(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===(o.default(e,"windowIdentifier.windowType")||e.windowType)},t.toRecord=function(e,t){const n="string"==typeof e?t=>t[e]:e;return t.reduce(((e,t)=>(e[n(t)]=t,e)),{})},t.removeKeys=function(e,t){if(!e)return e;const n=Object.keys(e).filter((e=>!t.includes(e)));return s.default(e,n)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],r=s.default(e,n),i=s.default(t,n);return!!a.default(r,i)},t.sleep=function(e,t=!1){return new Promise(((n,r)=>{t?setTimeout((()=>{try{r("timeout expired")}catch{}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=function(e,t){const n=f(e,Function.prototype),r=f(t,Function.prototype);return u.default(n,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return u.default(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:r,oldPath:i,newPath:o,oldValue:s,newValue:a}=t;let u=l.ConfigUtilInstance.getDefault(e,h(r,o,a),null);return null===u&&(u=l.ConfigUtilInstance.getDefault(e,h(r,o,s),null),u?g(t,o,s):(u=l.ConfigUtilInstance.getDefault(e,h(r,i,a),null),u?g(t,i,a):(u=l.ConfigUtilInstance.getDefault(e,h(r,i,s),null),u?g(t,i,s):u=n))),u}},9459:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(9319)),u=o(n(8379));t.default=class{constructor(e,t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=t.data.guid,this.internalHandler()}async internalHandler(){this.data=this.queryMessage.data.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?(this.delayed=!0,this.queryMessage.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){this.completed=!0,this.delayed?a.default.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):this.queryMessage.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},3014:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(9319)),o=r(n(2551)),s=r(n(7815)),a=r(n(3601)),u=n(4232);class l extends s.default{constructor(e){super(e),this.eventList=[],this.eventHandlerMap={},this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.waitList={},i.default.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerListener(t?.data.event,t?.data.listenerGuid)})),i.default.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterListener(t?.data.event,t?.data.listenerGuid)}))}registerListener(e,t){this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t)}unregisterListener(e,t){this.remoteListenerEventMap[e]||o.default.system.warn("not found"),this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t))}awaitRemoteDelayer(e,t){return new Promise(((n,r)=>{const o=(s,a)=>{i.default.removeListener(`Finsemble.Listener.Done.${e}.${t}`,o),!0===a.data.canceled?r("canceled"):n(a.data.data)};this.waitList[e]=o,i.default.addListener(`Finsemble.Listener.Done.${e}.${t}`,o)}))}async queryRemoteListener(e,t,n,r){const o=`${window.name}_private_${Date.now()}_${Math.random()}`,s={event:e,guid:o,data:n},a=this.awaitRemoteDelayer(o,t);let{response:l}=await Promise.race([i.default.query(`Finsemble.Interrupt.${t}`,s,(()=>{})),u.sleep(r.initialQueryTimeout,!0)]).catch((()=>{throw i.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),"eventHandler failed initial response"}));if(l.header.error)return;let c=!0;if(!0===l.data.delayed)try{return c=!1,await Promise.race([a,u.sleep(r.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";c=!0}if(c&&i.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),!0===l.data.canceled)throw"event was canceled";return l.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){o.default.verbose(`Triggering ${e} for ${this.name}`,t);const r=[];if(this.remoteListenerEventMap[e])for(let i of this.remoteListenerEventMap[e])r.push(this.queryRemoteListener(e,i,t,n));if(this.eventHandlerMap[e]){const i=[...this.eventHandlerMap[e]],o=[...this.eventGuidMap[e]];for(let s=0;s<i.length;s++){const u=i[s],l=o[s],c=new a.default({source:this.name,sourceType:this.sourceType,handler:u,event:e,data:t,options:n,guid:l});r.push(c.complete)}}try{return await Promise.all(r)}catch(e){if("eventHandler failed initial response"!==e)throw"event was canceled";console.error(e)}}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_private_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n)}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("Trying to remove non-existent listener");let n=this.eventHandlerMap[e].indexOf(t);-1!==n&&(this.eventGuidMap[e][n],this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1))}cleanup(){}}t.default=l},3601:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(8379));t.default=class{constructor(e){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.data=e.data,this.guid=e.guid,s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled():this.eventComplete(e)}}},7815:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(9319)),o=r(n(2551)),s=r(n(9459));t.default=class{constructor(e){this.eventList=[],this.eventHandlerMap={},this.eventGuidMap={},this.name=e.name,this.sourceType=e.sourceType,window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_public_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n),i.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n}),i.default.addResponder(`Finsemble.Interrupt.${n}`,((r,i)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},i)}))}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("not found");let n=this.eventHandlerMap[e].indexOf(t);if(-1!==n){const t=this.eventGuidMap[e][n];this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1),i.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${window.name}`,{event:e,guid:t}),i.default.removeResponder(`Finsemble.Interrupt.${t}`)}}cleanup(){for(var e of Object.keys(this.eventHandlerMap))for(var t of this.eventHandlerMap[e])this.removeEventListener(e,t)}}},631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},2283:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(r=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",r.SNOOZE="SNOOZE",r.SPAWN="SPAWN",r.QUERY="QUERY",r.PUBLISH="PUBLISH",r.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},5016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.include=[],this.exclude=[]}}},1376:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},5320:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(1376));t.default=class{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new i.default,this.stateHistory=[]}}},2521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.id=e||null,this.filter=t}}},7673:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.is=t.log=t.createReducer=t.executeReducerBuilderCallback=t.unImmer=void 0;const i=n(8096),o=n(2956),s=r(n(2551));t.unImmer=e=>JSON.parse(JSON.stringify(e));const a=e=>{switch(e.type){case"RUN":return(e=>{let t={RUN:e.func.name};return e.args&&e.args.length>0&&(e.args.some((e=>"object"==typeof e))?t.args=e.args:t.args=e.args.join(" ")),e.successActionCreator&&(t.successActionCreator=e.successActionCreator.name),e.failActionCreator&&(t.successActionCreator=e.failActionCreator.name),t})(e);case"LIST":return{...e,cmds:e.cmds.map(a)};case"MAP":return{...e,tagger:e.tagger.name,nestedCmd:a(e.nestedCmd)};case"ACTION":return(e=>{const{type:t,...n}=e.actionToDispatch;return{ACTION:t,...n}})(e);case"NONE":default:return e}};class u{constructor(){this.commands=[]}run(...e){let t=o.Cmd.run(...e);return this.commands.push(t),t}action(e){let t=o.Cmd.action(e);return this.commands.push(t),t}list(...e){let t=o.Cmd.list(...e);return this.commands.push(t),t}map(e,t,n){let r=o.Cmd.map(e,t,n);return this.commands.push(r),r}clearTimeout(e){let t=o.Cmd.clearTimeout(e);return this.commands.push(t),t}clearInterval(e){let t=o.Cmd.clearInterval(e);return this.commands.push(t),t}setTimeout(e,t,n){let r=o.Cmd.setTimeout(e,t,n);return this.commands.push(r),r}setInterval(e,t,n){let r=o.Cmd.setInterval(e,t,n);return this.commands.push(r),r}}function l(e){const t={},n={addNoImmerCase(e,r){const i="string"==typeof e?e:e.type;return t[i]=(t[i]??[]).concat({reducer:r}),n},addCase(e,r){const i="string"==typeof e?e:e.type;return t[i]=(t[i]??[]).concat({loopReducer:r}),n}};return e(n),t}t.executeReducerBuilderCallback=l,t.createReducer=function(e,t){const n=l(t);return function(t=e,r){const l=n[r.type];if(!l?.length)return t;let c=[];const d=l.reduce(((e,t)=>{r.type.includes("/heartbeat")?s.default.system.debug(`Interop.${r.type}`,r):s.default.system.debug(`Interop.${r.type}`,e,r);const n=e=>{c=c.concat(e.commands)},a=new u;if(t){const{reducer:s,loopReducer:u}=t;if(s){const t=s(e,r);return o.isLoop(t)?(l=t[1],c=c.concat([l]),t[0]):t}if(u){if(!i.isDraft(e)){if(i.isDraftable(e))return i.produce(e,(e=>{u(e,r,a),n(a)}));{let t;if(u&&(t=u(e,r,a)),void 0===t){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n(a),t}}u(e,r,a),n(a)}}var l;return e}),t),f=o.Cmd.list(c),{"@@cmds":p,...h}=d,g=f.cmds.length>1?{...h,"@@cmds":f.cmds.map((e=>a(e)))}:1==f.cmds.length?{...h,"@@cmds":a(f.cmds[0])}:h;return o.loop(g,f)}},t.log=(e,t)=>{t?console.log(e,JSON.parse(JSON.stringify(t))):console.log(e,t)},t.is=e=>t=>t.type===e.type},8774:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createReducer=t.remoteReduxServerEnhancer=t.remoteReduxClientEnhancer=void 0;var r=n(9200);Object.defineProperty(t,"remoteReduxClientEnhancer",{enumerable:!0,get:function(){return r.remoteReduxClientEnhancer}}),Object.defineProperty(t,"remoteReduxServerEnhancer",{enumerable:!0,get:function(){return r.remoteReduxServerEnhancer}});var i=n(7673);Object.defineProperty(t,"createReducer",{enumerable:!0,get:function(){return i.createReducer}})},9200:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.remoteReduxServerEnhancer=t.remoteReduxClientEnhancer=void 0;const i=r(n(9319)),o=n(8379),s=r(n(2551)),a=n(2956);t.remoteReduxClientEnhancer=({server:e,slice:t})=>n=>(r,o)=>{const a=n(((e,t)=>("@@finsemble/updateState"===t.type&&(e=t.newState),{...r(e,t)})),o),u={...a,dispatch:t=>(s.default.system.log(`Interop.remote.${t.type}`,a,t),"@@finsemble/updateState"==t.type?a.dispatch(t):t.type?i.default.query(e,t):t.then&&t.then(a.dispatch),t)},l=`${Date.now()}_${Math.random()}`;i.default.addListener(l,((e,t)=>{if(!e&&t){const e={type:"@@finsemble/updateState",newState:t?.data};u.dispatch(e)}}));const c=fin.desktop.Window.getCurrent().name;return i.default.query(e,{"@@finsemble/action":"subscribe","@@finsemble/slice":t,"@@finsemble/routerChannel":l,"@@finsemble/windowName":c},(()=>{})),u},t.remoteReduxServerEnhancer=({server:e})=>t=>n=>{s.default.info(`remoteReduxServerEnhancer: Starting on routerChannel ${e}`);const r={},u={},l=t(((e,t)=>{const o=n(e,t);return Object.entries(r).forEach((([e,t])=>{const n=a.getModel(o);n[e]!==u[e]&&(u[e]=n[e],t.forEach((t=>{i.default.transmit(t.routerChannel,n[e])})))})),o})),c={...l,dispatch:e=>l.dispatch(e)};return i.default.addListener(o.LAUNCHER_SERVICE.WINDOW_CLOSED,((e,t)=>{if(e)s.default.error(`remoteReduxServerEnhancer: Error in listenForWindowClosings() ${e}`);else{const{name:e}=t?.data;Object.keys(r).forEach((t=>{r[t]=r[t].filter((t=>t.windowName!==e)),r[t].length||delete r[t]}))}})),i.default.addResponder(e,(async(e,t)=>{if(e)s.default.error("remoteReduxServerEnhancer: Error adding responder.",e);else if(t){const{data:e,header:n}=t;e["@@finsemble/action"]?((e,t)=>{const{"@@finsemble/action":n,"@@finsemble/slice":o,"@@finsemble/routerChannel":a,"@@finsemble/windowName":c}=e;if(s.default.info(`remoteReduxServerEnhancer received ${n} for ${o} from ${c}`),"subscribe"===n){r[o]=(r[o]??[]).concat({windowName:c,routerChannel:a});const e=l.getState()?.[o];u[o]||(u[o]=e[o]),i.default.transmit(a,e)}else s.default.warn(`remoteReduxServerEnhancer: Unexpected "@@finsemble/action"=${n} received from ${t.origin}`)})(e,n):((e,t)=>{e?.type?c.dispatch({...e,"@@remoteHeader":{header:t}}):s.default.warn('remoteReduxServerEnhancer: Received invalid dispatch action. No "type" specified.',e)})(e,n),t.sendQueryResponse(null)}else s.default.error("remoteReduxServerEnhancer: No queryMessage received from remote client")})),c}},2369:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(2551)),o=n(1742),s={activeTransports:{},liveTransport:null,addTransport(e,t){this.activeTransports[e]=t,i.default.system.log(`RouterTransport ${e} added to activeTransports`)},getActiveTransports(e){const t=[];function n(e){-1===t.indexOf(e)&&t.push(e)}return o.System.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&n("SharedWorker"),n(e.sameDomainTransport),n(e.crossDomainTransport),i.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,r,i)=>new Promise(((o,a)=>{const u=s.activeTransports[t];u?s.liveTransport=new u(e,n,r,i,(e=>{o(e)})):a(`unknown router transport name: ${t}`)})),close(){s.liveTransport&&(s.liveTransport.close(),s.liveTransport=null)}},a=function(e,t,n,r,o){let s;const a=this;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),i.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){i.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=function(){return"SharedWorker"};const u=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;i.default.system.log(`SharedWorker Transport Initializing for ${n} using ${u}`),console.log(`SharedWorker Transport Initializing for ${n} using ${u}`),s=new SharedWorker(u,{name:"Finsemble",credentials:"include"}),s.port.onmessage=function(e){const n=e.data[0],r=e.data[1],o={transportID:a.identifier(),port:n};i.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",r),t(o,r)},s.onerror=function(e){i.default.system.error(`SharedWorkerTransport Transport Error${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>{s.port.close()},o(this)},u=function(e,t,n,r,s){const{uuid:a}=o.System.Application.getCurrent(),u=this;this.send=function(e,t){let n;1===arguments.length?(n=r,t=arguments[0]):(n=e.name,t=arguments[1]),i.default.system.verbose("IPCTransport Outgoing Transport",a,n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=function(){return"IPCBus"},i.default.system.log(`IPCBus Transport Initializing for ${n}`),console.log(`IPCBus Transport Initializing for ${n}`);const l=o.System.InterApplicationBus.subscribe("*",n,(function(e,n){const r={transportID:u.identifier(),senderUuid:n,name:e.header.origin};i.default.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(function(e){i.default.system.error(`IPCBus Subscribe Failure: ${e}`)}));this.close=()=>{o.System.InterApplicationBus.unsubscribe(l)},s(this)},l=function(e,t,n,r,o){const s=`${e?.transportSettings?.FinsembleTransport?.serverAddress??e?.transportSettings?.serverAddress??"ws://127.0.0.1:3376"}/router`,a=this;let u;function l(){i.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function c(){i.default.system.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),console.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),s.startsWith("ws:")||s.startsWith("wss:")||console.error(`Illegal WebSocket address "${s}" (Missing ws:// or wss:// ?)`),u=new WebSocket(s);const e=setTimeout(l,3e3);u.addEventListener("open",(()=>{clearTimeout(e),i.default.system.log("FinsembleTransport Connected to Server"),console.log("FinsembleTransport Connected to Server"),u.addEventListener("message",(e=>{const r=JSON.parse(e.data);("RouterService"===n&&"ROUTER_SERVICE"==r.dest||n===r.message.client)&&function(e){const n={transportID:a.identifier(),client:e.clientMessage.header.origin};i.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}(r.message)})),o(a)}))}this.send=function(e,t){let n,r;1===arguments.length?(n="ROUTER_SERVICE",r={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],r={client:e.client,clientMessage:t}),i.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",r),u.readyState===WebSocket.OPEN&&u.send(JSON.stringify({dest:n,message:r})),u.readyState===WebSocket.CONNECTING&&u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))})),u.readyState===WebSocket.CLOSED&&(c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},c()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",l),t.default=s},1742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const r=n(6925);class i{constructor(e,t,n){return new fin.desktop.Window(e,t)}static get getCurrent(){return fin.desktop.Window.getCurrent}static get wrap(){return fin.desktop.Window.wrap}}class o{constructor(e,t,n){t&&t()}static getCurrent(){const{windowName:e}=r.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{e&&e({})},addEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return{}}}class s{constructor(e,t,n){return new fin.desktop.Application(e,t)}static get getCurrent(){return fin.desktop.Application.getCurrent}static get wrap(){return fin.desktop.Application.wrap}}class a{constructor(e){new fin.desktop.Notification(e)}}class u{constructor(){return new fin.desktop.System.Clipboard}static get writeText(){return fin.desktop.System.Clipboard.writeText}static get writeHTML(){return fin.desktop.System.Clipboard.writeHTML}static get writeRTF(){return fin.desktop.System.Clipboard.writeRTF}static get readText(){return fin.desktop.System.Clipboard.readText}static get readHTML(){return fin.desktop.System.Clipboard.readHTML}static get readRTF(){return fin.desktop.System.Clipboard.readRTF}}class l{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return l.isFreestanding()?o:i}static get Notification(){return a}static get Clipboard(){return u}static async getMousePosition(e=Function.prototype){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),e(null,n),t(n)}),(t=>{e(t,null),n(t)}))}))}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e(n)}))}))}static container(){return"undefined"==typeof fin?"freestanding":fin.container?fin.container:"FEA"}static isBrowserView(){return!l.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!l.isFreestanding()&&fin.hasBrowserView()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get getAllApplications(){return fin.desktop.System.getAllApplications}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get getRuntimeInfo(){return fin.desktop.System.getRuntimeInfo}static get addEventListener(){return l.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getAllWindows(){return fin.desktop.System.getAllWindows}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static closeApplication(e,t=Function.prototype){return new Promise((n=>{let r,i=!1;const o=()=>{i||(console.log("Attempting to terminate",e.uuid),e.terminate((()=>{t(),n()}),(()=>{i||(i=!0,clearInterval(r),console.log("force closing ",e.uuid),e.terminate())})))};r=setInterval(o,2e3),console.log("closing ",e.uuid),e.close(!1,(()=>{console.log("app.close: successfully closed",e.uuid),i=!0,clearInterval(r),t(),n()}),o)}))}}t.System=l},5020:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(9319)),o=r(n(2551)),s=n(6188),a=n(3509),u=n(5269),l=new class{publishBootStatus(e,t,n){console.log("publishStartingStatus",e,n),o.default.system.debug("publishBootStatus",e,t,n),i.default.publish(u.statusChannel(e),{name:e,type:t,state:n})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((r,u)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const l=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const c=i.default.subscribe(a.STAGE_CHANNEL,((a,d)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data.stage,c),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===l)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),u(a);else{const a=s.ALL_BOOT_STAGES.indexOf(d.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data,c),"stageEntered"===t&&a+1>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,c,n.name),n(),r(),i.default.unsubscribe(c)):"stageCompleted"===t&&a>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,c),n(),r(),i.default.unsubscribe(c)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${l} `,a,l,e,c)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,r)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=i.default.subscribe(u.statusChannel(e),((a,u)=>{o.default.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,u),a?(o.default.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),r()):u.data.name===e&&"completed"===u.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),i.default.unsubscribe(s))}))}))}publishCheckpointState(e,t,n){console.log("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),o.default.system.debug("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),i.default.publish(u.checkpointChannel(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),i.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),i.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=l},6420:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.adjustBoundsToBeOnMonitor=t.isOnAMonitor=t.getNewBoundsWhenMovedToMonitor=t.openSharedData=t.injectJS=t.guuid=t.camelCase=t.getMyWindowIdentifier=t.getMonitorByDescriptor=t.windowOnMonitor=t.getMonitorFromCommand=t.getMonitor=t.getWhichMonitor=t.findMonitor=t.getWindowDescriptor=t.getFinWindow=t.getMonitorFromWindow=t.getMonitorFromXY=t.getAllMonitors=t.crossDomain=t.isPercentage=t.castToPromise=t.getContainerVersion=t.clone=t.Monitors=void 0;const i=r(n(6589)),o=n(1742),s=r(n(3802)),a=r(n(2551));function u(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?u(e[n],null):t[n];return t}function l(e,n){const r=Number.isFinite(e.x)?e.x:e.defaultLeft,i=Number.isFinite(e.y)?e.y:e.defaultTop,o=r+e.defaultWidth,s=i+e.defaultHeight;return new Promise(((e,l)=>{t.Monitors.getMonitorFromScaledXY(r,i,(c=>{if(!c)return a.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right"),void t.Monitors.getMonitorFromScaledXY(o,s,(o=>{if(!o)return a.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary"),void t.Monitors.getAllMonitors((t=>{t[0]?(n&&n(t[0]),e(t[0])):(l(new Error("Cannot find monitor for window.")),n&&n(null))}));o=u(o);const{monitorRect:s}=o;(s.left<r||s.right<i)&&(o.straddling=!0),n&&n(o),e(o)}));c=u(c);const{monitorRect:d}=c;(d.right>o||d.bottom>s)&&(c.straddling=!0),n&&n(c),e(c)}))}))}function c(e,t){return new Promise(((n,r)=>{const i=o.System.Window.getCurrent();i.getOptions((s=>{if(e&&e.windowName){e.uuid||(e.uuid=s.uuid);const i=o.System.Window.wrap(e.uuid,e.windowName);i.getInfo((()=>{t&&t(i),n(i)}),(()=>{t&&t(null),r(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}))}else if(e&&e.componentType)if(void 0!==window.LauncherService){const i=window.LauncherService.componentFinder(e);i?(n(i),t&&t(i)):(r(`util.getFinWindow: Component ${e.componentType} not found.`),t&&t(null))}else r("getFinWindow by componentType is currently only operable within LaunchService"),t&&t(null);else t&&t(i),n(i)}))}))}function d(e,t){return new Promise(((n,r)=>{c(e).then((e=>{e.getOptions((e=>{t&&t(e),n(e)}))})).catch((e=>{console.warn(e),t&&t(null),r(e)}))}))}function f(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if(i[t]===n)return i}return null}function p(e,n){let r;arguments.length>2&&(e={commandMonitor:arguments[0],monitors:arguments[1],launchingMonitorPosition:arguments[2]},n=null);let{commandMonitor:i,monitors:o,launchingMonitorPosition:s}=e;const a=i&&""!==i||0===i;if("primary"===i)r=f(o,"whichMonitor","primary");else if("next"===i){let e=s+1;e>=o.length&&(e=0),r=o[e]}else if("previous"===i){let e=s-1;e<0&&(e=o.length-1),r=o[e]}else if("mine"===i){var u=!0;activeWindows.getWindow(e.windowIdentifier.windowName)._getBounds(((e,i)=>{e?(r=o[0],n(r)):t.Monitors.getMonitorFromScaledXY(i.left,i.top,(e=>{n(e)}))}))}else a?(i>=o.length&&(i=o.length-1),r=o.filter((e=>e.position===i))[0]):s&&(r=o[s]);if(r||(r=o[0]),!u){if(!n)return r;n(r)}}function h(e,t){return new Promise(((n,r)=>{d(e,(e=>{e?l(e,(e=>{t&&t(e),n(e)})):r("util.getMonitor: Can't locate windowDescriptor.")}))}))}t.Monitors=new s.default(Function.prototype,Function.prototype,{System:o.System}),t.clone=u,t.getContainerVersion=function(e=Function.prototype){return new Promise((t=>{o.System.getVersion((n=>{const r=n.split(".").map(Number),i={major:r[0],chromium:r[1],minor:r[2],patch:r[3]};e(i),t({versionObject:i})}))}))},t.castToPromise=function(e){return function(...t){return new Promise(((n,r)=>{const i=e.apply(null,Array.from(t));try{return i.then(n,r)}catch(e){e instanceof TypeError?n(i):r(e)}}))}},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=!(n&&i&&r);return a.default.system.debug(`Launcher crossDomain=${o} (${n}:${r}:${i})`),o},t.getAllMonitors=t.Monitors.getAllMonitors,t.getMonitorFromXY=t.Monitors.getMonitorFromScaledXY,t.getMonitorFromWindow=l,t.getFinWindow=c,t.getWindowDescriptor=d,t.findMonitor=f,t.getWhichMonitor=p,t.getMonitor=h,t.getMonitorFromCommand=function(e,n,r){return new Promise((i=>{h(n,(n=>{t.Monitors.getAllMonitors((t=>{p({commandMonitor:e,monitors:t,launchingMonitorPosition:n.position},(e=>{r&&r(e),i(e)}))}))}))}))},t.windowOnMonitor=function(e,t){return e.left>=t.left&&e.left<t.right||e.right<=t.right&&e.right>t.left},t.getMonitorByDescriptor=function(e,t){return new Promise((n=>{l(e,(e=>{t&&t(e),n(e)}))}))},t.getMyWindowIdentifier=function(e){const t=o.System.Window.getCurrent();return new Promise((n=>{t.getOptions((r=>{let i=null;const{customData:o}=r;o&&o.component&&(i=o.component.type);const s={windowName:t.name,uuid:t.uuid,componentType:i};e&&e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.guuid=function(){return i.default()},t.injectJS=function(e,t){const n=document.createElement("script");n.onload=t,n.type="text/javascript",n.async=!0,n.src=e;const r=document.getElementsByTagName("head")[0],i=r.getElementsByTagName("script")[0];r.insertBefore(n,i)},t.openSharedData=function(e,t){const n=FSBL.Clients.LauncherClient,r=FSBL.Clients.LinkerClient;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const r of Object.keys(e))e[r].length>n&&(t=r,n=e[r].length);return[t]});const i=[],o={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((s,u)=>{for(const e of Object.keys(u))if(u[e].componentTypes.length)for(const t of u[e].componentTypes)o[t]?o[t].push(e):o[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;i.push(t),a.default.system.error(t)}let l=Object.keys(o);if(l.length){l.length>1&&(l=e.multipleOpenerHandler(o));const s=Object.keys(r.channels);if(s.length)if(r.getLinkedComponents({componentTypes:l,windowIdentifier:r.windowIdentifier()}).length||e.publishOnly)r.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(i.length?i:null,"Data published");else{for(const t of l)n.spawn(t,{data:{sharedData:e.data,linker:{channels:s}},addToWorkspace:!0});t&&t(i.length?i:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of l)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(i.length?i:null,"New Window(s) spawned with data")}}else t&&t(i.length?i:null,null)}))},t.getNewBoundsWhenMovedToMonitor=function(e,t,n="availableRect"){const r=e[n]||e.availableRect||e.monitorRect,i=u(t);return t.top<r.top?i.top=r.top:t.top>r.bottom-t.height&&(i.top=r.bottom-t.height),t.left<r.left?i.left=r.left:t.left>r.right-t.width&&(i.left=r.right-t.width),i.bottom=i.top+i.height,i.right=i.left+i.width,i.right>r.right&&(i.right=r.right),i.top<r.top&&(i.top=r.top),i.left<r.left&&(i.left=r.left),i.bottom>r.bottom&&(i.bottom=r.bottom),i.height=i.bottom-i.top,i.width=i.right-i.left,{newBounds:i,distanceMoved:Math.sqrt((t.left-i.left)**2+(t.top-i.top)**2),monitor:e}},t.isOnAMonitor=function(e){return this.Monitors.allMonitors.some((t=>{const{monitorRect:n}=t;return e.left>=n.left&&e.left<=n.right&&e.right>=n.left&&e.right<=n.right&&e.top>=n.top&&e.top<=n.bottom&&e.bottom>=n.top&&e.bottom<=n.bottom}))},t.adjustBoundsToBeOnMonitor=function(e,t="availableRect"){if(this.isOnAMonitor(e))return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),e;const n=this.Monitors.allMonitors.map((n=>{let r=n.rawMonitor?n.rawMonitor:n;return this.getNewBoundsWhenMovedToMonitor(r,e,t)})).sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",e,"monitor name",n.monitor.name,"newBounds",n.newBounds),n.newBounds},t.isWindows=async function(e=Function.prototype){const t=(await o.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return a.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},5688:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=s(n(9319)),u=s(n(2551)),l=o(n(6420)),c=s(n(7815)),d=o(n(8379)),f=n(4232),p=n(1742),h=s(n(9748)),g=n(428);window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class m extends c.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=m.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=d.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=l.camelCase("activeWorkspace",this.name,this.name),this.windowKey=l.camelCase("activeWorkspace",this.name),m.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t){if("closed"!==e||!window.finsembleWindow||this.name!==finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new m(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=m;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static getInstance(e,t=Function.prototype){const n=p.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),(e=h.default(e))&&e.name?(e.windowName=e.name,new Promise((async function(r,i){if(window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}if(e.uuid&&e.name){if(e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),!1!==e.waitForReady)try{await m._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}if(u.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally"),window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}const{wrap:n}=await m._createWrap(e);return r({wrap:n}),t(null,n)}if(!1!==e.waitForReady)try{await m._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}a.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async(n,o)=>{if(n)return u.default.system.error(n),i(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),r({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await m._createWrap(e);o.data.descriptor&&(a.descriptor=o.data.descriptor),r({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let r=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let i={...n};i=Object.assign(i,e),i.setWindowType=i.windowType,delete i.windowType,u.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=m;window._FSBLCache.windows[n.windowName]=new o(i),r=window._FSBLCache.windows[n.windowName],r.windowType=n.windowType,r.identifier=n,r.addEventListener("closed",r.handleWrapRemoveRequest),r.addEventListener("maximized",(()=>{r.windowState=m.WINDOWSTATE.MAXIMIZED})),r.addEventListener("minimized",(()=>{r.windowState=m.WINDOWSTATE.MINIMIZED})),r.addEventListener("restored",(()=>{r.windowState=m.WINDOWSTATE.NORMAL}));const s=a.default.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)u.default.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;r.wrapState=e,a.default.unsubscribe(s)}}));r.parentSubscribeID=a.default.subscribe(`Finsemble.parentChange.${n.windowName}`,((e,n)=>{if(e)u.default.system.error("FinsembleWindow parent change notification error",e),t({wrap:r});else{const e=n.data||{};"Added"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",e),r.setParent(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Exists"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",e),r.setParentOnWrap(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Removed"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",e),r.clearParent(),t({wrap:r})):e.type?(u.default.system.error("FinsembleWindow Parent Notification: unknown type",e),t({wrap:r})):t({wrap:r})}}))}))}static _getRemoveWrapChannel(e){return`${p.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.default.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==window.name&&this.name&&(delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name]),e&&e.done()}cleanupRouter(){const e=m._getRemoveWrapChannel(this.name);a.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.default.unsubscribe(this.parentSubscribeID)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){if("close"===e||"setParent"===e||"ready"===this.wrapState)return new Promise((async(r,i)=>{"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,u.default.setting().system.Debug&&(t.callstack=u.default.callStack()),u.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);let o=null;a.default.query(this.windowServiceChannelName(e),t,((t,s)=>{t?(u.default.system.debug(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t),"getComponentState"!==e&&"Not found"!==t&&i(t)):(o=s.data,u.default.system.debug(`${this.windowServiceChannelName(e)} successful`,o),console.debug(`${this.windowServiceChannelName(e)} successful`,o)),r(o),n(t,o)}))}));this.onReady((()=>{this.wrapState="ready",this.queryWindowService(e,t,n)}))}minimize(e=null,t=Function.prototype){this.queryWindowService("minimize",e,t)}maximize(e=null,t=Function.prototype){this.getBounds(((n,r)=>{n?u.default.system.warn("Error getting bounds, cached bounds will not be set"):this.updateOptions({options:{cachedLeft:r.left,defaultLeft:r.left,cachedTop:r.top,defaultTop:r.top,cachedWidth:r.width,defaultWidth:r.width,cachedHeight:r.height,defaultHeight:r.height}}),this.queryWindowService("maximize",e,t)}))}restore(e=null,t=Function.prototype){this.queryWindowService("restore",e,t)}blur(e=null,t=Function.prototype){this.queryWindowService("blur",e,t)}focus(e=null,t=Function.prototype){this.queryWindowService("focus",e,t)}bringToFront(e=null,t=Function.prototype){this.queryWindowService("bringToFront",e,t)}setAlwaysOnTop(e={alwaysOnTop:!0},t=Function.prototype){this.queryWindowService("setAlwaysOnTop",e,t)}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",{},t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const r={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",r,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new g.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t=Function.prototype){"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,t)}getBounds(e={},t=Function.prototype){return new Promise((n=>{this.queryWindowService("getBounds",e,((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t=Function.prototype){this.queryWindowService("hide",e,t)}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t=Function.prototype){this.queryWindowService("show",e,t)}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t=Function.prototype){u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(()=>{u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name),t()}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const r=()=>{a.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,r):r()}wrapReady(){a.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.default.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?u.default.system.warn("TabTile.stopTabTile: query failed",e):u.default.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(u.default.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){u.default.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.default.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.default.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?m.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}setParent(e,t){if(this.settingParent)return this.getParent(t);this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParent",e),m.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParent error",n):(u.default.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=r,this.parentWindow.windowType.includes("StackedWindow")||u.default.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.default.transmit(d.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const i=()=>{this.removeEventListener("parent-set",i),t(n,r)};this.addEventListener("parent-set",i)}))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParentOnWrap",e),m.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParentOnWrap error",n):(u.default.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=r,!1===this.parentWindow.windowType.includes("StackedWindow")&&u.default.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,r)}))}))}clearParent(){u.default.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.default.system.debug("Title change",e),a.default.publish(this.TITLE_CHANGED_CHANNEL,e)}getOptions(e=Function.prototype){this.queryWindowService("getOptions",{},e)}_privateManagementPreface(e,t){return"function"==typeof t&&u.default.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:this.identifier?.windowName,windowType:this.identifier?.windowType},u.default.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.default.query("StackedWindow.addWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.addWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.default.query("StackedWindow.removeWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.removeWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.default.query("StackedWindow.deleteWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.deleteWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.default.query("StackedWindow.setVisibleWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.setVisibleWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.default.query("StackedWindow.reorder",e,((e,r)=>{u.default.system.debug("StackedWindow.reorder callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=m,m.WINDOWSTATE={NORMAL:0,MINIMIZED:1,MAXIMIZED:2,HIDDEN:3},m.wrap=m.getInstance,m.isStartupApplication=async function(e){let t;const n=await new Promise(((e,t)=>{p.System.Application.getCurrent().getManifest(e,t)})).catch((()=>{t=!1}));return n&&(t=n&&n.startup_app&&n.startup_app.name===e),t},m._windowReady=function(e){let t;u.default.system.debug(`windowServiceReady: ${e} starting`);const n=`Finsemble.Component.State.${e}`;return new Promise((async(r,i)=>{await m.isStartupApplication(e)||f.isServiceInWindow(e)?i("Cannot Wrap Service Manager or Services"):(u.default.system.debug(`windowServiceReady: ${e} waiting`),t=a.default.subscribe(n,((n,i)=>{const{state:o}=i.data;switch(u.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.default.system.debug(`windowServiceReady: ${e} ${o}`),a.default.unsubscribe(t),r()}})))}))}},3509:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel","authentication"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},6188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BootReadyItem=t.BootConfigElement=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.BootConfigElement=class{},t.BootReadyItem=class{constructor(e,t,n){this.name=e,this.type=t,this.config=n}}},5269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=t.killOldApplications=void 0;const r=n(1742),i=n(3509);t.killOldApplications=function(e){return new Promise((async t=>{r.System.getAllApplications((async n=>{if(n)for(let t=0;t<n.length;t++){const i=n[t];if(i.uuid?.endsWith(`-${e}`)){const e=r.System.Application.wrap(i.uuid);await r.System.closeApplication(e)}}console.log("killOldApplications: finished closing old apps"),t()}))}))},t.statusChannel=function(e){return`${i.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${i.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},8801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},498:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4215:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9520:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(i=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",i.ErrorOnLaunch="ErrorOnLaunch",i.AppTimeout="AppTimeout",i.ResolverUnavailable="ResolverUnavailable",(r=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",r.ResolverUnavailable="ResolverUnavailable",r.ResolverTimeout="ResolverTimeout",(n=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",n.AccessDenied="AccessDenied",n.CreationFailed="CreationFailed"},5182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5644:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.versionIsAtLeast=t.compareVersionNumbers=t.getInfo=t.leaveCurrentChannel=t.getCurrentChannel=t.getOrCreateChannel=t.joinChannel=t.getSystemChannels=t.addContextListener=t.addIntentListener=t.raiseIntentForContext=t.raiseIntent=t.broadcast=t.findIntentsByContext=t.findIntent=t.open=t.fdc3Ready=void 0;const n=new Error("FDC3 DesktopAgent not available at `window.fdc3`."),r=new Error("Timed out waiting for `fdc3Ready` event."),i=new Error("`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent.");function o(e){return window.fdc3?e():Promise.reject(n)}function s(e){if(!window.fdc3)throw n;return e()}t.fdc3Ready=async(e=5e3)=>new Promise(((t,n)=>{if(window.fdc3)t();else{const o=setTimeout((()=>window.fdc3?t():n(r)),e);window.addEventListener("fdc3Ready",(()=>{clearTimeout(o),window.fdc3?t():n(i)}),{once:!0})}})),t.open=function(e,t){return o((()=>window.fdc3.open(e,t)))},t.findIntent=function(e,t){return o((()=>window.fdc3.findIntent(e,t)))},t.findIntentsByContext=function(e){return o((()=>window.fdc3.findIntentsByContext(e)))},t.broadcast=function(e){s((()=>window.fdc3.broadcast(e)))},t.raiseIntent=function(e,t,n){return o((()=>window.fdc3.raiseIntent(e,t,n)))},t.raiseIntentForContext=function(e,t){return o((()=>window.fdc3.raiseIntentForContext(e,t)))},t.addIntentListener=function(e,t){return s((()=>window.fdc3.addIntentListener(e,t)))},t.addContextListener=function(e,t){return s("function"!=typeof e?()=>window.fdc3.addContextListener(e,t):()=>window.fdc3.addContextListener(e))},t.getSystemChannels=function(){return o((()=>window.fdc3.getSystemChannels()))},t.joinChannel=function(e){return o((()=>window.fdc3.joinChannel(e)))},t.getOrCreateChannel=function(e){return o((()=>window.fdc3.getOrCreateChannel(e)))},t.getCurrentChannel=function(){return o((()=>window.fdc3.getCurrentChannel()))},t.leaveCurrentChannel=function(){return o((()=>window.fdc3.leaveCurrentChannel()))},t.getInfo=function(){return s((()=>window.fdc3.getInfo()))},t.compareVersionNumbers=(e,t)=>{try{let n=e.split(".").map(Number),r=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){if(e===n.length||n[e]<r[e])return-1;if(e===r.length||n[e]>r[e])return 1}return 0}catch(e){return console.error("Failed to compare version strings",e),null}},t.versionIsAtLeast=(e,n)=>{let r=t.compareVersionNumbers(e.fdc3Version,n);return null===r?null:r>=0}},5972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1767:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(n=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",n.ContactList="fdc3.contactList",n.Country="fdc3.country",n.Instrument="fdc3.instrument",n.Organization="fdc3.organization",n.Portfolio="fdc3.portfolio",n.Position="fdc3.position"},1966:(e,t)=>{"use strict";function n(e,t,n=""){if(n)throw Error(`Invalid value for key "${n}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function r(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function i(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,r,i=""){if("any"===t)return e;if(null===t)return null===e?e:n(t,e);if(!1===t)return n(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=p[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:n(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const i=e.length;for(let n=0;n<i;n++){const i=e[n];try{return o(t,i,r)}catch(e){}}return n(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,r))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,i){if(null===i||"object"!=typeof i||Array.isArray(i))return n("object",i);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0;s[n.key]=o(a,n.typ,r,n.key)})),Object.getOwnPropertyNames(i).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(i[n],t,r,n))})),s}(r(t),t.additional,e):n(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?n("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:n(e,t,i)}(t,e)}function s(e,t){return o(e,t,r)}function a(e,t){return o(e,t,i)}function u(e){return{arrayItems:e}}function l(...e){return{unionMembers:e}}function c(e,t){return{props:e,additional:t}}function d(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const p={Context:c([{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:c([{json:"contacts",js:"contacts",typ:u(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Contact:c([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),ContactID:c([{json:"email",js:"email",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")}],""),InstrumentList:c([{json:"instruments",js:"instruments",typ:u(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Instrument:c([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),InstrumentID:c([{json:"BBG",js:"BBG",typ:l(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"FIGI",js:"FIGI",typ:l(void 0,"")},{json:"ISIN",js:"ISIN",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")},{json:"RIC",js:"RIC",typ:l(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:l(void 0,"")},{json:"ticker",js:"ticker",typ:l(void 0,"")}],""),Country:c([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),CountryID:c([{json:"ISOALPHA2",js:"ISOALPHA2",typ:l(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:l(void 0,"")}],""),Organization:c([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),OrganizationID:c([{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"LEI",js:"LEI",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")}],""),Portfolio:c([{json:"positions",js:"positions",typ:u(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Position:c([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any")}},8832:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(8801),t),i(n(7661),t),i(n(498),t),i(n(5972),t),i(n(4215),t),i(n(9600),t),i(n(9520),t),i(n(5644),t),i(n(6129),t),i(n(1854),t),i(n(5182),t),i(n(6611),t),i(n(1767),t),i(n(1966),t),i(n(7178),t)},7178:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(n=t.Intents||(t.Intents={})).StartCall="StartCall",n.StartChat="StartChat",n.ViewChart="ViewChart",n.ViewContact="ViewContact",n.ViewQuote="ViewQuote",n.ViewNews="ViewNews",n.ViewInstrument="ViewInstrument",n.ViewAnalysis="ViewAnalysis"},5090:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+ZmYtZGVsZXRlLWNpcmNsZTwvdGl0bGU+CiAgICA8ZyBpZD0iU3ltYm9scyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9ImZmLWRlbGV0ZS1jaXJjbGUiIGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik04LjgsMTUuOCBDOC42LDE1LjggOC40LDE1LjcgOC4zLDE1LjYgQzgsMTUuMyA4LDE0LjggOC4zLDE0LjUgTDE0LjQsOC4zIEMxNC43LDggMTUuMiw4IDE1LjUsOC4zIEMxNS44LDguNiAxNS44LDkuMSAxNS41LDkuNCBMOS40LDE1LjYgQzkuMiwxNS43IDksMTUuOCA4LjgsMTUuOCIgaWQ9IlBhdGgiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTE0LjksMTUuOCBDMTQuNywxNS44IDE0LjUsMTUuNyAxNC40LDE1LjYgTDguMyw5LjQgQzgsOS4xIDgsOC42IDguMyw4LjMgQzguNiw4IDkuMSw4IDkuNCw4LjMgTDE1LjUsMTQuNSBDMTUuOCwxNC44IDE1LjgsMTUuMyAxNS41LDE1LjYgQzE1LjMsMTUuNyAxNS4xLDE1LjggMTQuOSwxNS44IiBpZD0iUGF0aCI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNMTEuNiwxLjYgQzYuMSwxLjYgMS42LDYuMiAxLjYsMTEuNyBDMS42LDE3LjMgNi4xLDIxLjggMTEuNiwyMS44IEMxNy4xLDIxLjggMjEuNiwxNy4yIDIxLjYsMTEuNyBDMjEuNiw2LjEgMTcuMSwxLjYgMTEuNiwxLjYgWiBNMTEuNiwyMy40IEM1LjIsMjMuNCAwLDE4LjEgMCwxMS43IEMwLDUuMyA1LjIsMCAxMS42LDAgQzE4LDAgMjMuMiw1LjIgMjMuMiwxMS43IEMyMy4yLDE4LjIgMTcuOSwyMy40IDExLjYsMjMuNCBMMTEuNiwyMy40IFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"},1639:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjNweCIgaGVpZ2h0PSIyM3B4IiB2aWV3Qm94PSIwIDAgMjMgMjMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+U2hhcmUgV2hpdGU8L3RpdGxlPgogICAgPGcgaWQ9IlNoYXJlLVdoaXRlIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iUGFnZS0xIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMS4wMDAwMDApIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLTMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDguMDAwMDAwLCAwLjQ3OTEwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0LjMyNzE3MTcsNi4wNjQ4MDg1OSBDMTQuMzU4Nzg0Myw2LjAxODIyMTU3IDE0LjM5NTM4ODQsNS45NzY2MjYwMiAxNC40MTcwMTgxLDUuOTI1MDQ3NTQgQzE0LjQ5ODU0NTQsNS43MjM3MjUwNyAxNC40OTg1NDU0LDUuNDk5MTA5MDkgMTQuNDE3MDE4MSw1LjI5OTQ1MDQ0IEMxNC4zOTUzODg0LDUuMjQ2MjA4MTQgMTQuMzU4Nzg0Myw1LjIwNDYxMjU5IDE0LjMyNzE3MTcsNS4xNTgwMjU1NyBDMTQuMzAwNTUwNiw1LjExOTc1NzY2IDE0LjI4NTU3NjIsNS4wNzQ4MzQ0NyAxNC4yNTIyOTk3LDUuMDM5ODk0MiBMMTQuMjM1NjYxNSw1LjAyNDkxOTgxIEMxNC4yMzU2NjE1LDUuMDIzMjU1OTggMTQuMjM1NjYxNSw1LjAyMzI1NTk4IDE0LjIzMzk5NzcsNS4wMjMyNTU5OCBMOS43MzUwMjI4NCwwLjI1OTczMzQzOSBDOS40MTg4OTY2NSwtMC4wNzEzNjcxNSA4Ljg5MzEyODg5LC0wLjA4OTY2OTE5MjYgOC41NTg3MDA2NSwwLjIyNjQ1Njk5OCBDOC4yMjU5MzYyNCwwLjU0MjU4MzE4OCA4LjIxMDk2MTg0LDEuMDY4MzUwOTYgOC41MjcwODgwMywxLjQwMjc3OTE5IEwxMS43MTgyOTg3LDQuNzgwMzM3OTYgTDIuOTkxNTUyMDYsNC43ODAzMzc5NiBDMS4zNDEwNDA1OCw0Ljc4MDMzNzk2IDAsNi40MzQxNzcwOSAwLDguNDY5MDMxNDYgTDAsMTAuNjkwMjMzOSBDMCwxMS4xNTExMTI2IDAuMzcxMDMyMzE4LDExLjUyMjE0NDkgMC44MzE5MTEwMjgsMTEuNTIyMTQ0OSBDMS4yOTExMjU5MSwxMS41MjIxNDQ5IDEuNjYzODIyMDYsMTEuMTUxMTEyNiAxLjY2MzgyMjA2LDEwLjY5MDIzMzkgTDEuNjYzODIyMDYsOC40NjkwMzE0NiBDMS42NjM4MjIwNiw3LjM3MDkwODkgMi4yNzExMTcxMSw2LjQ0NDE2MDAyIDIuOTkxNTUyMDYsNi40NDQxNjAwMiBMMTEuNzE4Mjk4Nyw2LjQ0NDE2MDAyIEw4LjUyNzA4ODAzLDkuODIwMDU0OTcgQzguMjEwOTYxODQsMTAuMTU0NDgzMiA4LjIyNTkzNjI0LDEwLjY3ODU4NzEgOC41NTg3MDA2NSwxMC45OTYzNzcyIEM4LjcyMDA5MTM5LDExLjE0Nzc4NSA4LjkyNjQwNTMzLDExLjIyNDMyMDggOS4xMzEwNTU0NCwxMS4yMjQzMjA4IEM5LjM1MjM0Mzc3LDExLjIyNDMyMDggOS41NzE5NjgyOCwxMS4xMzYxMzgyIDkuNzM1MDIyODQsMTAuOTYxNDM2OSBMMTQuMjMzOTk3Nyw2LjIwMTI0MiBDMTQuMjM1NjYxNSw2LjE5OTU3ODE4IDE0LjIzNTY2MTUsNi4xOTk1NzgxOCAxNC4yMzU2NjE1LDYuMTk5NTc4MTggTDE0LjI1MjI5OTcsNi4xODI5Mzk5NiBDMTQuMjg1NTc2Miw2LjE0Nzk5OTY5IDE0LjMwMDU1MDYsNi4xMDMwNzY1IDE0LjMyNzE3MTcsNi4wNjQ4MDg1OSIgaWQ9IkZpbGwtMSI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDxnIGlkPSJHcm91cC02IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMi40NzkxMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMS45NzA3NzAyLDE4LjUxNjY3NTcgTDAuODMxOTExMDI4LDE4LjUxNjY3NTcgQzAuMzcyNjk2MTQsMTguNTE2Njc1NyAwLDE4LjE0Mzk3OTUgMCwxNy42ODQ3NjQ2IEwwLDAuODMxOTExMDI4IEMwLDAuMzcxMDMyMzE4IDAuMzcyNjk2MTQsMCAwLjgzMTkxMTAyOCwwIEw1LjQwNzQyMTY4LDAgQzUuODY2NjM2NTcsMCA2LjIzOTMzMjcxLDAuMzcxMDMyMzE4IDYuMjM5MzMyNzEsMC44MzE5MTEwMjggQzYuMjM5MzMyNzEsMS4yOTExMjU5MSA1Ljg2NjYzNjU3LDEuNjYzODIyMDYgNS40MDc0MjE2OCwxLjY2MzgyMjA2IEwxLjY2MzgyMjA2LDEuNjYzODIyMDYgTDEuNjYzODIyMDYsMTYuODUyODUzNiBMMjEuMTM4ODU5MiwxNi44NTI4NTM2IEwyMS4xMzg4NTkyLDEwLjc0OTk1NDMgQzIxLjEzODg1OTIsMTAuMjkwNzM5NCAyMS41MTE1NTU0LDkuOTE4MDQzMjcgMjEuOTcwNzcwMiw5LjkxODA0MzI3IEMyMi40Mjk5ODUxLDkuOTE4MDQzMjcgMjIuODAyNjgxMywxMC4yOTA3Mzk0IDIyLjgwMjY4MTMsMTAuNzQ5OTU0MyBMMjIuODAyNjgxMywxNy42ODQ3NjQ2IEMyMi44MDI2ODEzLDE4LjE0Mzk3OTUgMjIuNDI5OTg1MSwxOC41MTY2NzU3IDIxLjk3MDc3MDIsMTguNTE2Njc1NyIgaWQ9IkZpbGwtNCI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},306:e=>{"use strict";e.exports=JSON.parse('{"name":"@finsemble/finsemble-core","main":"dist/index.js","types":"types/index.d.ts","version":"6.1.5","description":"Finsemble is an application framework providing infrastructure, services, and components for quickly building HTML5 multi-window financial desktop applications.","scripts":{"do-audit":" improved-yarn-audit --min-severity high","build":"gulp build --production","build-docs":"gulp --gulpfile gulpfile-docs.js build-docs","clean":"gulp clean","dev":"gulp build --watch","dev:fresh":"gulp build --clean --watch","docs":"set DEBUG=gulp-jsdoc3&&gulp --gulpfile=./gulpfile-docs.js docs-server","lint":"eslint --ext .js,.jsx,.ts,.tsx ./src/**","lint-fix":"eslint --fix --ext .js,.jsx,.ts,.tsx ./src/**","lint-stats":"eslint --format node_modules/eslint-stats/byErrorAndWarning.js --ext .js,.jsx,.ts,.tsx ./src/**","monodev":"yarn dev","obfuscate":"gulp build --production --obfuscate","prod":"gulp build --production","test":"ts-mocha","test-coverage":"nyc ts-mocha && nyc merge .nyc_output ../../.nyc_output/core.json","types":"gulp types"},"author":"Cosaic","license":"SEE LICENSE IN LICENSE","dependencies":{"@babel/core":"7.14.6","@babel/preset-env":"7.14.7","@babel/preset-react":"7.14.5"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"1.0.1","@reduxjs/toolkit":"1.6.1","@types/chai":"4.2.21","@types/deepmerge":"2.2.0","@types/lodash":"4.14.171","@types/mocha":"9.0.0","@types/node":"12.12.7","@typescript-eslint/eslint-plugin":"4.28.3","@typescript-eslint/parser":"4.28.4","ajv":"6.12.2","async":"3.2.0","babel-loader":"8.2.2","browser-sync":"2.27.4","case-sensitive-paths-webpack-plugin":"2.4.0","chai":"4.2.0","chalk":"4.1.1","copy-webpack-plugin":"6.4.1","css-loader":"3.5.3","deepmerge":"1.3.2","del":"6.0.0","esm":"~3.2.25","fast-check":"2.17.0","file-loader":"6.2.0","file-saver":"2.0.5","fs-extra":"2.1.2","fuse.js":"6.4.6","git-rev-sync":"3.0.1","gulp":"4.0.0","gulp-javascript-obfuscator":"^1.1.6","gulp-jsdoc3":"3.0.0","gulp-plumber":"1.2.1","gulp-rename":"1.2.3","gulp-string-replace":"1.1.2","gulp-watch":"5.0.1","immutable":"4.0.0-rc.14","improved-yarn-audit":"^2.3.2","jsdoc":"3.6.6","jszip":"3.6.0","lodash":"4.17.21","mocha":"^8.0.1","mock-socket":"9.0.3","nyc":"15.1.0","p-limit":"3.1.0","p-queue":"7.1.0","pretty-hrtime":"1.0.3","prop-types":"15.7.2","react":"17.0.2","react-dom":"17.0.2","react-redux":"7.2.4","react-virtualized":"9.22.3","redux-devtools":"3.7.0","redux-devtools-chart-monitor":"1.7.2","redux-devtools-log-monitor":"2.1.0","redux-loop":"6.1.0","require-directory":"2.1.1","resize-observer-polyfill":"1.5.1","rimraf":"3.0.2","sass-loader":"12.1.0","searchjs":"1.1.0","shelljs":"0.8.4","sinon":"11.1.1","sinon-chai":"3.7.0","source-map-loader":"3.0.0","style-loader":"3.2.1","superagent":"6.1.0","taffydb":"2.7.3","to-string-loader":"1.1.6","ts-loader":"9.2.3","ts-mocha":"8.0.0","typedoc":"0.17.8","typescript":"4.3.5","url-loader":"4.1.0","uuid":"3.0.1","vinyl-sourcemaps-apply":"0.2.1","webpack":"5.45.1","webpack-glob-entries":"1.0.1","worker-farm":"1.7.0"},"resolutions":{"ts-mocha/ts-node":"^10.1.0","xmlhttprequest-ssl":"1.6.3","underscore":"1.12.1","ua-parser-js":"0.7.24","javascript-obfuscator":"2.15.5"}}')},7063:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};return(()=>{"use strict";var e=i;Object.defineProperty(e,"__esModule",{value:!0});const t=r(6192),n=r(7e3),o=r(4361),s=r(9319),a=r(6925);t.Globals.FSBL&&console.warn("FSBL.js - Global object FSBL already exists (window.FSBL). Was finsemble-desktop-api-preload.js imported twice?"),(async()=>{window.top===window&&(t.Globals.FSBL=new n.FSBLDesktop,t.Globals.fdc3=new o.FinsembleDesktopAgent({routerClient:s.RouterConnectionSingleton,startup:a.Startup.getInstance()}),await t.Globals.FSBL.startApp(),window.addEventListener("unload",(()=>{t.Globals.FSBL.stopApp()})))})()})(),i})()}));
|