@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.
Files changed (107) hide show
  1. package/.mocharc.js +12 -12
  2. package/.nycrc.json +7 -7
  3. package/README.md +24 -24
  4. package/assets/fonts/LICENSE.txt +202 -202
  5. package/configs/core/config.json +214 -214
  6. package/configs/core/securityPolicies.json +24 -24
  7. package/configs/core/services.json +233 -233
  8. package/configs/schemas/README.md +1 -1
  9. package/configs/schemas/fileBasedSchemas/appdConfigFile.schema.json +5 -5
  10. package/configs/schemas/fileBasedSchemas/applicationConfigFile.schema.json +5 -5
  11. package/configs/schemas/fileBasedSchemas/componentsFile.schema.json +5 -5
  12. package/configs/schemas/fileBasedSchemas/coreConfigFile.schema.json +5 -5
  13. package/configs/schemas/fileBasedSchemas/dashbarFile.schema.json +5 -5
  14. package/configs/schemas/fileBasedSchemas/manifestFile.schema.json +5 -5
  15. package/configs/schemas/fileBasedSchemas/securityPoliciesFile.schema.json +5 -5
  16. package/configs/schemas/fileBasedSchemas/servicesFile.schema.json +5 -5
  17. package/configs/schemas/fileBasedSchemas/uiComponentsFile.schema.json +5 -5
  18. package/configs/schemas/fileBasedSchemas/workspacesFile.schema.json +5 -5
  19. package/configs/schemas/finsemble.schema.json +4006 -4006
  20. package/dist/FSBL.js +1 -1
  21. package/dist/clients/Interop/FinsembleDesktopAgent.md +154 -154
  22. package/dist/clients/Interop/tsconfig.json +7 -7
  23. package/dist/clients/Startup/README.md +28 -28
  24. package/dist/clients/dragAndDropAssets/dragAndDropScrim.css +54 -54
  25. package/dist/clients/dragAndDropAssets/ff-delete-circle.svg +10 -10
  26. package/dist/clients/dragAndDropAssets/ff-share.svg +13 -13
  27. package/dist/components/system/notification/ff-close.svg +14 -14
  28. package/dist/components/system/notification/finsemble_logo_white.svg +15 -15
  29. package/dist/components/system/notification/notification.html +155 -155
  30. package/dist/configs/core/config.json +214 -214
  31. package/dist/configs/core/securityPolicies.json +24 -24
  32. package/dist/configs/core/services.json +233 -233
  33. package/dist/configs/schemas/README.md +1 -1
  34. package/dist/configs/schemas/fileBasedSchemas/appdConfigFile.schema.json +5 -5
  35. package/dist/configs/schemas/fileBasedSchemas/applicationConfigFile.schema.json +5 -5
  36. package/dist/configs/schemas/fileBasedSchemas/componentsFile.schema.json +5 -5
  37. package/dist/configs/schemas/fileBasedSchemas/coreConfigFile.schema.json +5 -5
  38. package/dist/configs/schemas/fileBasedSchemas/dashbarFile.schema.json +5 -5
  39. package/dist/configs/schemas/fileBasedSchemas/manifestFile.schema.json +5 -5
  40. package/dist/configs/schemas/fileBasedSchemas/securityPoliciesFile.schema.json +5 -5
  41. package/dist/configs/schemas/fileBasedSchemas/servicesFile.schema.json +5 -5
  42. package/dist/configs/schemas/fileBasedSchemas/uiComponentsFile.schema.json +5 -5
  43. package/dist/configs/schemas/fileBasedSchemas/workspacesFile.schema.json +5 -5
  44. package/dist/configs/schemas/finsemble.schema.json +4006 -4006
  45. package/dist/finsemble-javascript-adapter.js +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/javascript-adapter-example-app.html +37 -37
  48. package/dist/services/Interop/DevTools.tsx +71 -71
  49. package/dist/services/Interop/Interop.html +15 -15
  50. package/dist/services/Interop/InteropService.js +1 -1
  51. package/dist/services/Interop/InteropService.md +148 -148
  52. package/dist/services/Interop/InteropServiceUI.css +12 -12
  53. package/dist/services/Interop/InteropServiceUI.js +1 -1
  54. package/dist/services/Interop/InteropServiceUI.tsx +39 -39
  55. package/dist/services/Interop/devtoolsEnhancer.tsx +63 -63
  56. package/dist/services/Interop/tsconfig.json +7 -7
  57. package/dist/services/ServiceTemplate.md +39 -39
  58. package/dist/services/assimilation/assimilation.html +18 -18
  59. package/dist/services/assimilation/assimilationService.js +1 -1
  60. package/dist/services/authentication/authentication.html +17 -17
  61. package/dist/services/authentication/authenticationService.js +1 -1
  62. package/dist/services/authentication/dialogSignOn.html +199 -199
  63. package/dist/services/config/config.html +17 -17
  64. package/dist/services/config/configService.js +1 -1
  65. package/dist/services/dataStore/dataStore.html +18 -18
  66. package/dist/services/dataStore/dataStoreService.js +1 -1
  67. package/dist/services/hotkeys/hotkeys.html +18 -18
  68. package/dist/services/hotkeys/hotkeysService.js +1 -1
  69. package/dist/services/linker/linker.html +18 -18
  70. package/dist/services/linker/linkerService.js +1 -1
  71. package/dist/services/logger/logger.html +18 -18
  72. package/dist/services/logger/loggerService.js +1 -1
  73. package/dist/services/logger/loggerUI.js +1 -1
  74. package/dist/services/logger/src/app.css +860 -860
  75. package/dist/services/logger/src/components/Views/Logs/rightPanel/consoleView.css +379 -379
  76. package/dist/services/logger/src/components/objectInspector/README.md +1 -1
  77. package/dist/services/notification/notification.html +11 -11
  78. package/dist/services/notification/notificationService.js +1 -1
  79. package/dist/services/preferences/preferencesService.js +1 -1
  80. package/dist/services/router/router.html +18 -18
  81. package/dist/services/router/routerService.js +1 -1
  82. package/dist/services/search/search.html +17 -17
  83. package/dist/services/search/searchService.js +1 -1
  84. package/dist/services/storage/adapters/instrumentedIndexedDBAdapter.js +1 -1
  85. package/dist/services/storage/storage.html +17 -17
  86. package/dist/services/storage/storageService.js +1 -1
  87. package/dist/services/systemManager/bootTasks/testTasks/_aReadMe.md +119 -119
  88. package/dist/services/systemManager/systemManager.html +24 -24
  89. package/dist/services/systemManager/systemManager.js +1 -1
  90. package/dist/services/window/Docking/GroupRequirements.md +18 -18
  91. package/dist/services/window/Splintering/SplinterAgentSlave.html +13 -13
  92. package/dist/services/window/Splintering/SplinterAgentSlave.js +1 -1
  93. package/dist/services/window/Splintering/Splintering.md +118 -118
  94. package/dist/services/window/StackedWindowManager/StackRequirements.md +23 -23
  95. package/dist/services/window/WindowBehaviorRequirements.md +25 -25
  96. package/dist/services/window/windowService.html +10 -10
  97. package/dist/services/window/windowService.js +1 -1
  98. package/dist/services/workspace/dev-docs/importExportFormat.md +51 -51
  99. package/dist/services/workspace/dev-docs/remotelyPersistedWorkspaces.md +62 -62
  100. package/dist/services/workspace/workspace.html +18 -18
  101. package/dist/services/workspace/workspace.schema.json +48 -48
  102. package/dist/services/workspace/workspaceService.js +1 -1
  103. package/package.json +1 -1
  104. package/tsconfig.json +23 -23
  105. package/types/index.d.ts +40 -55
  106. package/types/index.tsbuildinfo +1 -1
  107. package/types.tsconfig.json +15 -15
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see searchService.js.LICENSE.txt */
2
- (()=>{var e={57664:(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:()=>O,applyEachSeries:()=>k,asyncify:()=>l,auto:()=>P,autoInject:()=>$,cargo:()=>G,cargoQueue:()=>z,compose:()=>Y,concat:()=>Z,concatLimit:()=>K,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>re,detectSeries:()=>ie,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>le,eachLimit:()=>fe,eachOf:()=>T,eachOfLimit:()=>E,eachOfSeries:()=>R,eachSeries:()=>de,ensureAsync:()=>pe,every:()=>he,everyLimit:()=>ge,everySeries:()=>ye,filter:()=>_e,filterLimit:()=>Se,filterSeries:()=>we,forever:()=>Ce,groupBy:()=>Ae,groupByLimit:()=>Ee,groupBySeries:()=>Le,log:()=>Te,map:()=>I,mapLimit:()=>Q,mapSeries:()=>N,mapValues:()=>Oe,mapValuesLimit:()=>Ie,mapValuesSeries:()=>Re,memoize:()=>Ne,nextTick:()=>ke,parallel:()=>je,parallelLimit:()=>Pe,priorityQueue:()=>Be,queue:()=>xe,race:()=>$e,reduce:()=>q,reduceRight:()=>Ve,reflect:()=>Ue,reflectAll:()=>He,reject:()=>ze,rejectLimit:()=>qe,rejectSeries:()=>Je,retry:()=>Qe,retryable:()=>Ze,seq:()=>J,series:()=>Xe,setImmediate:()=>c,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>rt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>ct,unmemoize:()=>lt,until:()=>dt,waterfall:()=>pt,whilst:()=>ft,all:()=>he,allLimit:()=>ge,allSeries:()=>ye,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>re,findSeries:()=>ie,flatMap:()=>Z,flatMapLimit:()=>K,flatMapSeries:()=>X,forEach:()=>le,forEachSeries:()=>de,forEachLimit:()=>fe,forEachOf:()=>T,forEachOfSeries:()=>R,forEachOfLimit:()=>E,inject:()=>q,foldl:()=>q,foldr:()=>Ve,select:()=>_e,selectLimit:()=>Se,selectSeries:()=>we,wrapSync:()=>l,during:()=>ft,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 c=u(o?setImmediate:s?process.nextTick:a);function l(e){return p(e)?function(...t){const n=t.pop();return f(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 f(r,n);n(null,r)}))}function f(e,t){return e.then((e=>{d(t,null,e)}),(e=>{d(t,e&&e.message?e:new Error(e))}))}function d(e,t,n){try{e(t,n)}catch(e){c((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)?l(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 y(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 v(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 m(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const b={};function _(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 w(e,t,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function c(){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,l),u++,c()}})).catch(f))}function l(e,t){if(a-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===b||i&&a<=0?(i=!0,r(null)):void c()}function f(e){o||(s=!1,i=!0,r(e))}c()}var C=e=>(t,n,r)=>{if(r=_(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return w(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return w(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(m(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 c(e,t){if(!s)if(a-=1,e)o=!0,r(e);else if(!1===e)o=!0,s=!0;else{if(t===b||o&&a<=0)return o=!0,r(null);u||l()}}function l(){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(c))}u=!1}l()},E=g((function(e,t,n,r){return C(t)(e,h(n),r)}),4);function A(e,t,n){n=_(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!==b||n(null))}for(0===o&&n(null);r<o;r++)t(e[r],r,S(a))}function L(e,t,n){return E(e,1/0,t,n)}var T=g((function(e,t,n){return(m(e)?A:L)(e,h(t),n)}),3),I=g((function(e,t,n){return v(T,e,t,n)}),3),O=y(I),R=g((function(e,t,n){return E(e,1,t,n)}),3),N=g((function(e,t,n){return v(R,e,t,n)}),3),k=y(N);const D=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[D]=new Promise(((n,r)=>{e=n,t=r})),n}function P(e,t,n){"number"!=typeof t&&(n=t,t=null),n=_(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),c=[],l=[],f={};function d(e,t){c.push((()=>function(e,t){if(!a){var r=S(((t,...r)=>{if(o--,!1!==t)if(r.length<2&&([r]=r),t){var c={};if(Object.keys(i).forEach((e=>{c[e]=i[e]})),c[e]=r,a=!0,u=Object.create(null),s)return;n(t,c)}else i[e]=r,(u[e]||[]).forEach((e=>e())),p();else s=!0}));o++;var c=h(t[t.length-1]);t.length>1?c(i,r):c(r)}}(e,t)))}function p(){if(!s){if(0===c.length&&0===o)return n(null,i);for(;c.length&&o<t;)c.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 d(t,[n]),void l.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return d(t,n),void l.push(t);f[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&&d(t,n)}))}))})),function(){for(var e=0;l.length;)e++,g(l.pop()).forEach((e=>{0==--f[e]&&l.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),p(),n[D]}var x=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,M=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,F=/,/,W=/(=.+)?(\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(x);if(n||(n=t.match(M)),!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(W,"").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)}})),P(n,t)}class V{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):U(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):U(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 U(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 l=!1;function f(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)}v.started=!0;var a={data:e,callback:n?s:r||s};if(t?v._tasks.unshift(a):v._tasks.push(a),l||(l=!0,c((()=>{l=!1,v.process()}))),n||!r)return new Promise(((e,t)=>{i=e,o=t}))}function d(e){return function(t,...n){i-=1;for(var r=0,s=e.length;r<s;r++){var a=e[r],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}i<=v.concurrency-v.buffer&&u("unsaturated"),v.idle()&&u("drain"),v.process()}}function p(e){return!(0!==e.length||!v.idle()||(c((()=>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 y=!1,v={_tasks:new V,*[Symbol.iterator](){yield*v._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=>f(e,!1,!1,t)))}return f(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>f(e,!1,!0,t)))}return f(e,!1,!0,t)},kill(){a(),v._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>f(e,!0,!1,t)))}return f(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>f(e,!0,!0,t)))}return f(e,!0,!0,t)},remove(e){v._tasks.remove(e)},process(){if(!y){for(y=!0;!v.paused&&i<v.concurrency&&v._tasks.length;){var e=[],t=[],n=v._tasks.length;v.payload&&(n=Math.min(n,v.payload));for(var s=0;s<n;s++){var a=v._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===v._tasks.length&&u("empty"),i===v.concurrency&&u("saturated");var c=S(d(e));r(t,c)}y=!1}},length:()=>v._tasks.length,running:()=>i,workersList:()=>o,idle:()=>v._tasks.length+i===0,pause(){v.paused=!0},resume(){!1!==v.paused&&(v.paused=!1,c(v.process))}};return Object.defineProperties(v,{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")}}),v}function G(e,t){return H(e,1,t)}function z(e,t,n){return H(e,t,n)}var q=g((function(e,t,n,r){r=_(r);var i=h(n);return R(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function J(...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(),q(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[D]}}function Y(...e){return J(...e.reverse())}var Q=g((function(e,t,n,r){return v(C(t),e,n,r)}),4),K=g((function(e,t,n,r){var i=h(n);return Q(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 K(e,1/0,t,n)}),3),X=g((function(e,t,n){return K(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,b)):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))(T,e,t,n)}),3),re=g((function(e,t,n,r){return te((e=>e),((e,t)=>t))(C(t),e,n,r)}),4),ie=g((function(e,t,n){return te((e=>e),((e,t)=>t))(C(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 ce(e){return(t,n,r)=>e(t,r)}var le=g((function(e,t,n){return T(e,ce(h(t)),n)}),3),fe=g((function(e,t,n,r){return C(t)(e,ce(h(n)),r)}),4),de=g((function(e,t,n){return fe(e,1,t,n)}),3);function pe(e){return p(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?c((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var he=g((function(e,t,n){return te((e=>!e),(e=>!e))(T,e,t,n)}),3),ge=g((function(e,t,n,r){return te((e=>!e),(e=>!e))(C(t),e,n,r)}),4),ye=g((function(e,t,n){return te((e=>!e),(e=>!e))(R,e,t,n)}),3);function ve(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 me(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 be(e,t,n,r){return(m(t)?ve:me)(e,t,h(n),r)}var _e=g((function(e,t,n){return be(T,e,t,n)}),3),Se=g((function(e,t,n,r){return be(C(t),e,n,r)}),4),we=g((function(e,t,n){return be(R,e,t,n)}),3),Ce=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),Ee=g((function(e,t,n,r){var i=h(n);return Q(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 Ee(e,1/0,t,n)}function Le(e,t,n){return Ee(e,1,t,n)}var Te=oe("log"),Ie=g((function(e,t,n,r){r=_(r);var i={},o=h(n);return C(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 Oe(e,t,n){return Ie(e,1/0,t,n)}function Re(e,t,n){return Ie(e,1,t,n)}function Ne(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?c((()=>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),De=g(((e,t,n)=>{var r=m(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 De(T,e,t)}function Pe(e,t,n){return De(C(t),e,n)}function xe(e,t){var n=h(e);return H(((e,t)=>{n(e[0],t)}),t,1)}class Me{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&&We(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&&We(this.heap[t+1],this.heap[t])&&(t+=1),!We(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 We(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=xe(e,t);return n._tasks=new Me,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 c((()=>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)}c(n.process)},delete n.unshift,n}var $e=g((function(e,t){if(t=_(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 Ve(e,t,n,r){var i=[...e].reverse();return q(i,t,n,r)}function Ue(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(Ue):(t={},Object.keys(e).forEach((n=>{t[n]=Ue.call(this,e[n])}))),t}function Ge(e,t,n,r){const i=h(n);return be(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var ze=g((function(e,t,n){return Ge(T,e,t,n)}),3),qe=g((function(e,t,n,r){return Ge(C(t),e,n,r)}),4),Je=g((function(e,t,n){return Ge(R,e,t,n)}),3);function Ye(e){return function(){return e}}function Qe(e,t,n){var r={times:5,intervalFunc:Ye(0)};if(arguments.length<3&&"function"==typeof e?(n=t||j(),t=e):(Ke(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[D]}function Ke(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ye(+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?Qe(e,o,i):Qe(o,i),i[D]}))}function Xe(e,t){return De(R,e,t)}var et=g((function(e,t,n){return te(Boolean,(e=>e))(T,e,t,n)}),3),tt=g((function(e,t,n,r){return te(Boolean,(e=>e))(C(t),e,n,r)}),4),nt=g((function(e,t,n){return te(Boolean,(e=>e))(R,e,t,n)}),3),rt=g((function(e,t,n){var r=h(t);return I(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 Q(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=_(r||j());var i=h(n);return T(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[D]}var ct=g((function(e,t){var n,r=null;return de(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 lt(e){return(...t)=>(e.unmemoized||e)(...t)}var ft=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 dt(e,t,n){const r=h(e);return ft((e=>r(((t,n)=>e(t,!n)))),t,n)}var pt=g((function(e,t){if(t=_(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:O,applyEachSeries:k,asyncify:l,auto:P,autoInject:$,cargo:G,cargoQueue:z,compose:Y,concat:Z,concatLimit:K,concatSeries:X,constant:ee,detect:ne,detectLimit:re,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:le,eachLimit:fe,eachOf:T,eachOfLimit:E,eachOfSeries:R,eachSeries:de,ensureAsync:pe,every:he,everyLimit:ge,everySeries:ye,filter:_e,filterLimit:Se,filterSeries:we,forever:Ce,groupBy:Ae,groupByLimit:Ee,groupBySeries:Le,log:Te,map:I,mapLimit:Q,mapSeries:N,mapValues:Oe,mapValuesLimit:Ie,mapValuesSeries:Re,memoize:Ne,nextTick:ke,parallel:je,parallelLimit:Pe,priorityQueue:Be,queue:xe,race:$e,reduce:q,reduceRight:Ve,reflect:Ue,reflectAll:He,reject:ze,rejectLimit:qe,rejectSeries:Je,retry:Qe,retryable:Ze,seq:J,series:Xe,setImmediate:c,some:et,someLimit:tt,someSeries:nt,sortBy:rt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:ct,unmemoize:lt,until:dt,waterfall:pt,whilst:ft,all:he,allLimit:ge,allSeries:ye,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:re,findSeries:ie,flatMap:Z,flatMapLimit:K,flatMapSeries:X,forEach:le,forEachSeries:de,forEachLimit:fe,forEachOf:T,forEachOfSeries:R,forEachOfLimit:E,inject:q,foldl:q,foldr:Ve,select:_e,selectLimit:Se,selectSeries:we,wrapSync:l,during:ft,doDuring:ae}},33998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var r=s(n(72551)),i=n(51742),o=s(n(53059));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&&c(i,t,n+1)}}function c(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&&c(i,t,n+1)}))}for(;o&&i++<100;)o=!1,c(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},19886:(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)},21014:(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},73699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(72551)),i=n(33998),o=n(51742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var c=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(70010).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,c,l){let f=!1;const d=`UserNotification.alert.${a}`,p=(c=c||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":d in e?f=!1:(f=!0,e[d]=!0);break;case"MAX-COUNT":{let e=0;const n=c.maxCount||1;d in t&&(e=t[d]),t[d]=++e,e<=n&&(f=!0);break}default:f=!0}if(r.default.log("UserNotification.alert",n,f,i,a,u,c),f){const e={url:l,message:u,timeout:p};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=c},13712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(21014))&&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 "),c=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${c}`)}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},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 c(e,t,n,r){var i,o,s,c;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 l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){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 f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(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 c=u.length,l=h(u,c);for(n=0;n<c;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(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 d(this,e,!0)},o.prototype.rawListeners=function(e){return d(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):[]}},44937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},20194:(e,t,n)=>{var r=n(44937),i=n(15401),o=n(92445),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)}},12383:(e,t,n)=>{var r=n(38725),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},14528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},15401:(e,t,n)=>{var r=n(44937),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}},92445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},158:(e,t,n)=>{var r=n(14528),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},38725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},76897:(e,t,n)=>{var r=n(23619),i=n(98253),o=n(95053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,c,l,f,d,p,h=0,g=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=u,r=c;return u=c=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(S,t),g?m(e):f}function _(e){var n=e-p;return void 0===p||n>=t||n<0||y&&e-h>=l}function S(){var e=i();if(_(e))return w(e);d=setTimeout(S,function(e){var n=t-(e-p);return y?a(n,l-(e-h)):n}(e))}function w(e){return d=void 0,v&&u?m(e):(u=c=void 0,f)}function C(){var e=i(),n=_(e);if(u=arguments,c=this,p=e,n){if(void 0===d)return b(p);if(y)return clearTimeout(d),d=setTimeout(S,t),m(p)}return void 0===d&&(d=setTimeout(S,t)),f}return t=o(t)||0,r(n)&&(g=!!n.leading,l=(y="maxWait"in n)?s(o(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==d&&clearTimeout(d),h=0,u=p=c=d=void 0},C.flush=function(){return void 0===d?f:w(i())},C}},23619:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},81653:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},81878:(e,t,n)=>{var r=n(20194),i=n(81653);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},53059: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,c=128,l=1/0,f=9007199254740991,d=NaN,p=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",v="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",S="[object GeneratorFunction]",w="[object Map]",C="[object Number]",E="[object Object]",A="[object Promise]",L="[object RegExp]",T="[object Set]",I="[object String]",O="[object Symbol]",R="[object WeakMap]",N="[object ArrayBuffer]",k="[object DataView]",D="[object Float32Array]",j="[object Float64Array]",P="[object Int8Array]",x="[object Int16Array]",M="[object Int32Array]",F="[object Uint8Array]",W="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,q=RegExp(G.source),J=RegExp(z.source),Y=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,K=/<%=([\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,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\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="["+Ee+"]",Le="["+Se+"]",Te="\\d+",Ie="["+we+"]",Oe="[^\\ud800-\\udfff"+Ee+Te+"\\u2700-\\u27bf"+we+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Ce+"]",Pe="(?:"+Ie+"|"+Oe+")",xe="(?:"+je+"|"+Oe+")",Me="(?:['’](?:d|ll|m|re|s|t|ve))?",Fe="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Le+"|"+Re+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+We+"(?:\\u200d(?:"+[Ne,ke,De].join("|")+")"+Be+We+")*",Ve="(?:"+["[\\u2700-\\u27bf]",ke,De].join("|")+")"+$e,Ue="(?:"+[Ne+Le+"?",Le,ke,De,"[\\ud800-\\udfff]"].join("|")+")",He=RegExp("['’]","g"),Ge=RegExp(Le,"g"),ze=RegExp(Re+"(?="+Re+")|"+Ue+$e,"g"),qe=RegExp([je+"?"+Ie+"+"+Me+"(?="+[Ae,je,"$"].join("|")+")",xe+"+"+Fe+"(?="+[Ae,je+Pe,"$"].join("|")+")",je+"?"+Pe+"+"+Me,je+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,Ve].join("|"),"g"),Je=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["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"],Ke=-1,Ze={};Ze[D]=Ze[j]=Ze[P]=Ze[x]=Ze[M]=Ze[F]=Ze[W]=Ze[B]=Ze[$]=!0,Ze[g]=Ze[y]=Ze[N]=Ze[v]=Ze[k]=Ze[m]=Ze[b]=Ze[_]=Ze[w]=Ze[C]=Ze[E]=Ze[L]=Ze[T]=Ze[I]=Ze[R]=!1;var Xe={};Xe[g]=Xe[y]=Xe[N]=Xe[k]=Xe[v]=Xe[m]=Xe[D]=Xe[j]=Xe[P]=Xe[x]=Xe[M]=Xe[w]=Xe[C]=Xe[E]=Xe[L]=Xe[T]=Xe[I]=Xe[O]=Xe[F]=Xe[W]=Xe[B]=Xe[$]=!0,Xe[b]=Xe[_]=Xe[R]=!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,ct=ut&&rt.process,lt=function(){try{return at&&at.require&&at.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&&lt.isArrayBuffer,dt=lt&&lt.isDate,pt=lt&&lt.isMap,ht=lt&&lt.isRegExp,gt=lt&&lt.isSet,yt=lt&&lt.isTypedArray;function vt(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 mt(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 bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function _t(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 wt(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 Ct(e,t){return!(null==e||!e.length)&&Dt(e,t,0)>-1}function Et(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 Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Tt(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 It(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 Ot(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 Rt=Mt("length");function Nt(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 Dt(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,Pt,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 Pt(e){return e!=e}function xt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:d}function Mt(e){return function(t){return null==t?i:t[e]}}function Ft(e){return function(t){return null==e?i:e[t]}}function Wt(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 Vt(e){return e?e.slice(0,an(e)+1).replace(re,""):e}function Ut(e){return function(t){return e(t)}}function Ht(e,t){return At(t,(function(t){return e[t]}))}function Gt(e,t){return e.has(t)}function zt(e,t){for(var n=-1,r=e.length;++n<r&&Dt(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}function Jt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Yt=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"}),Qt=Ft({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Kt(e){return"\\"+et[e]}function Zt(e){return Je.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=ze.lastIndex=0;ze.test(e);)++t;return t}(e):Rt(e)}function sn(e){return Zt(e)?function(e){return e.match(ze)||[]}(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({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function e(t){var n,r=(t=null==t?ot:cn.defaults(ot.Object(),t,cn.pick(ot,Qe))).Array,ie=t.Date,Se=t.Error,we=t.Function,Ce=t.Math,Ee=t.Object,Ae=t.RegExp,Le=t.String,Te=t.TypeError,Ie=r.prototype,Oe=we.prototype,Re=Ee.prototype,Ne=t["__core-js_shared__"],ke=Oe.toString,De=Re.hasOwnProperty,je=0,Pe=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xe=Re.toString,Me=ke.call(Ee),Fe=ot._,We=Ae("^"+ke.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,$e=t.Symbol,Ve=t.Uint8Array,Ue=Be?Be.allocUnsafe:i,ze=en(Ee.getPrototypeOf,Ee),Je=Ee.create,et=Re.propertyIsEnumerable,rt=Ie.splice,it=$e?$e.isConcatSpreadable:i,st=$e?$e.iterator:i,at=$e?$e.toStringTag:i,ct=function(){try{var e=co(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Rt=ie&&ie.now!==ot.Date.now&&ie.now,Ft=t.setTimeout!==ot.setTimeout&&t.setTimeout,ln=Ce.ceil,fn=Ce.floor,dn=Ee.getOwnPropertySymbols,pn=Be?Be.isBuffer:i,hn=t.isFinite,gn=Ie.join,yn=en(Ee.keys,Ee),vn=Ce.max,mn=Ce.min,bn=ie.now,_n=t.parseInt,Sn=Ce.random,wn=Ie.reverse,Cn=co(t,"DataView"),En=co(t,"Map"),An=co(t,"Promise"),Ln=co(t,"Set"),Tn=co(t,"WeakMap"),In=co(Ee,"create"),On=Tn&&new Tn,Rn={},Nn=Wo(Cn),kn=Wo(En),Dn=Wo(An),jn=Wo(Ln),Pn=Wo(Tn),xn=$e?$e.prototype:i,Mn=xn?xn.valueOf:i,Fn=xn?xn.toString:i;function Wn(e){if(na(e)&&!Gs(e)&&!(e instanceof Un)){if(e instanceof Vn)return e;if(De.call(e,"__wrapped__"))return Bo(e)}return new Vn(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Je)return Je(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function $n(){}function Vn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(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 Gn(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 zn(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.__data__=new zn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Yn(e,t){var n=Gs(e),r=!n&&Hs(e),i=!n&&!r&&Ys(e),o=!n&&!r&&!i&&la(e),s=n||r||i||o,a=s?$t(e.length,Le):[],u=a.length;for(var c in e)!t&&!De.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||a.push(c);return a}function Qn(e){var t=e.length;return t?e[zr(0,t-1)]:i}function Kn(e,t){return jo(Ti(e),sr(t,0,e.length))}function Zn(e){return jo(Ti(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];De.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 fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Ii(t,ka(t),e)}function ir(e,t,n){"__proto__"==t&&ct?ct(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:Ta(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,c=2&t,l=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ta(e))return e;var f=Gs(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ti(e,a)}else{var d=po(e),p=d==_||d==S;if(Ys(e))return Si(e,u);if(d==E||d==g||p&&!o){if(a=c||p?{}:go(e),!u)return c?function(e,t){return Ii(e,fo(e),t)}(e,function(e,t){return e&&Ii(t,Da(t),e)}(a,e)):function(e,t){return Ii(e,lo(e),t)}(e,rr(a,e))}else{if(!Xe[d])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case N:return wi(e);case v:case m:return new i(+e);case k:return function(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case j:case P:case x:case M:case F:case W:case B:case $:return Ci(e,n);case w:return new i;case C:case I:return new i(e);case L:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return r=e,Mn?Ee(Mn.call(r)):{}}}(e,d,u)}}s||(s=new Jn);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 y=f?i:(l?c?no:to:c?Da:ka)(e);return bt(y||e,(function(r,i){y&&(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=Ee(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 cr(e,t,n){if("function"!=typeof e)throw new Te(o);return Ro((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Ct,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=At(t,Ut(n))),r?(o=Et,s=!1):t.length>=200&&(o=Gt,s=!1,t=new qn(t));e:for(;++i<a;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Wn.templateSettings={escape:Y,evaluate:Q,interpolate:K,variable:"",imports:{_:Wn}},Wn.prototype=$n.prototype,Wn.prototype.constructor=Wn,Vn.prototype=Bn($n.prototype),Vn.prototype.constructor=Vn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,Hn.prototype.clear=function(){this.__data__=In?In(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(In){var n=t[e];return n===s?i:n}return De.call(t,e)?t[e]:i},Hn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==i:De.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===i?s:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.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))},Gn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return tr(this.__data__,e)>-1},Gn.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},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(En||Gn),string:new Hn}},zn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},zn.prototype.get=function(e){return ao(this,e).get(e)},zn.prototype.has=function(e){return ao(this,e).has(e)},zn.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},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,s),this},qn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ni(br),dr=Ni(_r,!0);function pr(e,t){var n=!0;return fr(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&&!ca(a):n(a,u)))var u=a,c=s}return c}function gr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?yr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var vr=ki(),mr=ki(!0);function br(e,t){return e&&vr(e,t,ka)}function _r(e,t){return e&&mr(e,t,ka)}function Sr(e,t){return wt(t,(function(t){return Zs(e[t])}))}function wr(e,t){for(var n=0,r=(t=vi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function Cr(e,t,n){var r=t(e);return Gs(e)?r:Lt(r,n(e))}function Er(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Ee(e)?function(e){var t=De.call(e,at),n=e[at];try{e[at]=i;var r=!0}catch(e){}var o=xe.call(e);return r&&(t?e[at]=n:delete e[at]),o}(e):function(e){return xe.call(e)}(e)}function Ar(e,t){return e>t}function Lr(e,t){return null!=e&&De.call(e,t)}function Tr(e,t){return null!=e&&t in Ee(e)}function Ir(e,t,n){for(var o=n?Et:Ct,s=e[0].length,a=e.length,u=a,c=r(a),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=At(d,Ut(t))),l=mn(d.length,l),c[u]=!n&&(t||s>=120&&d.length>=120)?new qn(u&&d):i}d=e[0];var p=-1,h=c[0];e:for(;++p<s&&f.length<l;){var g=d[p],y=t?t(g):g;if(g=n||0!==g?g:0,!(h?Gt(h,y):o(f,y,n))){for(u=a;--u;){var v=c[u];if(!(v?Gt(v,y):o(e[u],y,n)))continue e}h&&h.push(y),f.push(g)}}return f}function Or(e,t,n){var r=null==(e=Lo(e,t=vi(t,e)))?e:e[Fo(Ko(t))];return null==r?i:vt(r,e,n)}function Rr(e){return na(e)&&Er(e)==g}function Nr(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=Gs(e),u=Gs(t),c=a?y:po(e),l=u?y:po(t),f=(c=c==g?E:c)==E,d=(l=l==g?E:l)==E,p=c==l;if(p&&Ys(e)){if(!Ys(t))return!1;a=!0,f=!1}if(p&&!f)return s||(s=new Jn),a||la(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 N:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case v:case m:case C:return $s(+e,+t);case b:return e.name==t.name&&e.message==t.message;case L:case I:return e==t+"";case w:var a=Xt;case T:var u=1&r;if(a||(a=nn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var l=Xi(a(e),a(t),r,i,o,s);return s.delete(e),l;case O:if(Mn)return Mn.call(e)==Mn.call(t)}return!1}(e,t,c,n,r,o,s);if(!(1&n)){var h=f&&De.call(e,"__wrapped__"),_=d&&De.call(t,"__wrapped__");if(h||_){var S=h?e.value():e,A=_?t.value():t;return s||(s=new Jn),o(S,A,n,r,s)}}return!!p&&(s||(s=new Jn),function(e,t,n,r,o,s){var a=1&n,u=to(e),c=u.length;if(c!=to(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:De.call(t,f)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var g=a;++l<c;){var y=e[f=u[l]],v=t[f];if(r)var m=a?r(v,y,f,t,e,s):r(y,v,f,e,t,s);if(!(m===i?y===v||o(y,v,n,r,s):m)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var b=e.constructor,_=t.constructor;b==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,r,o,s))}(e,t,n,r,Nr,o))}function kr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Ee(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 c=(u=n[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var d=new Jn;if(r)var p=r(l,f,c,e,t,d);if(!(p===i?Nr(f,l,3,r,d):p))return!1}}return!0}function Dr(e){return!(!ta(e)||(t=e,Pe&&Pe in t))&&(Zs(e)?We:ge).test(Wo(e));var t}function jr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Gs(e)?Wr(e[0],e[1]):Fr(e):pu(e)}function Pr(e){if(!wo(e))return yn(e);var t=[];for(var n in Ee(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function xr(e,t){return e<t}function Mr(e,t){var n=-1,i=qs(e)?r(e.length):[];return fr(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]?Eo(t[0][0],t[0][1]):function(n){return n===e||kr(n,e,t)}}function Wr(e,t){return bo(e)&&Co(t)?Eo(Fo(e),t):function(n){var r=Ta(n,e);return r===i&&r===t?Ia(n,e):Nr(t,r,3)}}function Br(e,t,n,r,o){e!==t&&vr(t,(function(s,a){if(o||(o=new Jn),ta(s))!function(e,t,n,r,o,s,a){var u=Io(e,n),c=Io(t,n),l=a.get(c);if(l)Xn(e,n,l);else{var f=s?s(u,c,n+"",e,t,a):i,d=f===i;if(d){var p=Gs(c),h=!p&&Ys(c),g=!p&&!h&&la(c);f=c,p||h||g?Gs(u)?f=u:Js(u)?f=Ti(u):h?(d=!1,f=Si(c,!0)):g?(d=!1,f=Ci(c,!0)):f=[]:oa(c)||Hs(c)?(f=u,Hs(u)?f=ma(u):ta(u)&&!Zs(u)||(f=go(c))):d=!1}d&&(a.set(c,f),o(f,c,r,s,a),a.delete(c)),Xn(e,n,f)}}(e,t,a,n,Br,r,o);else{var u=r?r(Io(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Xn(e,a,u)}}),Da)}function $r(e,t){var n=e.length;if(n)return vo(t+=t<0?n:0,n)?e[t]:i}function Vr(e,t,n){t=t.length?At(t,(function(e){return Gs(e)?function(t){return wr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;return t=At(t,Ut(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=Ei(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}(Mr(e,(function(e,n,i){return{criteria:At(t,(function(t){return t(e)})),index:++r,value:e}})))}function Ur(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=wr(e,s);n(a,s)&&Kr(o,vi(s,e),a)}return o}function Hr(e,t,n,r){var i=r?jt:Dt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),n&&(a=At(e,Ut(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&rt.call(a,u,1),rt.call(e,u,1);return e}function Gr(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;vo(i)?rt.call(e,i,1):ci(e,i)}}return e}function zr(e,t){return e+fn(Sn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return No(Ao(e,t,iu),e+"")}function Yr(e){return Qn($a(e))}function Qr(e,t){var n=$a(e);return jo(n,sr(t,0,n.length))}function Kr(e,t,n,r){if(!ta(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ta(f)?f:vo(t[o+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Zr=On?function(e,t){return On.set(e,t),e}:iu,Xr=ct?function(e,t){return ct(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 fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ca(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,c=ca(t),l=t===i;o<s;){var f=fn((o+s)/2),d=n(e[f]),p=d!==i,h=null===d,g=d==d,y=ca(d);if(a)var v=r||g;else v=l?g&&(r||p):u?g&&p&&(r||!h):c?g&&p&&!h&&(r||!y):!h&&!y&&(r?d<=t:d<t);v?o=f+1:s=f}return mn(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:ca(e)?d:+e}function ai(e){if("string"==typeof e)return e;if(Gs(e))return At(e,ai)+"";if(ca(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=Ct,o=e.length,s=!0,a=[],u=a;if(n)s=!1,i=Et;else if(o>=200){var c=t?null:qi(e);if(c)return nn(c);s=!1,i=Gt,u=new qn}else u=t?[]:a;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,n)||(u!==a&&u.push(f),a.push(l))}return a}function ci(e,t){return null==(e=Lo(e,t=vi(t,e)))||delete e[Fo(Ko(t))]}function li(e,t,n,r){return Kr(e,t,n(wr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function di(e,t){var n=e;return n instanceof Un&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([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]=lr(s[o]||a,e[u],t,n));return ui(yr(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 Js(e)?e:[]}function yi(e){return"function"==typeof e?e:iu}function vi(e,t){return Gs(e)?e:bo(e,t)?[e]:Mo(ba(e))}var mi=Jr;function bi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=lt||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function wi(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ci(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=ca(e),a=t!==i,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&e<t||l&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!c)return-1}return 0}function Ai(e,t,n,i){for(var o=-1,s=e.length,a=n.length,u=-1,c=t.length,l=vn(s-a,0),f=r(c+l),d=!i;++u<c;)f[u]=t[u];for(;++o<a;)(d||o<s)&&(f[n[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Li(e,t,n,i){for(var o=-1,s=e.length,a=-1,u=n.length,c=-1,l=t.length,f=vn(s-u,0),d=r(f+l),p=!i;++o<f;)d[o]=e[o];for(var h=o;++c<l;)d[h+c]=t[c];for(;++a<u;)(p||o<s)&&(d[h+n[a]]=e[o++]);return d}function Ti(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ii(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):er(n,u,c)}return n}function Oi(e,t){return function(n,r){var i=Gs(n)?mt:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Ri(e){return Jr((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&&mo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++r<o;){var u=n[r];u&&e(t,u,r,s)}return t}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!qs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ee(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=Ee(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 Di(e){return function(t){var n=Zt(t=ba(t))?sn(t):i,r=n?n[0]:t.charAt(0),o=n?bi(n,1).join(""):t.slice(1);return r[e]()+o}}function ji(e){return function(t){return Tt(Za(Ha(t).replace(He,"")),e,"")}}function Pi(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 xi(e){return function(t,n,r){var o=Ee(t);if(!qs(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 Mi(e){return eo((function(t){var n=t.length,r=n,s=Vn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Te(o);if(s&&!u&&"wrapper"==io(a))var u=new Vn([],!0)}for(r=u?r:n;++r<n;){var c=io(a=t[r]),l="wrapper"==c?ro(a):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==a.length&&_o(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Gs(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,l,f,d){var p=t&c,h=1&t,g=2&t,y=24&t,v=512&t,m=g?i:Pi(e);return function i(){for(var c=arguments.length,b=r(c),_=c;_--;)b[_]=arguments[_];if(y)var S=oo(i),w=Jt(b,S);if(o&&(b=Ai(b,o,s,y)),a&&(b=Li(b,a,u,y)),c-=w,y&&c<d){var C=tn(b,S);return Gi(e,t,Fi,i.placeholder,n,b,C,l,f,d-c)}var E=h?n:this,A=g?E[e]:e;return c=b.length,l?b=To(b,l):v&&c>1&&b.reverse(),p&&f<c&&(b.length=f),this&&this!==ot&&this instanceof i&&(A=m||Pi(A)),A.apply(E,b)}}function Wi(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function 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,Ut(so())),Jr((function(n){var r=this;return e(t,(function(e){return vt(e,r,n)}))}))}))}function Vi(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,ln(e/on(t)));return Zt(t)?bi(sn(r),0,e).join(""):r.slice(0,e)}function Ui(e){return function(t,n,o){return o&&"number"!=typeof o&&mo(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=vn(ln((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=va(t),n=va(n)),e(t,n)}}function Gi(e,t,n,r,o,s,a,c,l,f){var d=8&t;t|=d?u:64,4&(t&=~(d?64:u))||(t&=-4);var p=[e,t,o,d?s:i,d?a:i,d?i:s,d?i:a,c,l,f],h=n.apply(i,p);return _o(e)&&Oo(h,p),h.placeholder=r,ko(h,e,t)}function zi(e){var t=Ce[e];return function(e,n){if(e=va(e),(n=null==n?0:mn(ga(n),292))&&hn(e)){var r=(ba(e)+"e").split("e");return+((r=(ba(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var qi=Ln&&1/nn(new Ln([,-0]))[1]==l?function(e){return new Ln(e)}:cu;function Ji(e){return function(t){var n=po(t);return n==w?Xt(t):n==T?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,s,l,f,d,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(o);var g=s?s.length:0;if(g||(t&=-97,s=l=i),d=d===i?d:vn(ga(d),0),p=p===i?p:ga(p),g-=l?l.length:0,64&t){var y=s,v=l;s=l=i}var m=h?i:ro(e),b=[e,t,n,s,l,y,v,f,d,p];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==c&&8==n||r==c&&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 l=e[3];e[3]=l?Ai(l,u,t[4]):u,e[4]=l?tn(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Li(l,u,t[6]):u,e[6]=l?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,m),e=b[0],t=b[1],n=b[2],s=b[3],l=b[4],!(p=b[9]=b[9]===i?h?0:e.length:vn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=Pi(e);return function s(){for(var a=arguments.length,u=r(a),c=a,l=oo(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:tn(u,l);return(a-=f.length)<n?Gi(e,t,Fi,s.placeholder,i,u,f,i,i,n-a):vt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,p):t!=u&&33!=t||l.length?Fi.apply(i,b):function(e,t,n,i){var o=1&t,s=Pi(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),d=this&&this!==ot&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return vt(d,o?n:this,f)}}(e,t,n,s);else var _=function(e,t,n){var r=1&t,i=Pi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return ko((m?Zr:Oo)(_,b),e,t)}function Qi(e,t,n,r){return e===i||$s(e,Re[n])&&!De.call(r,n)?t:e}function Ki(e,t,n,r,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Br(e,t,i,Ki,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,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,h=2&n?new qn:i;for(s.set(e,t),s.set(t,e);++d<u;){var g=e[d],y=t[d];if(r)var v=a?r(y,g,d,t,e,s):r(g,y,d,e,t,s);if(v!==i){if(v)continue;p=!1;break}if(h){if(!Ot(t,(function(e,t){if(!Gt(h,t)&&(g===e||o(g,e,n,r,s)))return h.push(t)}))){p=!1;break}}else if(g!==y&&!o(g,y,n,r,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return No(Ao(e,i,zo),e+"")}function to(e){return Cr(e,ka,lo)}function no(e){return Cr(e,Da,fo)}var ro=On?function(e){return On.get(e)}:cu;function io(e){for(var t=e.name+"",n=Rn[t],r=De.call(Rn,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(De.call(Wn,"placeholder")?Wn:e).placeholder}function so(){var e=Wn.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,Co(i)]}return t}function co(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Dr(n)?n:i}var lo=dn?function(e){return null==e?[]:(e=Ee(e),wt(dn(e),(function(t){return et.call(e,t)})))}:yu,fo=dn?function(e){for(var t=[];e;)Lt(t,lo(e)),e=ze(e);return t}:yu,po=Er;function ho(e,t,n){for(var r=-1,i=(t=vi(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)&&vo(s,i)&&(Gs(e)||Hs(e))}function go(e){return"function"!=typeof e.constructor||wo(e)?{}:Bn(ze(e))}function yo(e){return Gs(e)||Hs(e)||!!(it&&e&&e[it])}function vo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?qs(n)&&vo(t,n.length):"string"==r&&t in n)&&$s(n[t],e)}function bo(e,t){if(Gs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function _o(e){var t=io(e),n=Wn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(Cn&&po(new Cn(new ArrayBuffer(1)))!=k||En&&po(new En)!=w||An&&po(An.resolve())!=A||Ln&&po(new Ln)!=T||Tn&&po(new Tn)!=R)&&(po=function(e){var t=Er(e),n=t==E?e.constructor:i,r=n?Wo(n):"";if(r)switch(r){case Nn:return k;case kn:return w;case Dn:return A;case jn:return T;case Pn:return R}return t});var So=Ne?Zs:vu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Co(e){return e==e&&!ta(e)}function Eo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ee(n))}}function Ao(e,t,n){return t=vn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=vn(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),vt(e,this,u)}}function Lo(e,t){return t.length<2?e:wr(e,ti(t,0,-1))}function To(e,t){for(var n=e.length,r=mn(t.length,n),o=Ti(e);r--;){var s=t[r];e[r]=vo(s,n)?o[s]:i}return e}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Do(Zr),Ro=Ft||function(e,t){return ot.setTimeout(e,t)},No=Do(Xr);function ko(e,t,n){var r=t+"";return No(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 bt(h,(function(n){var r="_."+n[0];t&n[1]&&!Ct(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Do(e){var t=0,n=0;return function(){var r=bn(),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=zr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Po,xo,Mo=(Po=Ps((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}),(function(e){return 500===xo.size&&xo.clear(),e})),xo=Po.cache,Po);function Fo(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Wo(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Un)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Jr((function(e,t){return Js(e)?lr(e,yr(t,1,Js,!0)):[]})),Vo=Jr((function(e,t){var n=Ko(t);return Js(n)&&(n=i),Js(e)?lr(e,yr(t,1,Js,!0),so(n,2)):[]})),Uo=Jr((function(e,t){var n=Ko(t);return Js(n)&&(n=i),Js(e)?lr(e,yr(t,1,Js,!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=vn(r+i,0)),kt(e,so(t,3),i)}function Go(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?vn(r+o,0):mn(o,r-1)),kt(e,so(t,3),o,!0)}function zo(e){return null!=e&&e.length?yr(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Jo=Jr((function(e){var t=At(e,gi);return t.length&&t[0]===e[0]?Ir(t):[]})),Yo=Jr((function(e){var t=Ko(e),n=At(e,gi);return t===Ko(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ir(n,so(t,2)):[]})),Qo=Jr((function(e){var t=Ko(e),n=At(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ir(n,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Jr(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 Gr(e,At(t,(function(e){return vo(e,n)?+e:e})).sort(Ei)),r}));function ts(e){return null==e?e:wn.call(e)}var ns=Jr((function(e){return ui(yr(e,1,Js,!0))})),rs=Jr((function(e){var t=Ko(e);return Js(t)&&(t=i),ui(yr(e,1,Js,!0),so(t,2))})),is=Jr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,ui(yr(e,1,Js,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Js(e))return t=vn(e.length,t),!0})),$t(t,(function(t){return At(e,Mt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:At(n,(function(e){return vt(t,i,e)}))}var as=Jr((function(e,t){return Js(e)?lr(e,t):[]})),us=Jr((function(e){return pi(wt(e,Js))})),cs=Jr((function(e){var t=Ko(e);return Js(t)&&(t=i),pi(wt(e,Js),so(t,2))})),ls=Jr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,pi(wt(e,Js),i,t)})),fs=Jr(os),ds=Jr((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=Wn(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 Un&&vo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Vn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ys=Oi((function(e,t,n){De.call(e,n)?++e[n]:ir(e,n,1)})),vs=xi(Ho),ms=xi(Go);function bs(e,t){return(Gs(e)?bt:fr)(e,so(t,3))}function _s(e,t){return(Gs(e)?_t:dr)(e,so(t,3))}var Ss=Oi((function(e,t,n){De.call(e,n)?e[n].push(t):ir(e,n,[t])})),ws=Jr((function(e,t,n){var i=-1,o="function"==typeof t,s=qs(e)?r(e.length):[];return fr(e,(function(e){s[++i]=o?vt(t,e,n):Or(e,t,n)})),s})),Cs=Oi((function(e,t,n){ir(e,n,t)}));function Es(e,t){return(Gs(e)?At:Mr)(e,so(t,3))}var As=Oi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ls=Jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mo(e,t[0],t[1])?t=[]:n>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,yr(t,1),[])})),Ts=Rt||function(){return ot.Date.now()};function Is(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,c,i,i,i,i,t)}function Os(e,t){var n;if("function"!=typeof t)throw new Te(o);return e=ga(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Rs=Jr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Rs));r|=u}return Yi(e,r,t,n,i)})),Ns=Jr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(Ns));r|=u}return Yi(t,r,e,n,i)}));function ks(e,t,n){var r,s,a,u,c,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(o);function g(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function y(e){return f=e,c=Ro(m,t),d?g(e):u}function v(e){var n=e-l;return l===i||n>=t||n<0||p&&e-f>=a}function m(){var e=Ts();if(v(e))return b(e);c=Ro(m,function(e){var n=t-(e-l);return p?mn(n,a-(e-f)):n}(e))}function b(e){return c=i,h&&r?g(e):(r=s=i,u)}function _(){var e=Ts(),n=v(e);if(r=arguments,s=this,l=e,n){if(c===i)return y(l);if(p)return _i(c),c=Ro(m,t),g(l)}return c===i&&(c=Ro(m,t)),u}return t=va(t)||0,ta(n)&&(d=!!n.leading,a=(p="maxWait"in n)?vn(va(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:b(Ts())},_}var Ds=Jr((function(e,t){return cr(e,1,t)})),js=Jr((function(e,t,n){return cr(e,va(t)||0,n)}));function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(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(Ps.Cache||zn),n}function xs(e){if("function"!=typeof e)throw new Te(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)}}Ps.Cache=zn;var Ms=mi((function(e,t){var n=(t=1==t.length&&Gs(t[0])?At(t[0],Ut(so())):At(yr(t,1),Ut(so()))).length;return Jr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return vt(e,this,r)}))})),Fs=Jr((function(e,t){var n=tn(t,oo(Fs));return Yi(e,u,i,t,n)})),Ws=Jr((function(e,t){var n=tn(t,oo(Ws));return Yi(e,64,i,t,n)})),Bs=eo((function(e,t){return Yi(e,256,i,i,i,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Vs=Hi(Ar),Us=Hi((function(e,t){return e>=t})),Hs=Rr(function(){return arguments}())?Rr:function(e){return na(e)&&De.call(e,"callee")&&!et.call(e,"callee")},Gs=r.isArray,zs=ft?Ut(ft):function(e){return na(e)&&Er(e)==N};function qs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Js(e){return na(e)&&qs(e)}var Ys=pn||vu,Qs=dt?Ut(dt):function(e){return na(e)&&Er(e)==m};function Ks(e){if(!na(e))return!1;var t=Er(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Er(e);return t==_||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<=f}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?Ut(pt):function(e){return na(e)&&po(e)==w};function ia(e){return"number"==typeof e||na(e)&&Er(e)==C}function oa(e){if(!na(e)||Er(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ke.call(n)==Me}var sa=ht?Ut(ht):function(e){return na(e)&&Er(e)==L},aa=gt?Ut(gt):function(e){return na(e)&&po(e)==T};function ua(e){return"string"==typeof e||!Gs(e)&&na(e)&&Er(e)==I}function ca(e){return"symbol"==typeof e||na(e)&&Er(e)==O}var la=yt?Ut(yt):function(e){return na(e)&&ea(e.length)&&!!Ze[Er(e)]},fa=Hi(xr),da=Hi((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(qs(e))return ua(e)?sn(e):Ti(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==w?Xt:t==T?nn:$a)(e)}function ha(e){return e?(e=va(e))===l||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 ya(e){return e?sr(ga(e),0,p):0}function va(e){if("number"==typeof e)return e;if(ca(e))return d;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=Vt(e);var n=he.test(e);return n||ye.test(e)?nt(e.slice(2),n?2:8):pe.test(e)?d:+e}function ma(e){return Ii(e,Da(e))}function ba(e){return null==e?"":ai(e)}var _a=Ri((function(e,t){if(wo(t)||qs(t))Ii(t,ka(t),e);else for(var n in t)De.call(t,n)&&er(e,n,t[n])})),Sa=Ri((function(e,t){Ii(t,Da(t),e)})),wa=Ri((function(e,t,n,r){Ii(t,Da(t),e,r)})),Ca=Ri((function(e,t,n,r){Ii(t,ka(t),e,r)})),Ea=eo(or),Aa=Jr((function(e,t){e=Ee(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Da(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||$s(f,Re[l])&&!De.call(e,l))&&(e[l]=s[l])}return e})),La=Jr((function(e){return e.push(i,Ki),vt(Pa,i,e)}));function Ta(e,t,n){var r=null==e?i:wr(e,t);return r===i?n:r}function Ia(e,t){return null!=e&&ho(e,t,Tr)}var Oa=Wi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xe.call(t)),e[t]=n}),tu(iu)),Ra=Wi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xe.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]}),so),Na=Jr(Or);function ka(e){return qs(e)?Yn(e):Pr(e)}function Da(e){return qs(e)?Yn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=wo(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}(e)}var ja=Ri((function(e,t,n){Br(e,t,n)})),Pa=Ri((function(e,t,n,r){Br(e,t,n,r)})),xa=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=At(t,(function(t){return t=vi(t,e),r||(r=t.length>1),t})),Ii(e,no(e),n),r&&(n=ar(n,7,Zi));for(var i=t.length;i--;)ci(n,t[i]);return n})),Ma=eo((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Ia(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),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Wa=Ji(ka),Ba=Ji(Da);function $a(e){return null==e?[]:Ht(e,ka(e))}var Va=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Ka(ba(e).toLowerCase())}function Ha(e){return(e=ba(e))&&e.replace(me,Yt).replace(Ge,"")}var Ga=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),za=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qa=Di("toLowerCase"),Ja=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ya=ji((function(e,t,n){return e+(n?" ":"")+Ka(t)})),Qa=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ka=Di("toUpperCase");function Za(e,t,n){return e=ba(e),(t=n?i:t)===i?function(e){return Ye.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Jr((function(e,t){try{return vt(e,i,t)}catch(e){return Ks(e)?e:new Se(e)}})),eu=eo((function(e,t){return bt(t,(function(t){t=Fo(t),ir(e,t,Rs(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Mi(),ru=Mi(!0);function iu(e){return e}function ou(e){return jr("function"==typeof e?e:ar(e,1))}var su=Jr((function(e,t){return function(n){return Or(n,e,t)}})),au=Jr((function(e,t){return function(n){return Or(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 bt(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__=Ti(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function cu(){}var lu=$i(At),fu=$i(St),du=$i(Ot);function pu(e){return bo(e)?Mt(Fo(e)):function(e){return function(t){return wr(t,e)}}(e)}var hu=Ui(),gu=Ui(!0);function yu(){return[]}function vu(){return!1}var mu,bu=Bi((function(e,t){return e+t}),0),_u=zi("ceil"),Su=Bi((function(e,t){return e/t}),1),wu=zi("floor"),Cu=Bi((function(e,t){return e*t}),1),Eu=zi("round"),Au=Bi((function(e,t){return e-t}),0);return Wn.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},Wn.ary=Is,Wn.assign=_a,Wn.assignIn=Sa,Wn.assignInWith=wa,Wn.assignWith=Ca,Wn.at=Ea,Wn.before=Os,Wn.bind=Rs,Wn.bindAll=eu,Wn.bindKey=Ns,Wn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Gs(e)?e:[e]},Wn.chain=ps,Wn.chunk=function(e,t,n){t=(n?mo(e,t,n):t===i)?1:vn(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(ln(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},Wn.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},Wn.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 Lt(Gs(n)?Ti(n):[n],yr(t,1))},Wn.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 Te(o);return[n(e[0]),e[1]]})):[],Jr((function(n){for(var r=-1;++r<t;){var i=e[r];if(vt(i[0],this,n))return vt(i[1],this,n)}}))},Wn.conforms=function(e){return function(e){var t=ka(e);return function(n){return ur(n,e,t)}}(ar(e,1))},Wn.constant=tu,Wn.countBy=ys,Wn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},Wn.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Wn.curryRight=function e(t,n,r){var o=Yi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Wn.debounce=ks,Wn.defaults=Aa,Wn.defaultsDeep=La,Wn.defer=Ds,Wn.delay=js,Wn.difference=$o,Wn.differenceBy=Vo,Wn.differenceWith=Uo,Wn.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):[]},Wn.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):[]},Wn.dropRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0,!0):[]},Wn.dropWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0):[]},Wn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&mo(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:ya(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Wn.filter=function(e,t){return(Gs(e)?wt:gr)(e,so(t,3))},Wn.flatMap=function(e,t){return yr(Es(e,t),1)},Wn.flatMapDeep=function(e,t){return yr(Es(e,t),l)},Wn.flatMapDepth=function(e,t,n){return n=n===i?1:ga(n),yr(Es(e,t),n)},Wn.flatten=zo,Wn.flattenDeep=function(e){return null!=e&&e.length?yr(e,l):[]},Wn.flattenDepth=function(e,t){return null!=e&&e.length?yr(e,t=t===i?1:ga(t)):[]},Wn.flip=function(e){return Yi(e,512)},Wn.flow=nu,Wn.flowRight=ru,Wn.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},Wn.functions=function(e){return null==e?[]:Sr(e,ka(e))},Wn.functionsIn=function(e){return null==e?[]:Sr(e,Da(e))},Wn.groupBy=Ss,Wn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Wn.intersection=Jo,Wn.intersectionBy=Yo,Wn.intersectionWith=Qo,Wn.invert=Oa,Wn.invertBy=Ra,Wn.invokeMap=ws,Wn.iteratee=ou,Wn.keyBy=Cs,Wn.keys=ka,Wn.keysIn=Da,Wn.map=Es,Wn.mapKeys=function(e,t){var n={};return t=so(t,3),br(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Wn.mapValues=function(e,t){var n={};return t=so(t,3),br(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Wn.matches=function(e){return Fr(ar(e,1))},Wn.matchesProperty=function(e,t){return Wr(e,ar(t,1))},Wn.memoize=Ps,Wn.merge=ja,Wn.mergeWith=Pa,Wn.method=su,Wn.methodOf=au,Wn.mixin=uu,Wn.negate=xs,Wn.nthArg=function(e){return e=ga(e),Jr((function(t){return $r(t,e)}))},Wn.omit=xa,Wn.omitBy=function(e,t){return Fa(e,xs(so(t)))},Wn.once=function(e){return Os(2,e)},Wn.orderBy=function(e,t,n,r){return null==e?[]:(Gs(t)||(t=null==t?[]:[t]),Gs(n=r?i:n)||(n=null==n?[]:[n]),Vr(e,t,n))},Wn.over=lu,Wn.overArgs=Ms,Wn.overEvery=fu,Wn.overSome=du,Wn.partial=Fs,Wn.partialRight=Ws,Wn.partition=As,Wn.pick=Ma,Wn.pickBy=Fa,Wn.property=pu,Wn.propertyOf=function(e){return function(t){return null==e?i:wr(e,t)}},Wn.pull=Zo,Wn.pullAll=Xo,Wn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,so(n,2)):e},Wn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,i,n):e},Wn.pullAt=es,Wn.range=hu,Wn.rangeRight=gu,Wn.rearg=Bs,Wn.reject=function(e,t){return(Gs(e)?wt:gr)(e,xs(so(t,3)))},Wn.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 Gr(e,i),n},Wn.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Jr(e,t=t===i?t:ga(t))},Wn.reverse=ts,Wn.sampleSize=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ga(t),(Gs(e)?Kn:Qr)(e,t)},Wn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Wn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Kr(e,t,n,r)},Wn.shuffle=function(e){return(Gs(e)?Zn:ei)(e)},Wn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mo(e,t,n)?(t=0,n=r):(t=null==t?0:ga(t),n=n===i?r:ga(n)),ti(e,t,n)):[]},Wn.sortBy=Ls,Wn.sortedUniq=function(e){return e&&e.length?oi(e):[]},Wn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Wn.split=function(e,t,n){return n&&"number"!=typeof n&&mo(e,t,n)&&(t=n=i),(n=n===i?p:n>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?bi(sn(e),0,n):e.split(t,n):[]},Wn.spread=function(e,t){if("function"!=typeof e)throw new Te(o);return t=null==t?0:vn(ga(t),0),Jr((function(n){var r=n[t],i=bi(n,0,t);return r&&Lt(i,r),vt(e,this,i)}))},Wn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Wn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ga(t))<0?0:t):[]},Wn.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):[]},Wn.takeRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!1,!0):[]},Wn.takeWhile=function(e,t){return e&&e.length?fi(e,so(t,3)):[]},Wn.tap=function(e,t){return t(e),e},Wn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Te(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})},Wn.thru=hs,Wn.toArray=pa,Wn.toPairs=Wa,Wn.toPairsIn=Ba,Wn.toPath=function(e){return Gs(e)?At(e,Fo):ca(e)?[e]:Ti(Mo(ba(e)))},Wn.toPlainObject=ma,Wn.transform=function(e,t,n){var r=Gs(e),i=r||Ys(e)||la(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Zs(o)?Bn(ze(e)):{}}return(i?bt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Wn.unary=function(e){return Is(e,1)},Wn.union=ns,Wn.unionBy=rs,Wn.unionWith=is,Wn.uniq=function(e){return e&&e.length?ui(e):[]},Wn.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},Wn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Wn.unset=function(e,t){return null==e||ci(e,t)},Wn.unzip=os,Wn.unzipWith=ss,Wn.update=function(e,t,n){return null==e?e:li(e,t,yi(n))},Wn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,yi(n),r)},Wn.values=$a,Wn.valuesIn=function(e){return null==e?[]:Ht(e,Da(e))},Wn.without=as,Wn.words=Za,Wn.wrap=function(e,t){return Fs(yi(t),e)},Wn.xor=us,Wn.xorBy=cs,Wn.xorWith=ls,Wn.zip=fs,Wn.zipObject=function(e,t){return hi(e||[],t||[],er)},Wn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Kr)},Wn.zipWith=ds,Wn.entries=Wa,Wn.entriesIn=Ba,Wn.extend=Sa,Wn.extendWith=wa,uu(Wn,Wn),Wn.add=bu,Wn.attempt=Xa,Wn.camelCase=Va,Wn.capitalize=Ua,Wn.ceil=_u,Wn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=va(n))==n?n:0),t!==i&&(t=(t=va(t))==t?t:0),sr(va(e),t,n)},Wn.clone=function(e){return ar(e,4)},Wn.cloneDeep=function(e){return ar(e,5)},Wn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Wn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Wn.conformsTo=function(e,t){return null==t||ur(e,t,ka(t))},Wn.deburr=Ha,Wn.defaultTo=function(e,t){return null==e||e!=e?t:e},Wn.divide=Su,Wn.endsWith=function(e,t,n){e=ba(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},Wn.eq=$s,Wn.escape=function(e){return(e=ba(e))&&J.test(e)?e.replace(z,Qt):e},Wn.escapeRegExp=function(e){return(e=ba(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Wn.every=function(e,t,n){var r=Gs(e)?St:pr;return n&&mo(e,t,n)&&(t=i),r(e,so(t,3))},Wn.find=vs,Wn.findIndex=Ho,Wn.findKey=function(e,t){return Nt(e,so(t,3),br)},Wn.findLast=ms,Wn.findLastIndex=Go,Wn.findLastKey=function(e,t){return Nt(e,so(t,3),_r)},Wn.floor=wu,Wn.forEach=bs,Wn.forEachRight=_s,Wn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Da)},Wn.forInRight=function(e,t){return null==e?e:mr(e,so(t,3),Da)},Wn.forOwn=function(e,t){return e&&br(e,so(t,3))},Wn.forOwnRight=function(e,t){return e&&_r(e,so(t,3))},Wn.get=Ta,Wn.gt=Vs,Wn.gte=Us,Wn.has=function(e,t){return null!=e&&ho(e,t,Lr)},Wn.hasIn=Ia,Wn.head=qo,Wn.identity=iu,Wn.includes=function(e,t,n,r){e=qs(e)?e:$a(e),n=n&&!r?ga(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Dt(e,t,n)>-1},Wn.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=vn(r+i,0)),Dt(e,t,i)},Wn.inRange=function(e,t,n){return t=ha(t),n===i?(n=t,t=0):n=ha(n),function(e,t,n){return e>=mn(t,n)&&e<vn(t,n)}(e=va(e),t,n)},Wn.invoke=Na,Wn.isArguments=Hs,Wn.isArray=Gs,Wn.isArrayBuffer=zs,Wn.isArrayLike=qs,Wn.isArrayLikeObject=Js,Wn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Er(e)==v},Wn.isBuffer=Ys,Wn.isDate=Qs,Wn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},Wn.isEmpty=function(e){if(null==e)return!0;if(qs(e)&&(Gs(e)||"string"==typeof e||"function"==typeof e.splice||Ys(e)||la(e)||Hs(e)))return!e.length;var t=po(e);if(t==w||t==T)return!e.size;if(wo(e))return!Pr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Wn.isEqual=function(e,t){return Nr(e,t)},Wn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Nr(e,t,i,n):!!r},Wn.isError=Ks,Wn.isFinite=function(e){return"number"==typeof e&&hn(e)},Wn.isFunction=Zs,Wn.isInteger=Xs,Wn.isLength=ea,Wn.isMap=ra,Wn.isMatch=function(e,t){return e===t||kr(e,t,uo(t))},Wn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,kr(e,t,uo(t),n)},Wn.isNaN=function(e){return ia(e)&&e!=+e},Wn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Wn.isNil=function(e){return null==e},Wn.isNull=function(e){return null===e},Wn.isNumber=ia,Wn.isObject=ta,Wn.isObjectLike=na,Wn.isPlainObject=oa,Wn.isRegExp=sa,Wn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},Wn.isSet=aa,Wn.isString=ua,Wn.isSymbol=ca,Wn.isTypedArray=la,Wn.isUndefined=function(e){return e===i},Wn.isWeakMap=function(e){return na(e)&&po(e)==R},Wn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Er(e)},Wn.join=function(e,t){return null==e?"":gn.call(e,t)},Wn.kebabCase=Ga,Wn.last=Ko,Wn.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?vn(r+o,0):mn(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,Pt,o,!0)},Wn.lowerCase=za,Wn.lowerFirst=qa,Wn.lt=fa,Wn.lte=da,Wn.max=function(e){return e&&e.length?hr(e,iu,Ar):i},Wn.maxBy=function(e,t){return e&&e.length?hr(e,so(t,2),Ar):i},Wn.mean=function(e){return xt(e,iu)},Wn.meanBy=function(e,t){return xt(e,so(t,2))},Wn.min=function(e){return e&&e.length?hr(e,iu,xr):i},Wn.minBy=function(e,t){return e&&e.length?hr(e,so(t,2),xr):i},Wn.stubArray=yu,Wn.stubFalse=vu,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=Cu,Wn.nth=function(e,t){return e&&e.length?$r(e,ga(t)):i},Wn.noConflict=function(){return ot._===this&&(ot._=Fe),this},Wn.noop=cu,Wn.now=Ts,Wn.pad=function(e,t,n){e=ba(e);var r=(t=ga(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Vi(fn(i),n)+e+Vi(ln(i),n)},Wn.padEnd=function(e,t,n){e=ba(e);var r=(t=ga(t))?on(e):0;return t&&r<t?e+Vi(t-r,n):e},Wn.padStart=function(e,t,n){e=ba(e);var r=(t=ga(t))?on(e):0;return t&&r<t?Vi(t-r,n)+e:e},Wn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(ba(e).replace(re,""),t||0)},Wn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mo(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 mn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return zr(e,t)},Wn.reduce=function(e,t,n){var r=Gs(e)?Tt:Wt,i=arguments.length<3;return r(e,so(t,4),n,i,fr)},Wn.reduceRight=function(e,t,n){var r=Gs(e)?It:Wt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},Wn.repeat=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ga(t),qr(ba(e),t)},Wn.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wn.result=function(e,t,n){var r=-1,o=(t=vi(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},Wn.round=Eu,Wn.runInContext=e,Wn.sample=function(e){return(Gs(e)?Qn:Yr)(e)},Wn.size=function(e){if(null==e)return 0;if(qs(e))return ua(e)?on(e):e.length;var t=po(e);return t==w||t==T?e.size:Pr(e).length},Wn.snakeCase=Ja,Wn.some=function(e,t,n){var r=Gs(e)?Ot:ni;return n&&mo(e,t,n)&&(t=i),r(e,so(t,3))},Wn.sortedIndex=function(e,t){return ri(e,t)},Wn.sortedIndexBy=function(e,t,n){return ii(e,t,so(n,2))},Wn.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},Wn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Wn.sortedLastIndexBy=function(e,t,n){return ii(e,t,so(n,2),!0)},Wn.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},Wn.startCase=Ya,Wn.startsWith=function(e,t,n){return e=ba(e),n=null==n?0:sr(ga(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},Wn.subtract=Au,Wn.sum=function(e){return e&&e.length?Bt(e,iu):0},Wn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},Wn.template=function(e,t,n){var r=Wn.templateSettings;n&&mo(e,t,n)&&(t=i),e=ba(e),t=wa({},t,r,Qi);var o,s,a=wa({},t.imports,r.imports,Qi),u=ka(a),c=Ht(a,u),l=0,f=t.interpolate||be,d="__p += '",p=Ae((t.escape||be).source+"|"+f.source+"|"+(f===K?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";e.replace(p,(function(t,n,r,i,a,u){return r||(r=i),d+=e.slice(l,u).replace(_e,Kt),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var g=De.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(V,""):d).replace(U,"$1").replace(H,"$1;"),d="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")+d+"return __p\n}";var y=Xa((function(){return we(u,h+"return "+d).apply(i,c)}));if(y.source=d,Ks(y))throw y;return y},Wn.times=function(e,t){if((e=ga(e))<1||e>f)return[];var n=p,r=mn(e,p);t=so(t),e-=p;for(var i=$t(r,t);++n<e;)t(n);return i},Wn.toFinite=ha,Wn.toInteger=ga,Wn.toLength=ya,Wn.toLower=function(e){return ba(e).toLowerCase()},Wn.toNumber=va,Wn.toSafeInteger=function(e){return e?sr(ga(e),-9007199254740991,f):0===e?e:0},Wn.toString=ba,Wn.toUpper=function(e){return ba(e).toUpperCase()},Wn.trim=function(e,t,n){if((e=ba(e))&&(n||t===i))return Vt(e);if(!e||!(t=ai(t)))return e;var r=sn(e),o=sn(t);return bi(r,zt(r,o),qt(r,o)+1).join("")},Wn.trimEnd=function(e,t,n){if((e=ba(e))&&(n||t===i))return e.slice(0,an(e)+1);if(!e||!(t=ai(t)))return e;var r=sn(e);return bi(r,0,qt(r,sn(t))+1).join("")},Wn.trimStart=function(e,t,n){if((e=ba(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=sn(e);return bi(r,zt(r,sn(t))).join("")},Wn.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=ba(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 c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),sa(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ae(o.source,ba(de.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;c=c.slice(0,d===i?u:d)}}else if(e.indexOf(ai(o),u)!=u){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},Wn.unescape=function(e){return(e=ba(e))&&q.test(e)?e.replace(G,un):e},Wn.uniqueId=function(e){var t=++je;return ba(e)+t},Wn.upperCase=Qa,Wn.upperFirst=Ka,Wn.each=bs,Wn.eachRight=_s,Wn.first=qo,uu(Wn,(mu={},br(Wn,(function(e,t){De.call(Wn.prototype,t)||(mu[t]=e)})),mu),{chain:!1}),Wn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wn[e].placeholder=Wn})),bt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:vn(ga(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,p),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(iu)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Jr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Or(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(xs(so(e)))},Un.prototype.slice=function(e,t){e=ga(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(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)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(p)},br(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Wn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Wn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Un,c=a[0],l=u||Gs(t),f=function(e){var t=o.apply(Wn,Lt([e],a));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=s&&!d,g=u&&!p;if(!s&&l){t=g?t:new Un(this);var y=e.apply(t,a);return y.__actions__.push({func:hs,args:[f],thisArg:i}),new Vn(y,d)}return h&&g?e.apply(this,a):(y=this.thru(f),h?r?y.value()[0]:y.value():y)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Wn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Gs(i)?i:[],e)}return this[n]((function(n){return t.apply(Gs(n)?n:[],e)}))}})),br(Un.prototype,(function(e,t){var n=Wn[t];if(n){var r=n.name+"";De.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[Fi(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Gs(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=mn(t,e+s);break;case"takeRight":e=vn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,d=0,p=mn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return di(e,this.__actions__);var h=[];e:for(;u--&&d<p;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],m=v.iteratee,b=v.type,_=m(y);if(2==b)y=_;else if(!_){if(1==b)continue e;break e}}h[d++]=y}return h},Wn.prototype.at=gs,Wn.prototype.chain=function(){return ps(this)},Wn.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Wn.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__++]}},Wn.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},Wn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Vn(t,this.__chain__)}return this.thru(ts)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,st&&(Wn.prototype[st]=function(){return this}),Wn}();ot._=cn,(r=function(){return cn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},98253:(e,t,n)=>{var r=n(158);e.exports=function(){return r.Date.now()}},38172:(e,t,n)=>{var r=n(76897),i=n(23619);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})}},95053:(e,t,n)=>{var r=n(12383),i=n(23619),o=n(81878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=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)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},50586:(e,t,n)=>{var r=n(36589),i=n(22708),o=i;o.v1=r,o.v4=i,e.exports=o},98726: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++]]}},76338:(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},36589:(e,t,n)=>{var r=n(76338),i=n(98726),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,c=0;e.exports=function(e,t,n){var r=t&&n||0,o=t||[],l=void 0!==(e=e||{}).clockseq?e.clockseq:a,f=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:c+1,p=f-u+(d-c)/1e4;if(p<0&&void 0===e.clockseq&&(l=l+1&16383),(p<0||f>u)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=f,c=d,a=l;var h=(1e4*(268435455&(f+=122192928e5))+d)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=255&h;var g=f/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++]=l>>>8|128,o[r++]=255&l;for(var y=e.node||s,v=0;v<6;++v)o[r+v]=y[v];return t||i(o)}},22708:(e,t,n)=>{var r=n(76338),i=n(98726);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)}},34361:function(e,t,n){"use strict";var r,i,o,s,a,u,c,l,f,d,p,h,g,y=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},v=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)},m=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const b=n(98832),_=m(n(72551)),S=n(6192),w=n(81298),C=n(81298),E=m(n(60306));class A{constructor(e){r.set(this,void 0),i.set(this,void 0),y(this,r,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};v(this,r,"f").transmit(w.HEARTBEAT_CHANNEL,t),y(this,i,setInterval((()=>{v(this,r,"f").transmit(w.HEARTBEAT_CHANNEL,t)}),w.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(v(this,i,"f")),y(this,i,void 0,"f")}}r=new WeakMap,i=new WeakMap;class L{constructor(e,t,n="app"){o.set(this,void 0),y(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){v(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return v(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return v(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),c.set(this,""),l.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),f.set(this,{}),d.set(this,{}),p.set(this,[]),h.set(this,void 0),g.set(this,void 0),y(this,h,e,"f"),y(this,a,new A(e),"f"),y(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:v(this,c,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(v(this,d,"f")[t?.type]??[]).concat(v(this,d,"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=v(this,f,"f")[t];n&&(r||[]).forEach((e=>e(n)))}handleIncoming(e){switch(_.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=v(this,c,"f")),e);v(this,p,"f").forEach((async t=>{const{message:n,handler:r,resolve:i}=t,{err:o,response:s}=await v(this,h,"f").query(w.SERVER_CHANNEL,e(n),r);i({err:o,receiveMessage:s?.data})})),y(this,p,[],"f")}async connectWhenFSBLIsReady(){v(this,u,"f")||(y(this,u,!0,"f"),await v(this,g,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(v(this,s,"f")){const{err:r,response:i}=await v(this,h,"f").query(w.SERVER_CHANNEL,e,t);n({err:r,receiveMessage:i?.data})}else v(this,p,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=v(this,g,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;_.default.log(`fdc3.connect StartupData for ${t}`,e),y(this,c,t,"f");const r={type:"register",meta:this.meta(),payload:{clientChannel:v(this,l,"f"),windowName:t,authenticationToken:n}};v(this,h,"f").query(w.SERVER_CHANNEL,r,(e=>{e?_.default.error("connect error",e):(v(this,h,"f").addResponder(v(this,l,"f"),((e,t)=>{if(e||!t){const t=C.errorAsString(e??"No request received on responder");_.default.error(`FinsembleDesktopAgent can't listen on channel ${v(this,l,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),y(this,s,!0,"f"),this.releaseQueue())})),v(this,a,"f").start(v(this,c,"f"))}stop(){v(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{v(this,h,"f").removeResponder(v(this,l,"f")),y(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 L(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 b.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 b.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 b.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 b.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){v(this,f,"f")[e]=C.mmAdd(v(this,f,"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),v(this,f,"f")[e]=C.mmRemove(v(this,f,"f"),e,t)}}}channelAddContextListener(e,t,n){const r=n?t:"*";n||(n=t);const i={handler:n,channel:e};v(this,d,"f")[r]=C.mmAdd(v(this,f,"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),v(this,d,"f")[r]=C.mmRemove(v(this,f,"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 L(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 L(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:E.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,g=new WeakMap},81298:(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"}}},10589: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.FSBLService=void 0;const i=r(n(39319)),o=n(67580),s=n(51742),a=n(16925),u=n(50586),c=n(6192),l=n(34361);t.FSBLService=class{async startApp(){await s.System.ready();const e=await o.getSystemStartupData(),t=s.System.Window.getCurrent(),n=t.name??document?.location?.href??"Unknown App",r=t.name??document?.location?.href??`Unknown window-${u.v4()}`,f=o.getManifestFromStartupData(e)??{},d=o.getRouterConfig({windowName:r,systemManifest:f});await i.default.start(d);const p=a.Startup.getInstance();p.setStartupData({windowName:r,authenticationToken:{authenticationKeyType:"unauthenticated",meta:{name:n}}}),c.Globals.fdc3=new l.FinsembleDesktopAgent({routerClient:i.default,startup:p}),p.ready()}async stopApp(){i.default.stop()}}},67580: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(72551)),o=n(51742),s=n(33998),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}},16925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const r=n(81298),i=n(6192),o=n(50586),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},17348: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(57664),u=o(n(19886)),c=s(n(72551)),l=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&&c.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||c.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||c.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};return l.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)):c.default.system.error("DistributedStore.setValues:params must be an array"):c.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){l.distributedStoreClient.routerClient.query("storeService.getValue",{store:this.name,field:e.field},((e,n)=>e?t(e):t(e,n.data)))}getGlobalValues(e,t){l.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};l.distributedStoreClient.removeStore(t,(t=>t?e(t):e(null,!0)))}changeSub(e){this.subs||(this.subs=[]),this.subs[e]||(this.isGlobal&&l.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]?(c.default.system.debug("DistributedStore.triggerListeners",e,t),this.listeners[e][n](null,{field:e,value:t})):c.default.system.warn("DistributedStoreClient:triggerListeners: listener is not a function",e,n,this.listeners[e][n])}}},72669: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(39319)),o=r(n(72551)),s=n(51742),a=n(13854);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}}},70010: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(57664),o=r(n(13712)),s=n(72669),a=r(n(5020)),u=r(n(72551));class c 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 l=new c({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=l},43190: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(72669),o=r(n(17348));let s;const a=window;let u;const c={};function l(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 f(e,t){u.routerClient.query("storeService.removeStore",e,((e,n)=>t(e,!e&&n.data)))}class d extends i._BaseClient{constructor(e){super(e),this.load=function(e){e()},u=this,this.ls=c}getStore(e,t){return e.global?l(e,t):e.store&&c[e.store]?t(null,c[e.store]):l(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(c[e.store])return n({err:null,data:c[e.store]}),t(null,c[e.store]);const i=new s(e,u.routerClient);return c[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?f(e,t):c[e.store]?(delete c[e.store],t(null,!0)):void f(e,t)}}var p=new d({startupDependencies:{},onReady(e){s=o.default,p.load(e)},name:"distributedStoreClient"});a.distributedStoreClient=p,t.default=p},75729:(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},c={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},l={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:c,system:c,perf:c};function f(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=f,this.setting=()=>l,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}}},72551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerConstructor=void 0;const r=n(51742),i=n(75729),o=n(16925),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(38172);t.LoggerConstructor=function(e){const i=this;let c;i.RouterClient=e&&e.RouterClient;let l=!1,f=!1;const d=i;let p,h,g=0,y=0;this.startupTime=0;let v=[];if("undefined"==typeof window)return;let m=r.System.Window.getCurrent().name;window.top!==window&&(m=`${m}.Frame`),this.onLogStateChangeCallback=[];let b={console:a,dev:s,system:s,perf:s};function _(e,t,n){this.category=e,!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),this.logClientName=c?`${m}: view-${c}`:m,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+g}function S(e,t){e&&e.dev&&(b=e,i.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){d.system.debug("Logger updateQueueBasedOnState",e,g,"QUEUE LENGTH",v.length,b);const t=[];for(let n=0,{length:r}=v;n<r;n++)if(b[v[n].category][v[n].logType]&&!b[v[n].category].LocalOnly)e&&(v[n].logTimestamp=v[n].logTimestamp+g),t.push(v[n]);else if(b[v[n].category][v[n].logType]&&b[v[n].category].LocalOnly){const e=v[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}v=t}(t)}function w(){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"),m=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),m},this.clearMessageList=function(){v=[]},this.callStack=function(){return w()},this.setting=function(){return b};const C=console.error,E=console.warn,A=console.info,L=console.log,T=console.debug;function I(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?I(t):t)),[])}function O(e,t){try{e.apply(console,I(t))}catch(e){(t=[]).push(w())}}let R=()=>{v.length>0&&(i.RouterClient.transmit("logger.service.logMessages",v),d.clearMessageList())};function N(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?(O(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 _(e,n,JSON.stringify(r))}catch(t){r.splice(0,r.length),r.push(w()),i=new _(e,n,`*** Logging Error: ${JSON.stringify(r)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(i)?function(e){if(v.length<2e4)v.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",v.length);let e,n=0;for(;e=v.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(i):++y<=5&&O(A,[`"Filtered Logger Message (${y} of first 5 shown)`,i]),f&&R()}function k(){const{windowName:e}=o.Startup.getInstance().getStartupData();m=e,window.top!==window&&(m=`${m}.Frame`);const t=`finsemble.logger.client.${m}`;!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),d.system.debug("logger.service.registering",m),r.System.Window.getCurrent().getOptions((n=>{const r=n?.customData?.component?.centralLoggerNamePrefix;i.RouterClient.query("logger.service.register",{clientName:m,clientChannel:t,windowName:e,viewId:c,centralLoggerNamePrefix:r},((e,t)=>{if(e)setTimeout(k,750);else{for(const e of v)e.viewId=c;f=!0,d.system.debug("logger.service.registered"),p=t.data,"routerService"!==m?(g=h,S(p,!0)):S(p,!1),N("system","Debug",["Logger Registered"]),R()}}))})),i.RouterClient.addListener(t,((e,t)=>{d.system.debug("logger.client.setLogState",t.data),p=t.data,S(p,!1)}))}R=u(R,"routerService"===m?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(w()),b.dev.Error&&!b.dev.LocalOnly&&N("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),O(C,e)},this.warn=function(){if(b.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(w()),b.dev.Warn&&!b.dev.LocalOnly&&N("dev","Warn",e),b.dev.Warn&&b.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),O(E,e))}},this.info=function(){if(b.dev.Info){const e=Array.prototype.slice.call(arguments);b.dev.Info&&!b.dev.LocalOnly&&N("dev","Info",e),b.dev.Info&&b.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),O(A,e))}},this.log=function(){if(b.dev.Log){const e=Array.prototype.slice.call(arguments);b.dev.Log&&!b.dev.LocalOnly&&N("dev","Log",e),b.dev.Log&&b.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),O(L,e))}},this.debug=function(){if(b.dev.Debug){const e=Array.prototype.slice.call(arguments);b.dev.Debug&&!b.dev.LocalOnly&&N("dev","Debug",e),b.dev.Debug&&b.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),O(T,e))}},this.verbose=function(){if(b.dev.Verbose){const e=Array.prototype.slice.call(arguments);b.dev.Verbose&&!b.dev.LocalOnly&&N("dev","Verbose",e),b.dev.Verbose&&b.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),O(T,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(w()),b.system.Error&&!b.system.LocalOnly&&N("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),O(C,e)},this.system.warn=function(){if(b.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(w()),b.system.Warn&&!b.system.LocalOnly&&N("system","Warn",e),b.system.Warn&&b.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),O(E,e))}},this.system.info=function(){if(b.system.Info){const e=Array.prototype.slice.call(arguments);b.system.Info&&!b.system.LocalOnly&&N("system","Info",e),b.system.Info&&b.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),O(A,e))}},this.system.log=function(){if(b.system.Log){const e=Array.prototype.slice.call(arguments);b.system.Log&&!b.system.LocalOnly&&N("system","Log",e),b.system.Log&&b.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),O(L,e))}},this.system.debug=function(){if(b.system.Debug){const e=Array.prototype.slice.call(arguments);b.system.Debug&&!b.system.LocalOnly&&N("system","Debug",e),b.system.Debug&&b.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),O(T,e))}},this.system.verbose=function(){if(b.system.Verbose){var e=Array.prototype.slice.call(arguments);b.system.Verbose&&!b.system.LocalOnly&&N("system","Verbose",e),b.system.Verbose&&b.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),O(T,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(w()),b.perf.Error&&!b.perf.LocalOnly&&N("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),O(C,e)},this.perf.warn=function(){if(b.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(w()),b.perf.Warn&&!b.perf.LocalOnly&&N("perf","Warn",e),b.perf.Warn&&b.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),O(E,e))}},this.perf.info=function(){if(b.perf.Info){const e=Array.prototype.slice.call(arguments);b.perf.Info&&!b.perf.LocalOnly&&N("perf","Info",e),b.perf.Info&&b.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),O(A,e))}},this.perf.log=function(){if(b.perf.Log){const e=Array.prototype.slice.call(arguments);b.perf.Log&&!b.perf.LocalOnly&&N("perf","Log",e),b.perf.Log&&b.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),O(L,e))}},this.perf.debug=function(){if(b.perf.Debug){const e=Array.prototype.slice.call(arguments);b.perf.Debug&&!b.perf.LocalOnly&&N("perf","Debug",e),b.perf.Debug&&b.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),O(T,e))}},this.perf.verbose=function(){if(b.perf.Verbose){const e=Array.prototype.slice.call(arguments);b.perf.Verbose&&!b.perf.LocalOnly&&N("perf","Verbose",e),b.perf.Verbose&&b.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),O(T,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){d.system.debug("logger.service.unregister",m,e,c),R();const n=e||{clientName:m,viewId:c};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(39319).default);const t=()=>{e=i.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(i.status="online",d.system.debug("Logger onReady",m),i.RouterClient.calibrateTimeWithRouterService((e=>{h=e,l||(i.startupTime=performance.now()-i.startupTime,k(),l=!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},40568: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(82369)),o=r(n(13712)),s=r(n(73699)),a=n(51742),u=n(72551),c=n(6192),l=n(75729),f=n(50586),d=[];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={},y={},v={},m={},b={},_={},S={};let w,C=null,E=!1;const A=[];function L(){this.header={origin:w,type:"initialHandshake"}}function T(e,t){this.header={origin:w,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function I(e){this.header={origin:w,type:"addListener",channel:e}}function O(e,t,n){this.header={origin:w,type:"transmit",channel:e},this.data=t,this.options=n}function R(e){this.header={origin:w,type:"removeListener",channel:e}}function N(e){this.header={origin:w,type:"addResponder",channel:e}}function k(e,t,n){this.header={origin:w,type:"query",queryID:e,channel:t},this.data=n}function D(e,t,n){this.header={origin:w,type:"queryResponse",queryID:e,error:t},this.data=n}function j(e){this.header={origin:w,type:"removeResponder",channel:e}}function P(e,t){this.header={origin:w,type:"subscribe",subscribeID:e,topic:t}}function x(e,t){this.header={origin:w,type:"unsubscribe",subscribeID:e,topic:t}}function M(e,t){this.header={origin:w,type:"publish",topic:e},this.data=t}function F(e,t,n,r){this.header={origin:w,type:"notify",subscribeID:e,topic:t,error:n},this.data=r}function W(e,t,n){this.header={origin:w,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:w,type:"removePubSubResponder",topic:e}}function $(e){C?C.send(e):(p.system.info("RouterClient: Queuing message since router initialization not complete",e),d.push(e))}function V(){return this.header.origin===this.header.lastClient}function U(e,t){p.system.info("RouterClient: outgoing query response","CHANNEL",this.header.channel,"RESPONSE DATA",t,"QUERY ID",this.header.queryID),$(new D(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=V,t.sendQueryResponse=U.bind(t),p.system.info("RouterClient: incoming query","CHANNEL",t.header.channel,"FROM",t.header.origin,"QUERY MESSAGE",t),n(null,t))}function G(e,t){if(e)p.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{g[this.header.topic]=t;const n=v[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 z(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=v,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 q(){!function(e,t,n){let r=!1;if(t in e){const i=v[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)}`)}(v,this.header.topic,this.header.subscribeID)}function J(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=V,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])}(_,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=V,p.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(m,i);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in y)if(y[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=G,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 y)if(y[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=z,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 y)if(y[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=q,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 Y(e,t){t.header.lastClient=w,t.header.incomingTransportInfo=e,J(t)}this.startupTime=0,this.notificationURL="";const Q=(t,n,r)=>{let o,a;p.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,c,l,f,h=!1,g=0;const y=t=>{a=0,p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),C=t,e=f,l(),o=setInterval(l,200)};u=e=>{p.system.error("RouterClientError",e)};const v=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),i.default.getTransport(t,n,Y,w,"RouterService").then(y).catch(u)};c=()=>{if(clearInterval(o),g++,g<=3)p.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",g,t),v();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})}},l=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),$(new L),a++>50&&c()},f=()=>{if(!h){if(p.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${w} with transport ${C.identifier()}`),h=!0,clearInterval(o),d)for(let e=0;e<d.length;e++){p.system.debug("RouterClient: firing queued msg");const t=d[e];C.send(t)}r&&r()}},v()};function K(){return`${w}.${f.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(c.Globals.performance.timing.navigationStart+c.Globals.performance.now()),$(new T(t.clientBaseTime,t.serviceBaseTime)))},t(new T([],[]))},this.onReady=e=>new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};E?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 I(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 O(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 R(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 N(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=`${K()}.${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){_[i]=(c,l)=>{o({err:c,response:l}),"function"==typeof r?r(c,l):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})},c.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 W(e.toString(),t,!0)),s="success"):!function(e,t,n,r){let i=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(y[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 W(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 y[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=K();return function(e,t,n,r){e[t]=n,b[t]=r}(m,n,t,e),$(new P(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 M(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}(m,e.subscribeID)?p.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):$(new x(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 R(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 y[e.toString()];for(const e in m){const t=b[e];p.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),$(new x(e,t)),delete m[e],delete b[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 l.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(p=new l.LocalLogger),w=`RouterClient.${e.windowName}.${f.v4()}`;const n=`"RouterClient Check: connecting new client for ${w}`;p.system.debug(n),console.debug(n),Q(e,e.transportName,(()=>{!function(){for(p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),E=!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}}},39319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const r=n(40568),i=n(72551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",r.RouterClientConstructor),i.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(40568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},6192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window},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]}},78379:(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"}},13854: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(39319)),s=n(78379),a=r(n(5020)),u=r(n(72551));class c 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 l(){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 f{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=l();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new c({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 d{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=l();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 f,this.shutdown=new d,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},82369: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(72551)),o=n(51742),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 c=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(c)},s(this)},c=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 c(){i.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function l(){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(c,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&&(l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},l()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",c),t.default=s},51742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const r=n(16925);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 c{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return c.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!c.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!c.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 c.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=c},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(39319)),o=r(n(72551)),s=n(56188),a=n(33509),u=n(95269),c=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 c=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 l=i.default.subscribe(a.STAGE_CHANNEL,((a,f)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data.stage,l),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===c)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(f.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data,l),"stageEntered"===t&&a+1>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,l,n.name),n(),r(),i.default.unsubscribe(l)):"stageCompleted"===t&&a>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,l),n(),r(),i.default.unsubscribe(l)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${c} `,a,c,e,l)}}))}))}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=c},96755: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.BaseService=void 0;const a=n(57664),u=n(13854),c=s(n(39319)),l=s(n(72551)),f=s(n(5020)),d=n(51742),p=o(n(78379)),h=n(6192),g=n(10589),{SERVICE_INITIALIZING_CHANNEL:y,SERVICE_READY_CHANNEL:v,SERVICE_QUERY_READY_CHANNEL:m,SERVICE_CLOSING_CHANNEL:b,SERVICE_CLOSED_CHANNEL:_,SERVICE_STOP_CHANNEL:S}=p,w={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},addOFWrapper:!1,name:window.name};t.BaseService=class{constructor(e=w){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=w.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=w.startupDependencies.clients)):e.startupDependencies=w.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=w.shutdownDependencies.services):e.shutdownDependencies=w.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=l.default,this.RouterClient=c.default,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),h.Globals.finsembleServices?h.Globals.finsembleServices.push(this):h.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){l.default.system.debug("BaseService.start.setParentUUID"),d.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,t.parentUuid=n.customData.parentUuid,e()}))}async function r(){await(new g.FSBLService).startApp(),c.default.addResponder(m(e.name),((t,n)=>{(e.status="ready")?n?.sendQueryResponse(null):n?.sendQueryResponse("service not ready")})),c.default.transmit(y,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const n=t.customData.debugServiceDelay||0;if(l.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;l.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),f.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),console.log("Startup Dependencies for",t.name,t.startupDependencies),console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),u.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),c.default.transmit(`${d.System.Window.getCurrent().name}.onSpawned`,{name:d.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e).on("err",(e=>{l.default.system.error(e)}))}function s(e){const n=d.System.Window.getCurrent();n.isShowing((r=>{r&&!1!==t.customData.showDevConsoleOnVisible?d.System.showDeveloperTools(n.uuid,n.name,null,e):(l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return l.default.system.debug(`${this.name} starting`),new Promise((e=>{a.series([r,n,s,i,o],(()=>{e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",c.default.transmit(v,{serviceName:this.name},{suppressWarnings:!0}),l.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),f.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),l.default.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){l.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(c.default.transmit(b,{waitForMe:!0,name:this.name}),a.each(this.listeners.onShutdown,(function(e,t){a.asyncify(e)(null,t)}),(function(t){t&&l.default.system.error(t),e.shutdownComplete()}))):(c.default.transmit(b,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){l.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),c.default.transmit(_,{name:this.name,uuid:d.System.Application.getCurrent().uuid})}},window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return l.default.error(e.message,`File: ${e.filename}`,`Line: ${e.lineno}`,`Column: ${e.colno}`,`Error Stack: \n ${t}`),!1})),window.addEventListener("unhandledrejection",(e=>{"Cannot Wrap Service Manager or Services"==e.reason?l.default.warn("A service tried To wrap itself. This is a side effect of using Clients in services."):l.default.error("Unhandled rejection","reason",e.reason)}))},33509:(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"},56188:(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}}},95269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=t.killOldApplications=void 0;const r=n(51742),i=n(33509);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}`}},88801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80498:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74215:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89520:(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"},55182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35644:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36611:(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}},55972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91767:(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"},91966:(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 c(...e){return{unionMembers:e}}function l(e,t){return{props:e,additional:t}}function f(e){return{props:[],additional:e}}function d(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),d("Context"))}static contextToJson(e){return JSON.stringify(a(e,d("Context")),null,2)}static toContact(e){return s(JSON.parse(e),d("Contact"))}static contactToJson(e){return JSON.stringify(a(e,d("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),d("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,d("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),d("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,d("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),d("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,d("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),d("Country"))}static countryToJson(e){return JSON.stringify(a(e,d("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),d("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,d("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),d("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,d("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),d("Position"))}static positionToJson(e){return JSON.stringify(a(e,d("Position")),null,2)}};const p={Context:l([{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:l([{json:"contacts",js:"contacts",typ:u(d("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Contact:l([{json:"id",js:"id",typ:d("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),ContactID:l([{json:"email",js:"email",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")}],""),InstrumentList:l([{json:"instruments",js:"instruments",typ:u(d("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Instrument:l([{json:"id",js:"id",typ:d("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),InstrumentID:l([{json:"BBG",js:"BBG",typ:c(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"FIGI",js:"FIGI",typ:c(void 0,"")},{json:"ISIN",js:"ISIN",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")},{json:"RIC",js:"RIC",typ:c(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:c(void 0,"")},{json:"ticker",js:"ticker",typ:c(void 0,"")}],""),Country:l([{json:"id",js:"id",typ:d("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),CountryID:l([{json:"ISOALPHA2",js:"ISOALPHA2",typ:c(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:c(void 0,"")}],""),Organization:l([{json:"id",js:"id",typ:d("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),OrganizationID:l([{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"LEI",js:"LEI",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")}],""),Portfolio:l([{json:"positions",js:"positions",typ:u(d("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Position:l([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:d("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any")}},98832: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(88801),t),i(n(77661),t),i(n(80498),t),i(n(55972),t),i(n(74215),t),i(n(19600),t),i(n(89520),t),i(n(35644),t),i(n(66129),t),i(n(51854),t),i(n(55182),t),i(n(36611),t),i(n(91767),t),i(n(91966),t),i(n(77178),t)},77178:(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"},60306: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"}}')}},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),(()=>{"use strict";var e=r(96755),t=s(r(39319)),n=s(r(43190)),i=s(r(72551)),o=s(r(22708));function s(e){return e&&e.__esModule?e:{default:e}}n.default.initialize(),i.default.start(),i.default.system.log("Starting Search Service");class a extends e.BaseService{constructor(e){e&&void 0!==e||(e={}),e.hasOwnProperty("startupDependencies")||(e.startupDependencies={clients:["distributedStoreClient"]}),e.name="searchService",super(e),this.searchProviders={},this.onBaseServiceReady(this.initialize.bind(this)),this.start()}createRouterEndpoints=()=>{t.default.addResponder("Search.register",((e,t)=>{console.log("Search.register",t),this.register(t.data);const n=e?null:{status:"success"};t.sendQueryResponse(e,n)})),t.default.addResponder("Search.unregister",((e,t)=>{if(console.log("Search.unregister",t),!t)return;this.unregister(t.data);const n=e?null:{status:"success"};t.sendQueryResponse(e,n)})),t.default.addResponder("Search.search",((e,t)=>{this.search(t.data,((e,n)=>{t.sendQueryResponse(e,n)}))}))};initialize=(e=Function.prototype)=>{this.createRouterEndpoints(),e()};register=e=>{console.log("register",e),this.searchProviders[e.channel]=e};unregister=e=>{delete this.searchProviders[e.channel]};search=(e,t)=>{const n=(0,o.default)();let r=0;for(const t in this.searchProviders)r++,this.queryProvider(this.searchProviders[t],n,e);return t(null,{searchId:n,providerCount:r})};queryProvider(e,n,r){t.default.query(`Search.Provider.${e.channel}`,r,((i,o)=>{for(let t=0;t<o.data.length;t++)o.data[t].provider=e.channel;console.log("query",e);const s={provider:{displayName:e.name,channel:e.channel,providerActionTitle:e.providerActionTitle,providerActionCallback:e.providerActionCallback},returnCallback:`${r.windowName}.${e.name}`,searchId:n,data:o.data};t.default.publish(`Search.${r.windowName}`,s)}))}}new a})()})();
2
+ (()=>{var e={57664:(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:()=>O,applyEachSeries:()=>k,asyncify:()=>l,auto:()=>P,autoInject:()=>$,cargo:()=>G,cargoQueue:()=>z,compose:()=>Y,concat:()=>Z,concatLimit:()=>K,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>re,detectSeries:()=>ie,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>le,eachLimit:()=>fe,eachOf:()=>T,eachOfLimit:()=>E,eachOfSeries:()=>R,eachSeries:()=>de,ensureAsync:()=>pe,every:()=>he,everyLimit:()=>ge,everySeries:()=>ye,filter:()=>_e,filterLimit:()=>Se,filterSeries:()=>we,forever:()=>Ce,groupBy:()=>Ae,groupByLimit:()=>Ee,groupBySeries:()=>Le,log:()=>Te,map:()=>I,mapLimit:()=>Q,mapSeries:()=>N,mapValues:()=>Oe,mapValuesLimit:()=>Ie,mapValuesSeries:()=>Re,memoize:()=>Ne,nextTick:()=>ke,parallel:()=>je,parallelLimit:()=>Pe,priorityQueue:()=>Be,queue:()=>xe,race:()=>$e,reduce:()=>q,reduceRight:()=>Ve,reflect:()=>Ue,reflectAll:()=>He,reject:()=>ze,rejectLimit:()=>qe,rejectSeries:()=>Je,retry:()=>Qe,retryable:()=>Ze,seq:()=>J,series:()=>Xe,setImmediate:()=>c,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>rt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>ct,unmemoize:()=>lt,until:()=>dt,waterfall:()=>pt,whilst:()=>ft,all:()=>he,allLimit:()=>ge,allSeries:()=>ye,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>re,findSeries:()=>ie,flatMap:()=>Z,flatMapLimit:()=>K,flatMapSeries:()=>X,forEach:()=>le,forEachSeries:()=>de,forEachLimit:()=>fe,forEachOf:()=>T,forEachOfSeries:()=>R,forEachOfLimit:()=>E,inject:()=>q,foldl:()=>q,foldr:()=>Ve,select:()=>_e,selectLimit:()=>Se,selectSeries:()=>we,wrapSync:()=>l,during:()=>ft,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 c=u(o?setImmediate:s?process.nextTick:a);function l(e){return p(e)?function(...t){const n=t.pop();return f(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 f(r,n);n(null,r)}))}function f(e,t){return e.then((e=>{d(t,null,e)}),(e=>{d(t,e&&e.message?e:new Error(e))}))}function d(e,t,n){try{e(t,n)}catch(e){c((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)?l(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 y(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 v(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 m(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const b={};function _(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 w(e,t,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function c(){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,l),u++,c()}})).catch(f))}function l(e,t){if(a-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===b||i&&a<=0?(i=!0,r(null)):void c()}function f(e){o||(s=!1,i=!0,r(e))}c()}var C=e=>(t,n,r)=>{if(r=_(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return w(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return w(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(m(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 c(e,t){if(!s)if(a-=1,e)o=!0,r(e);else if(!1===e)o=!0,s=!0;else{if(t===b||o&&a<=0)return o=!0,r(null);u||l()}}function l(){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(c))}u=!1}l()},E=g((function(e,t,n,r){return C(t)(e,h(n),r)}),4);function A(e,t,n){n=_(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!==b||n(null))}for(0===o&&n(null);r<o;r++)t(e[r],r,S(a))}function L(e,t,n){return E(e,1/0,t,n)}var T=g((function(e,t,n){return(m(e)?A:L)(e,h(t),n)}),3),I=g((function(e,t,n){return v(T,e,t,n)}),3),O=y(I),R=g((function(e,t,n){return E(e,1,t,n)}),3),N=g((function(e,t,n){return v(R,e,t,n)}),3),k=y(N);const D=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[D]=new Promise(((n,r)=>{e=n,t=r})),n}function P(e,t,n){"number"!=typeof t&&(n=t,t=null),n=_(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),c=[],l=[],f={};function d(e,t){c.push((()=>function(e,t){if(!a){var r=S(((t,...r)=>{if(o--,!1!==t)if(r.length<2&&([r]=r),t){var c={};if(Object.keys(i).forEach((e=>{c[e]=i[e]})),c[e]=r,a=!0,u=Object.create(null),s)return;n(t,c)}else i[e]=r,(u[e]||[]).forEach((e=>e())),p();else s=!0}));o++;var c=h(t[t.length-1]);t.length>1?c(i,r):c(r)}}(e,t)))}function p(){if(!s){if(0===c.length&&0===o)return n(null,i);for(;c.length&&o<t;)c.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 d(t,[n]),void l.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return d(t,n),void l.push(t);f[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&&d(t,n)}))}))})),function(){for(var e=0;l.length;)e++,g(l.pop()).forEach((e=>{0==--f[e]&&l.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),p(),n[D]}var x=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,M=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,F=/,/,W=/(=.+)?(\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(x);if(n||(n=t.match(M)),!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(W,"").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)}})),P(n,t)}class V{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):U(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):U(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 U(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 l=!1;function f(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)}v.started=!0;var a={data:e,callback:n?s:r||s};if(t?v._tasks.unshift(a):v._tasks.push(a),l||(l=!0,c((()=>{l=!1,v.process()}))),n||!r)return new Promise(((e,t)=>{i=e,o=t}))}function d(e){return function(t,...n){i-=1;for(var r=0,s=e.length;r<s;r++){var a=e[r],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}i<=v.concurrency-v.buffer&&u("unsaturated"),v.idle()&&u("drain"),v.process()}}function p(e){return!(0!==e.length||!v.idle()||(c((()=>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 y=!1,v={_tasks:new V,*[Symbol.iterator](){yield*v._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=>f(e,!1,!1,t)))}return f(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>f(e,!1,!0,t)))}return f(e,!1,!0,t)},kill(){a(),v._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>f(e,!0,!1,t)))}return f(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>f(e,!0,!0,t)))}return f(e,!0,!0,t)},remove(e){v._tasks.remove(e)},process(){if(!y){for(y=!0;!v.paused&&i<v.concurrency&&v._tasks.length;){var e=[],t=[],n=v._tasks.length;v.payload&&(n=Math.min(n,v.payload));for(var s=0;s<n;s++){var a=v._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===v._tasks.length&&u("empty"),i===v.concurrency&&u("saturated");var c=S(d(e));r(t,c)}y=!1}},length:()=>v._tasks.length,running:()=>i,workersList:()=>o,idle:()=>v._tasks.length+i===0,pause(){v.paused=!0},resume(){!1!==v.paused&&(v.paused=!1,c(v.process))}};return Object.defineProperties(v,{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")}}),v}function G(e,t){return H(e,1,t)}function z(e,t,n){return H(e,t,n)}var q=g((function(e,t,n,r){r=_(r);var i=h(n);return R(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function J(...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(),q(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[D]}}function Y(...e){return J(...e.reverse())}var Q=g((function(e,t,n,r){return v(C(t),e,n,r)}),4),K=g((function(e,t,n,r){var i=h(n);return Q(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 K(e,1/0,t,n)}),3),X=g((function(e,t,n){return K(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,b)):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))(T,e,t,n)}),3),re=g((function(e,t,n,r){return te((e=>e),((e,t)=>t))(C(t),e,n,r)}),4),ie=g((function(e,t,n){return te((e=>e),((e,t)=>t))(C(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 ce(e){return(t,n,r)=>e(t,r)}var le=g((function(e,t,n){return T(e,ce(h(t)),n)}),3),fe=g((function(e,t,n,r){return C(t)(e,ce(h(n)),r)}),4),de=g((function(e,t,n){return fe(e,1,t,n)}),3);function pe(e){return p(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?c((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var he=g((function(e,t,n){return te((e=>!e),(e=>!e))(T,e,t,n)}),3),ge=g((function(e,t,n,r){return te((e=>!e),(e=>!e))(C(t),e,n,r)}),4),ye=g((function(e,t,n){return te((e=>!e),(e=>!e))(R,e,t,n)}),3);function ve(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 me(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 be(e,t,n,r){return(m(t)?ve:me)(e,t,h(n),r)}var _e=g((function(e,t,n){return be(T,e,t,n)}),3),Se=g((function(e,t,n,r){return be(C(t),e,n,r)}),4),we=g((function(e,t,n){return be(R,e,t,n)}),3),Ce=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),Ee=g((function(e,t,n,r){var i=h(n);return Q(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 Ee(e,1/0,t,n)}function Le(e,t,n){return Ee(e,1,t,n)}var Te=oe("log"),Ie=g((function(e,t,n,r){r=_(r);var i={},o=h(n);return C(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 Oe(e,t,n){return Ie(e,1/0,t,n)}function Re(e,t,n){return Ie(e,1,t,n)}function Ne(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?c((()=>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),De=g(((e,t,n)=>{var r=m(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 De(T,e,t)}function Pe(e,t,n){return De(C(t),e,n)}function xe(e,t){var n=h(e);return H(((e,t)=>{n(e[0],t)}),t,1)}class Me{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&&We(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&&We(this.heap[t+1],this.heap[t])&&(t+=1),!We(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 We(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=xe(e,t);return n._tasks=new Me,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 c((()=>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)}c(n.process)},delete n.unshift,n}var $e=g((function(e,t){if(t=_(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 Ve(e,t,n,r){var i=[...e].reverse();return q(i,t,n,r)}function Ue(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(Ue):(t={},Object.keys(e).forEach((n=>{t[n]=Ue.call(this,e[n])}))),t}function Ge(e,t,n,r){const i=h(n);return be(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var ze=g((function(e,t,n){return Ge(T,e,t,n)}),3),qe=g((function(e,t,n,r){return Ge(C(t),e,n,r)}),4),Je=g((function(e,t,n){return Ge(R,e,t,n)}),3);function Ye(e){return function(){return e}}function Qe(e,t,n){var r={times:5,intervalFunc:Ye(0)};if(arguments.length<3&&"function"==typeof e?(n=t||j(),t=e):(Ke(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[D]}function Ke(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ye(+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?Qe(e,o,i):Qe(o,i),i[D]}))}function Xe(e,t){return De(R,e,t)}var et=g((function(e,t,n){return te(Boolean,(e=>e))(T,e,t,n)}),3),tt=g((function(e,t,n,r){return te(Boolean,(e=>e))(C(t),e,n,r)}),4),nt=g((function(e,t,n){return te(Boolean,(e=>e))(R,e,t,n)}),3),rt=g((function(e,t,n){var r=h(t);return I(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 Q(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=_(r||j());var i=h(n);return T(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[D]}var ct=g((function(e,t){var n,r=null;return de(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 lt(e){return(...t)=>(e.unmemoized||e)(...t)}var ft=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 dt(e,t,n){const r=h(e);return ft((e=>r(((t,n)=>e(t,!n)))),t,n)}var pt=g((function(e,t){if(t=_(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:O,applyEachSeries:k,asyncify:l,auto:P,autoInject:$,cargo:G,cargoQueue:z,compose:Y,concat:Z,concatLimit:K,concatSeries:X,constant:ee,detect:ne,detectLimit:re,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:le,eachLimit:fe,eachOf:T,eachOfLimit:E,eachOfSeries:R,eachSeries:de,ensureAsync:pe,every:he,everyLimit:ge,everySeries:ye,filter:_e,filterLimit:Se,filterSeries:we,forever:Ce,groupBy:Ae,groupByLimit:Ee,groupBySeries:Le,log:Te,map:I,mapLimit:Q,mapSeries:N,mapValues:Oe,mapValuesLimit:Ie,mapValuesSeries:Re,memoize:Ne,nextTick:ke,parallel:je,parallelLimit:Pe,priorityQueue:Be,queue:xe,race:$e,reduce:q,reduceRight:Ve,reflect:Ue,reflectAll:He,reject:ze,rejectLimit:qe,rejectSeries:Je,retry:Qe,retryable:Ze,seq:J,series:Xe,setImmediate:c,some:et,someLimit:tt,someSeries:nt,sortBy:rt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:ct,unmemoize:lt,until:dt,waterfall:pt,whilst:ft,all:he,allLimit:ge,allSeries:ye,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:re,findSeries:ie,flatMap:Z,flatMapLimit:K,flatMapSeries:X,forEach:le,forEachSeries:de,forEachLimit:fe,forEachOf:T,forEachOfSeries:R,forEachOfLimit:E,inject:q,foldl:q,foldr:Ve,select:_e,selectLimit:Se,selectSeries:we,wrapSync:l,during:ft,doDuring:ae}},33998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var r=s(n(72551)),i=n(51742),o=s(n(53059));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&&c(i,t,n+1)}}function c(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&&c(i,t,n+1)}))}for(;o&&i++<100;)o=!1,c(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},19886:(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)},21014:(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},73699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(72551)),i=n(33998),o=n(51742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var c=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(70010).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,c,l){let f=!1;const d=`UserNotification.alert.${a}`,p=(c=c||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":d in e?f=!1:(f=!0,e[d]=!0);break;case"MAX-COUNT":{let e=0;const n=c.maxCount||1;d in t&&(e=t[d]),t[d]=++e,e<=n&&(f=!0);break}default:f=!0}if(r.default.log("UserNotification.alert",n,f,i,a,u,c),f){const e={url:l,message:u,timeout:p};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=c},13712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(21014))&&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 "),c=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${c}`)}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},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 c(e,t,n,r){var i,o,s,c;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 l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){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 f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(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 c=u.length,l=h(u,c);for(n=0;n<c;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(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 d(this,e,!0)},o.prototype.rawListeners=function(e){return d(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):[]}},44937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},20194:(e,t,n)=>{var r=n(44937),i=n(15401),o=n(92445),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)}},12383:(e,t,n)=>{var r=n(38725),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},14528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},15401:(e,t,n)=>{var r=n(44937),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}},92445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},158:(e,t,n)=>{var r=n(14528),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},38725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},76897:(e,t,n)=>{var r=n(23619),i=n(98253),o=n(95053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,c,l,f,d,p,h=0,g=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=u,r=c;return u=c=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(S,t),g?m(e):f}function _(e){var n=e-p;return void 0===p||n>=t||n<0||y&&e-h>=l}function S(){var e=i();if(_(e))return w(e);d=setTimeout(S,function(e){var n=t-(e-p);return y?a(n,l-(e-h)):n}(e))}function w(e){return d=void 0,v&&u?m(e):(u=c=void 0,f)}function C(){var e=i(),n=_(e);if(u=arguments,c=this,p=e,n){if(void 0===d)return b(p);if(y)return clearTimeout(d),d=setTimeout(S,t),m(p)}return void 0===d&&(d=setTimeout(S,t)),f}return t=o(t)||0,r(n)&&(g=!!n.leading,l=(y="maxWait"in n)?s(o(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==d&&clearTimeout(d),h=0,u=p=c=d=void 0},C.flush=function(){return void 0===d?f:w(i())},C}},23619:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},81653:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},81878:(e,t,n)=>{var r=n(20194),i=n(81653);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},53059: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,c=128,l=1/0,f=9007199254740991,d=NaN,p=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",v="[object Boolean]",m="[object Date]",b="[object Error]",_="[object Function]",S="[object GeneratorFunction]",w="[object Map]",C="[object Number]",E="[object Object]",A="[object Promise]",L="[object RegExp]",T="[object Set]",I="[object String]",O="[object Symbol]",R="[object WeakMap]",N="[object ArrayBuffer]",k="[object DataView]",D="[object Float32Array]",j="[object Float64Array]",P="[object Int8Array]",x="[object Int16Array]",M="[object Int32Array]",F="[object Uint8Array]",W="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,q=RegExp(G.source),J=RegExp(z.source),Y=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,K=/<%=([\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,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\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="["+Ee+"]",Le="["+Se+"]",Te="\\d+",Ie="["+we+"]",Oe="[^\\ud800-\\udfff"+Ee+Te+"\\u2700-\\u27bf"+we+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Ce+"]",Pe="(?:"+Ie+"|"+Oe+")",xe="(?:"+je+"|"+Oe+")",Me="(?:['’](?:d|ll|m|re|s|t|ve))?",Fe="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Le+"|"+Re+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+We+"(?:\\u200d(?:"+[Ne,ke,De].join("|")+")"+Be+We+")*",Ve="(?:"+["[\\u2700-\\u27bf]",ke,De].join("|")+")"+$e,Ue="(?:"+[Ne+Le+"?",Le,ke,De,"[\\ud800-\\udfff]"].join("|")+")",He=RegExp("['’]","g"),Ge=RegExp(Le,"g"),ze=RegExp(Re+"(?="+Re+")|"+Ue+$e,"g"),qe=RegExp([je+"?"+Ie+"+"+Me+"(?="+[Ae,je,"$"].join("|")+")",xe+"+"+Fe+"(?="+[Ae,je+Pe,"$"].join("|")+")",je+"?"+Pe+"+"+Me,je+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,Ve].join("|"),"g"),Je=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["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"],Ke=-1,Ze={};Ze[D]=Ze[j]=Ze[P]=Ze[x]=Ze[M]=Ze[F]=Ze[W]=Ze[B]=Ze[$]=!0,Ze[g]=Ze[y]=Ze[N]=Ze[v]=Ze[k]=Ze[m]=Ze[b]=Ze[_]=Ze[w]=Ze[C]=Ze[E]=Ze[L]=Ze[T]=Ze[I]=Ze[R]=!1;var Xe={};Xe[g]=Xe[y]=Xe[N]=Xe[k]=Xe[v]=Xe[m]=Xe[D]=Xe[j]=Xe[P]=Xe[x]=Xe[M]=Xe[w]=Xe[C]=Xe[E]=Xe[L]=Xe[T]=Xe[I]=Xe[O]=Xe[F]=Xe[W]=Xe[B]=Xe[$]=!0,Xe[b]=Xe[_]=Xe[R]=!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,ct=ut&&rt.process,lt=function(){try{return at&&at.require&&at.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&&lt.isArrayBuffer,dt=lt&&lt.isDate,pt=lt&&lt.isMap,ht=lt&&lt.isRegExp,gt=lt&&lt.isSet,yt=lt&&lt.isTypedArray;function vt(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 mt(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 bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function _t(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 wt(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 Ct(e,t){return!(null==e||!e.length)&&Dt(e,t,0)>-1}function Et(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 Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Tt(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 It(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 Ot(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 Rt=Mt("length");function Nt(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 Dt(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,Pt,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 Pt(e){return e!=e}function xt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:d}function Mt(e){return function(t){return null==t?i:t[e]}}function Ft(e){return function(t){return null==e?i:e[t]}}function Wt(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 Vt(e){return e?e.slice(0,an(e)+1).replace(re,""):e}function Ut(e){return function(t){return e(t)}}function Ht(e,t){return At(t,(function(t){return e[t]}))}function Gt(e,t){return e.has(t)}function zt(e,t){for(var n=-1,r=e.length;++n<r&&Dt(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}function Jt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Yt=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"}),Qt=Ft({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Kt(e){return"\\"+et[e]}function Zt(e){return Je.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=ze.lastIndex=0;ze.test(e);)++t;return t}(e):Rt(e)}function sn(e){return Zt(e)?function(e){return e.match(ze)||[]}(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({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function e(t){var n,r=(t=null==t?ot:cn.defaults(ot.Object(),t,cn.pick(ot,Qe))).Array,ie=t.Date,Se=t.Error,we=t.Function,Ce=t.Math,Ee=t.Object,Ae=t.RegExp,Le=t.String,Te=t.TypeError,Ie=r.prototype,Oe=we.prototype,Re=Ee.prototype,Ne=t["__core-js_shared__"],ke=Oe.toString,De=Re.hasOwnProperty,je=0,Pe=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xe=Re.toString,Me=ke.call(Ee),Fe=ot._,We=Ae("^"+ke.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,$e=t.Symbol,Ve=t.Uint8Array,Ue=Be?Be.allocUnsafe:i,ze=en(Ee.getPrototypeOf,Ee),Je=Ee.create,et=Re.propertyIsEnumerable,rt=Ie.splice,it=$e?$e.isConcatSpreadable:i,st=$e?$e.iterator:i,at=$e?$e.toStringTag:i,ct=function(){try{var e=co(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Rt=ie&&ie.now!==ot.Date.now&&ie.now,Ft=t.setTimeout!==ot.setTimeout&&t.setTimeout,ln=Ce.ceil,fn=Ce.floor,dn=Ee.getOwnPropertySymbols,pn=Be?Be.isBuffer:i,hn=t.isFinite,gn=Ie.join,yn=en(Ee.keys,Ee),vn=Ce.max,mn=Ce.min,bn=ie.now,_n=t.parseInt,Sn=Ce.random,wn=Ie.reverse,Cn=co(t,"DataView"),En=co(t,"Map"),An=co(t,"Promise"),Ln=co(t,"Set"),Tn=co(t,"WeakMap"),In=co(Ee,"create"),On=Tn&&new Tn,Rn={},Nn=Wo(Cn),kn=Wo(En),Dn=Wo(An),jn=Wo(Ln),Pn=Wo(Tn),xn=$e?$e.prototype:i,Mn=xn?xn.valueOf:i,Fn=xn?xn.toString:i;function Wn(e){if(na(e)&&!Gs(e)&&!(e instanceof Un)){if(e instanceof Vn)return e;if(De.call(e,"__wrapped__"))return Bo(e)}return new Vn(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Je)return Je(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function $n(){}function Vn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(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 Gn(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 zn(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.__data__=new zn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Yn(e,t){var n=Gs(e),r=!n&&Hs(e),i=!n&&!r&&Ys(e),o=!n&&!r&&!i&&la(e),s=n||r||i||o,a=s?$t(e.length,Le):[],u=a.length;for(var c in e)!t&&!De.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||a.push(c);return a}function Qn(e){var t=e.length;return t?e[zr(0,t-1)]:i}function Kn(e,t){return jo(Ti(e),sr(t,0,e.length))}function Zn(e){return jo(Ti(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];De.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 fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Ii(t,ka(t),e)}function ir(e,t,n){"__proto__"==t&&ct?ct(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:Ta(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,c=2&t,l=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ta(e))return e;var f=Gs(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ti(e,a)}else{var d=po(e),p=d==_||d==S;if(Ys(e))return Si(e,u);if(d==E||d==g||p&&!o){if(a=c||p?{}:go(e),!u)return c?function(e,t){return Ii(e,fo(e),t)}(e,function(e,t){return e&&Ii(t,Da(t),e)}(a,e)):function(e,t){return Ii(e,lo(e),t)}(e,rr(a,e))}else{if(!Xe[d])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case N:return wi(e);case v:case m:return new i(+e);case k:return function(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case j:case P:case x:case M:case F:case W:case B:case $:return Ci(e,n);case w:return new i;case C:case I:return new i(e);case L:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return r=e,Mn?Ee(Mn.call(r)):{}}}(e,d,u)}}s||(s=new Jn);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 y=f?i:(l?c?no:to:c?Da:ka)(e);return bt(y||e,(function(r,i){y&&(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=Ee(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 cr(e,t,n){if("function"!=typeof e)throw new Te(o);return Ro((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Ct,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=At(t,Ut(n))),r?(o=Et,s=!1):t.length>=200&&(o=Gt,s=!1,t=new qn(t));e:for(;++i<a;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Wn.templateSettings={escape:Y,evaluate:Q,interpolate:K,variable:"",imports:{_:Wn}},Wn.prototype=$n.prototype,Wn.prototype.constructor=Wn,Vn.prototype=Bn($n.prototype),Vn.prototype.constructor=Vn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,Hn.prototype.clear=function(){this.__data__=In?In(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(In){var n=t[e];return n===s?i:n}return De.call(t,e)?t[e]:i},Hn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==i:De.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===i?s:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.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))},Gn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return tr(this.__data__,e)>-1},Gn.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},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(En||Gn),string:new Hn}},zn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},zn.prototype.get=function(e){return ao(this,e).get(e)},zn.prototype.has=function(e){return ao(this,e).has(e)},zn.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},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,s),this},qn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ni(br),dr=Ni(_r,!0);function pr(e,t){var n=!0;return fr(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&&!ca(a):n(a,u)))var u=a,c=s}return c}function gr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?yr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var vr=ki(),mr=ki(!0);function br(e,t){return e&&vr(e,t,ka)}function _r(e,t){return e&&mr(e,t,ka)}function Sr(e,t){return wt(t,(function(t){return Zs(e[t])}))}function wr(e,t){for(var n=0,r=(t=vi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function Cr(e,t,n){var r=t(e);return Gs(e)?r:Lt(r,n(e))}function Er(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Ee(e)?function(e){var t=De.call(e,at),n=e[at];try{e[at]=i;var r=!0}catch(e){}var o=xe.call(e);return r&&(t?e[at]=n:delete e[at]),o}(e):function(e){return xe.call(e)}(e)}function Ar(e,t){return e>t}function Lr(e,t){return null!=e&&De.call(e,t)}function Tr(e,t){return null!=e&&t in Ee(e)}function Ir(e,t,n){for(var o=n?Et:Ct,s=e[0].length,a=e.length,u=a,c=r(a),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=At(d,Ut(t))),l=mn(d.length,l),c[u]=!n&&(t||s>=120&&d.length>=120)?new qn(u&&d):i}d=e[0];var p=-1,h=c[0];e:for(;++p<s&&f.length<l;){var g=d[p],y=t?t(g):g;if(g=n||0!==g?g:0,!(h?Gt(h,y):o(f,y,n))){for(u=a;--u;){var v=c[u];if(!(v?Gt(v,y):o(e[u],y,n)))continue e}h&&h.push(y),f.push(g)}}return f}function Or(e,t,n){var r=null==(e=Lo(e,t=vi(t,e)))?e:e[Fo(Ko(t))];return null==r?i:vt(r,e,n)}function Rr(e){return na(e)&&Er(e)==g}function Nr(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=Gs(e),u=Gs(t),c=a?y:po(e),l=u?y:po(t),f=(c=c==g?E:c)==E,d=(l=l==g?E:l)==E,p=c==l;if(p&&Ys(e)){if(!Ys(t))return!1;a=!0,f=!1}if(p&&!f)return s||(s=new Jn),a||la(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 N:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case v:case m:case C:return $s(+e,+t);case b:return e.name==t.name&&e.message==t.message;case L:case I:return e==t+"";case w:var a=Xt;case T:var u=1&r;if(a||(a=nn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var l=Xi(a(e),a(t),r,i,o,s);return s.delete(e),l;case O:if(Mn)return Mn.call(e)==Mn.call(t)}return!1}(e,t,c,n,r,o,s);if(!(1&n)){var h=f&&De.call(e,"__wrapped__"),_=d&&De.call(t,"__wrapped__");if(h||_){var S=h?e.value():e,A=_?t.value():t;return s||(s=new Jn),o(S,A,n,r,s)}}return!!p&&(s||(s=new Jn),function(e,t,n,r,o,s){var a=1&n,u=to(e),c=u.length;if(c!=to(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:De.call(t,f)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var g=a;++l<c;){var y=e[f=u[l]],v=t[f];if(r)var m=a?r(v,y,f,t,e,s):r(y,v,f,e,t,s);if(!(m===i?y===v||o(y,v,n,r,s):m)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var b=e.constructor,_=t.constructor;b==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,r,o,s))}(e,t,n,r,Nr,o))}function kr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Ee(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 c=(u=n[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var d=new Jn;if(r)var p=r(l,f,c,e,t,d);if(!(p===i?Nr(f,l,3,r,d):p))return!1}}return!0}function Dr(e){return!(!ta(e)||(t=e,Pe&&Pe in t))&&(Zs(e)?We:ge).test(Wo(e));var t}function jr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Gs(e)?Wr(e[0],e[1]):Fr(e):pu(e)}function Pr(e){if(!wo(e))return yn(e);var t=[];for(var n in Ee(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function xr(e,t){return e<t}function Mr(e,t){var n=-1,i=qs(e)?r(e.length):[];return fr(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]?Eo(t[0][0],t[0][1]):function(n){return n===e||kr(n,e,t)}}function Wr(e,t){return bo(e)&&Co(t)?Eo(Fo(e),t):function(n){var r=Ta(n,e);return r===i&&r===t?Ia(n,e):Nr(t,r,3)}}function Br(e,t,n,r,o){e!==t&&vr(t,(function(s,a){if(o||(o=new Jn),ta(s))!function(e,t,n,r,o,s,a){var u=Io(e,n),c=Io(t,n),l=a.get(c);if(l)Xn(e,n,l);else{var f=s?s(u,c,n+"",e,t,a):i,d=f===i;if(d){var p=Gs(c),h=!p&&Ys(c),g=!p&&!h&&la(c);f=c,p||h||g?Gs(u)?f=u:Js(u)?f=Ti(u):h?(d=!1,f=Si(c,!0)):g?(d=!1,f=Ci(c,!0)):f=[]:oa(c)||Hs(c)?(f=u,Hs(u)?f=ma(u):ta(u)&&!Zs(u)||(f=go(c))):d=!1}d&&(a.set(c,f),o(f,c,r,s,a),a.delete(c)),Xn(e,n,f)}}(e,t,a,n,Br,r,o);else{var u=r?r(Io(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Xn(e,a,u)}}),Da)}function $r(e,t){var n=e.length;if(n)return vo(t+=t<0?n:0,n)?e[t]:i}function Vr(e,t,n){t=t.length?At(t,(function(e){return Gs(e)?function(t){return wr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;return t=At(t,Ut(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=Ei(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}(Mr(e,(function(e,n,i){return{criteria:At(t,(function(t){return t(e)})),index:++r,value:e}})))}function Ur(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=wr(e,s);n(a,s)&&Kr(o,vi(s,e),a)}return o}function Hr(e,t,n,r){var i=r?jt:Dt,o=-1,s=t.length,a=e;for(e===t&&(t=Ti(t)),n&&(a=At(e,Ut(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&rt.call(a,u,1),rt.call(e,u,1);return e}function Gr(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;vo(i)?rt.call(e,i,1):ci(e,i)}}return e}function zr(e,t){return e+fn(Sn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return No(Ao(e,t,iu),e+"")}function Yr(e){return Qn($a(e))}function Qr(e,t){var n=$a(e);return jo(n,sr(t,0,n.length))}function Kr(e,t,n,r){if(!ta(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ta(f)?f:vo(t[o+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Zr=On?function(e,t){return On.set(e,t),e}:iu,Xr=ct?function(e,t){return ct(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 fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ca(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,c=ca(t),l=t===i;o<s;){var f=fn((o+s)/2),d=n(e[f]),p=d!==i,h=null===d,g=d==d,y=ca(d);if(a)var v=r||g;else v=l?g&&(r||p):u?g&&p&&(r||!h):c?g&&p&&!h&&(r||!y):!h&&!y&&(r?d<=t:d<t);v?o=f+1:s=f}return mn(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:ca(e)?d:+e}function ai(e){if("string"==typeof e)return e;if(Gs(e))return At(e,ai)+"";if(ca(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=Ct,o=e.length,s=!0,a=[],u=a;if(n)s=!1,i=Et;else if(o>=200){var c=t?null:qi(e);if(c)return nn(c);s=!1,i=Gt,u=new qn}else u=t?[]:a;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,n)||(u!==a&&u.push(f),a.push(l))}return a}function ci(e,t){return null==(e=Lo(e,t=vi(t,e)))||delete e[Fo(Ko(t))]}function li(e,t,n,r){return Kr(e,t,n(wr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function di(e,t){var n=e;return n instanceof Un&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([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]=lr(s[o]||a,e[u],t,n));return ui(yr(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 Js(e)?e:[]}function yi(e){return"function"==typeof e?e:iu}function vi(e,t){return Gs(e)?e:bo(e,t)?[e]:Mo(ba(e))}var mi=Jr;function bi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=lt||function(e){return ot.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function wi(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ci(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=ca(e),a=t!==i,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&e<t||l&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!c)return-1}return 0}function Ai(e,t,n,i){for(var o=-1,s=e.length,a=n.length,u=-1,c=t.length,l=vn(s-a,0),f=r(c+l),d=!i;++u<c;)f[u]=t[u];for(;++o<a;)(d||o<s)&&(f[n[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Li(e,t,n,i){for(var o=-1,s=e.length,a=-1,u=n.length,c=-1,l=t.length,f=vn(s-u,0),d=r(f+l),p=!i;++o<f;)d[o]=e[o];for(var h=o;++c<l;)d[h+c]=t[c];for(;++a<u;)(p||o<s)&&(d[h+n[a]]=e[o++]);return d}function Ti(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ii(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):er(n,u,c)}return n}function Oi(e,t){return function(n,r){var i=Gs(n)?mt:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Ri(e){return Jr((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&&mo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++r<o;){var u=n[r];u&&e(t,u,r,s)}return t}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!qs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ee(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=Ee(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 Di(e){return function(t){var n=Zt(t=ba(t))?sn(t):i,r=n?n[0]:t.charAt(0),o=n?bi(n,1).join(""):t.slice(1);return r[e]()+o}}function ji(e){return function(t){return Tt(Za(Ha(t).replace(He,"")),e,"")}}function Pi(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 xi(e){return function(t,n,r){var o=Ee(t);if(!qs(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 Mi(e){return eo((function(t){var n=t.length,r=n,s=Vn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Te(o);if(s&&!u&&"wrapper"==io(a))var u=new Vn([],!0)}for(r=u?r:n;++r<n;){var c=io(a=t[r]),l="wrapper"==c?ro(a):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==a.length&&_o(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Gs(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,l,f,d){var p=t&c,h=1&t,g=2&t,y=24&t,v=512&t,m=g?i:Pi(e);return function i(){for(var c=arguments.length,b=r(c),_=c;_--;)b[_]=arguments[_];if(y)var S=oo(i),w=Jt(b,S);if(o&&(b=Ai(b,o,s,y)),a&&(b=Li(b,a,u,y)),c-=w,y&&c<d){var C=tn(b,S);return Gi(e,t,Fi,i.placeholder,n,b,C,l,f,d-c)}var E=h?n:this,A=g?E[e]:e;return c=b.length,l?b=To(b,l):v&&c>1&&b.reverse(),p&&f<c&&(b.length=f),this&&this!==ot&&this instanceof i&&(A=m||Pi(A)),A.apply(E,b)}}function Wi(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function 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,Ut(so())),Jr((function(n){var r=this;return e(t,(function(e){return vt(e,r,n)}))}))}))}function Vi(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,ln(e/on(t)));return Zt(t)?bi(sn(r),0,e).join(""):r.slice(0,e)}function Ui(e){return function(t,n,o){return o&&"number"!=typeof o&&mo(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=vn(ln((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=va(t),n=va(n)),e(t,n)}}function Gi(e,t,n,r,o,s,a,c,l,f){var d=8&t;t|=d?u:64,4&(t&=~(d?64:u))||(t&=-4);var p=[e,t,o,d?s:i,d?a:i,d?i:s,d?i:a,c,l,f],h=n.apply(i,p);return _o(e)&&Oo(h,p),h.placeholder=r,ko(h,e,t)}function zi(e){var t=Ce[e];return function(e,n){if(e=va(e),(n=null==n?0:mn(ga(n),292))&&hn(e)){var r=(ba(e)+"e").split("e");return+((r=(ba(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var qi=Ln&&1/nn(new Ln([,-0]))[1]==l?function(e){return new Ln(e)}:cu;function Ji(e){return function(t){var n=po(t);return n==w?Xt(t):n==T?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,s,l,f,d,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(o);var g=s?s.length:0;if(g||(t&=-97,s=l=i),d=d===i?d:vn(ga(d),0),p=p===i?p:ga(p),g-=l?l.length:0,64&t){var y=s,v=l;s=l=i}var m=h?i:ro(e),b=[e,t,n,s,l,y,v,f,d,p];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==c&&8==n||r==c&&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 l=e[3];e[3]=l?Ai(l,u,t[4]):u,e[4]=l?tn(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Li(l,u,t[6]):u,e[6]=l?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,m),e=b[0],t=b[1],n=b[2],s=b[3],l=b[4],!(p=b[9]=b[9]===i?h?0:e.length:vn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=Pi(e);return function s(){for(var a=arguments.length,u=r(a),c=a,l=oo(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:tn(u,l);return(a-=f.length)<n?Gi(e,t,Fi,s.placeholder,i,u,f,i,i,n-a):vt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,p):t!=u&&33!=t||l.length?Fi.apply(i,b):function(e,t,n,i){var o=1&t,s=Pi(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),d=this&&this!==ot&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return vt(d,o?n:this,f)}}(e,t,n,s);else var _=function(e,t,n){var r=1&t,i=Pi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return ko((m?Zr:Oo)(_,b),e,t)}function Qi(e,t,n,r){return e===i||$s(e,Re[n])&&!De.call(r,n)?t:e}function Ki(e,t,n,r,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Br(e,t,i,Ki,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,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,h=2&n?new qn:i;for(s.set(e,t),s.set(t,e);++d<u;){var g=e[d],y=t[d];if(r)var v=a?r(y,g,d,t,e,s):r(g,y,d,e,t,s);if(v!==i){if(v)continue;p=!1;break}if(h){if(!Ot(t,(function(e,t){if(!Gt(h,t)&&(g===e||o(g,e,n,r,s)))return h.push(t)}))){p=!1;break}}else if(g!==y&&!o(g,y,n,r,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return No(Ao(e,i,zo),e+"")}function to(e){return Cr(e,ka,lo)}function no(e){return Cr(e,Da,fo)}var ro=On?function(e){return On.get(e)}:cu;function io(e){for(var t=e.name+"",n=Rn[t],r=De.call(Rn,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(De.call(Wn,"placeholder")?Wn:e).placeholder}function so(){var e=Wn.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,Co(i)]}return t}function co(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Dr(n)?n:i}var lo=dn?function(e){return null==e?[]:(e=Ee(e),wt(dn(e),(function(t){return et.call(e,t)})))}:yu,fo=dn?function(e){for(var t=[];e;)Lt(t,lo(e)),e=ze(e);return t}:yu,po=Er;function ho(e,t,n){for(var r=-1,i=(t=vi(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)&&vo(s,i)&&(Gs(e)||Hs(e))}function go(e){return"function"!=typeof e.constructor||wo(e)?{}:Bn(ze(e))}function yo(e){return Gs(e)||Hs(e)||!!(it&&e&&e[it])}function vo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?qs(n)&&vo(t,n.length):"string"==r&&t in n)&&$s(n[t],e)}function bo(e,t){if(Gs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function _o(e){var t=io(e),n=Wn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(Cn&&po(new Cn(new ArrayBuffer(1)))!=k||En&&po(new En)!=w||An&&po(An.resolve())!=A||Ln&&po(new Ln)!=T||Tn&&po(new Tn)!=R)&&(po=function(e){var t=Er(e),n=t==E?e.constructor:i,r=n?Wo(n):"";if(r)switch(r){case Nn:return k;case kn:return w;case Dn:return A;case jn:return T;case Pn:return R}return t});var So=Ne?Zs:vu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Co(e){return e==e&&!ta(e)}function Eo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ee(n))}}function Ao(e,t,n){return t=vn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=vn(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),vt(e,this,u)}}function Lo(e,t){return t.length<2?e:wr(e,ti(t,0,-1))}function To(e,t){for(var n=e.length,r=mn(t.length,n),o=Ti(e);r--;){var s=t[r];e[r]=vo(s,n)?o[s]:i}return e}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Do(Zr),Ro=Ft||function(e,t){return ot.setTimeout(e,t)},No=Do(Xr);function ko(e,t,n){var r=t+"";return No(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 bt(h,(function(n){var r="_."+n[0];t&n[1]&&!Ct(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Do(e){var t=0,n=0;return function(){var r=bn(),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=zr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Po,xo,Mo=(Po=Ps((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}),(function(e){return 500===xo.size&&xo.clear(),e})),xo=Po.cache,Po);function Fo(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Wo(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Un)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Jr((function(e,t){return Js(e)?lr(e,yr(t,1,Js,!0)):[]})),Vo=Jr((function(e,t){var n=Ko(t);return Js(n)&&(n=i),Js(e)?lr(e,yr(t,1,Js,!0),so(n,2)):[]})),Uo=Jr((function(e,t){var n=Ko(t);return Js(n)&&(n=i),Js(e)?lr(e,yr(t,1,Js,!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=vn(r+i,0)),kt(e,so(t,3),i)}function Go(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?vn(r+o,0):mn(o,r-1)),kt(e,so(t,3),o,!0)}function zo(e){return null!=e&&e.length?yr(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Jo=Jr((function(e){var t=At(e,gi);return t.length&&t[0]===e[0]?Ir(t):[]})),Yo=Jr((function(e){var t=Ko(e),n=At(e,gi);return t===Ko(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ir(n,so(t,2)):[]})),Qo=Jr((function(e){var t=Ko(e),n=At(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ir(n,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Jr(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 Gr(e,At(t,(function(e){return vo(e,n)?+e:e})).sort(Ei)),r}));function ts(e){return null==e?e:wn.call(e)}var ns=Jr((function(e){return ui(yr(e,1,Js,!0))})),rs=Jr((function(e){var t=Ko(e);return Js(t)&&(t=i),ui(yr(e,1,Js,!0),so(t,2))})),is=Jr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,ui(yr(e,1,Js,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Js(e))return t=vn(e.length,t),!0})),$t(t,(function(t){return At(e,Mt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:At(n,(function(e){return vt(t,i,e)}))}var as=Jr((function(e,t){return Js(e)?lr(e,t):[]})),us=Jr((function(e){return pi(wt(e,Js))})),cs=Jr((function(e){var t=Ko(e);return Js(t)&&(t=i),pi(wt(e,Js),so(t,2))})),ls=Jr((function(e){var t=Ko(e);return t="function"==typeof t?t:i,pi(wt(e,Js),i,t)})),fs=Jr(os),ds=Jr((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=Wn(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 Un&&vo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Vn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ys=Oi((function(e,t,n){De.call(e,n)?++e[n]:ir(e,n,1)})),vs=xi(Ho),ms=xi(Go);function bs(e,t){return(Gs(e)?bt:fr)(e,so(t,3))}function _s(e,t){return(Gs(e)?_t:dr)(e,so(t,3))}var Ss=Oi((function(e,t,n){De.call(e,n)?e[n].push(t):ir(e,n,[t])})),ws=Jr((function(e,t,n){var i=-1,o="function"==typeof t,s=qs(e)?r(e.length):[];return fr(e,(function(e){s[++i]=o?vt(t,e,n):Or(e,t,n)})),s})),Cs=Oi((function(e,t,n){ir(e,n,t)}));function Es(e,t){return(Gs(e)?At:Mr)(e,so(t,3))}var As=Oi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ls=Jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mo(e,t[0],t[1])?t=[]:n>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,yr(t,1),[])})),Ts=Rt||function(){return ot.Date.now()};function Is(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,c,i,i,i,i,t)}function Os(e,t){var n;if("function"!=typeof t)throw new Te(o);return e=ga(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Rs=Jr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Rs));r|=u}return Yi(e,r,t,n,i)})),Ns=Jr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(Ns));r|=u}return Yi(t,r,e,n,i)}));function ks(e,t,n){var r,s,a,u,c,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(o);function g(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function y(e){return f=e,c=Ro(m,t),d?g(e):u}function v(e){var n=e-l;return l===i||n>=t||n<0||p&&e-f>=a}function m(){var e=Ts();if(v(e))return b(e);c=Ro(m,function(e){var n=t-(e-l);return p?mn(n,a-(e-f)):n}(e))}function b(e){return c=i,h&&r?g(e):(r=s=i,u)}function _(){var e=Ts(),n=v(e);if(r=arguments,s=this,l=e,n){if(c===i)return y(l);if(p)return _i(c),c=Ro(m,t),g(l)}return c===i&&(c=Ro(m,t)),u}return t=va(t)||0,ta(n)&&(d=!!n.leading,a=(p="maxWait"in n)?vn(va(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:b(Ts())},_}var Ds=Jr((function(e,t){return cr(e,1,t)})),js=Jr((function(e,t,n){return cr(e,va(t)||0,n)}));function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(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(Ps.Cache||zn),n}function xs(e){if("function"!=typeof e)throw new Te(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)}}Ps.Cache=zn;var Ms=mi((function(e,t){var n=(t=1==t.length&&Gs(t[0])?At(t[0],Ut(so())):At(yr(t,1),Ut(so()))).length;return Jr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return vt(e,this,r)}))})),Fs=Jr((function(e,t){var n=tn(t,oo(Fs));return Yi(e,u,i,t,n)})),Ws=Jr((function(e,t){var n=tn(t,oo(Ws));return Yi(e,64,i,t,n)})),Bs=eo((function(e,t){return Yi(e,256,i,i,i,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Vs=Hi(Ar),Us=Hi((function(e,t){return e>=t})),Hs=Rr(function(){return arguments}())?Rr:function(e){return na(e)&&De.call(e,"callee")&&!et.call(e,"callee")},Gs=r.isArray,zs=ft?Ut(ft):function(e){return na(e)&&Er(e)==N};function qs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Js(e){return na(e)&&qs(e)}var Ys=pn||vu,Qs=dt?Ut(dt):function(e){return na(e)&&Er(e)==m};function Ks(e){if(!na(e))return!1;var t=Er(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Er(e);return t==_||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<=f}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?Ut(pt):function(e){return na(e)&&po(e)==w};function ia(e){return"number"==typeof e||na(e)&&Er(e)==C}function oa(e){if(!na(e)||Er(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ke.call(n)==Me}var sa=ht?Ut(ht):function(e){return na(e)&&Er(e)==L},aa=gt?Ut(gt):function(e){return na(e)&&po(e)==T};function ua(e){return"string"==typeof e||!Gs(e)&&na(e)&&Er(e)==I}function ca(e){return"symbol"==typeof e||na(e)&&Er(e)==O}var la=yt?Ut(yt):function(e){return na(e)&&ea(e.length)&&!!Ze[Er(e)]},fa=Hi(xr),da=Hi((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(qs(e))return ua(e)?sn(e):Ti(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==w?Xt:t==T?nn:$a)(e)}function ha(e){return e?(e=va(e))===l||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 ya(e){return e?sr(ga(e),0,p):0}function va(e){if("number"==typeof e)return e;if(ca(e))return d;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=Vt(e);var n=he.test(e);return n||ye.test(e)?nt(e.slice(2),n?2:8):pe.test(e)?d:+e}function ma(e){return Ii(e,Da(e))}function ba(e){return null==e?"":ai(e)}var _a=Ri((function(e,t){if(wo(t)||qs(t))Ii(t,ka(t),e);else for(var n in t)De.call(t,n)&&er(e,n,t[n])})),Sa=Ri((function(e,t){Ii(t,Da(t),e)})),wa=Ri((function(e,t,n,r){Ii(t,Da(t),e,r)})),Ca=Ri((function(e,t,n,r){Ii(t,ka(t),e,r)})),Ea=eo(or),Aa=Jr((function(e,t){e=Ee(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Da(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||$s(f,Re[l])&&!De.call(e,l))&&(e[l]=s[l])}return e})),La=Jr((function(e){return e.push(i,Ki),vt(Pa,i,e)}));function Ta(e,t,n){var r=null==e?i:wr(e,t);return r===i?n:r}function Ia(e,t){return null!=e&&ho(e,t,Tr)}var Oa=Wi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xe.call(t)),e[t]=n}),tu(iu)),Ra=Wi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xe.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]}),so),Na=Jr(Or);function ka(e){return qs(e)?Yn(e):Pr(e)}function Da(e){return qs(e)?Yn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=wo(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}(e)}var ja=Ri((function(e,t,n){Br(e,t,n)})),Pa=Ri((function(e,t,n,r){Br(e,t,n,r)})),xa=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=At(t,(function(t){return t=vi(t,e),r||(r=t.length>1),t})),Ii(e,no(e),n),r&&(n=ar(n,7,Zi));for(var i=t.length;i--;)ci(n,t[i]);return n})),Ma=eo((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Ia(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),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Wa=Ji(ka),Ba=Ji(Da);function $a(e){return null==e?[]:Ht(e,ka(e))}var Va=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Ka(ba(e).toLowerCase())}function Ha(e){return(e=ba(e))&&e.replace(me,Yt).replace(Ge,"")}var Ga=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),za=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qa=Di("toLowerCase"),Ja=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ya=ji((function(e,t,n){return e+(n?" ":"")+Ka(t)})),Qa=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ka=Di("toUpperCase");function Za(e,t,n){return e=ba(e),(t=n?i:t)===i?function(e){return Ye.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Jr((function(e,t){try{return vt(e,i,t)}catch(e){return Ks(e)?e:new Se(e)}})),eu=eo((function(e,t){return bt(t,(function(t){t=Fo(t),ir(e,t,Rs(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Mi(),ru=Mi(!0);function iu(e){return e}function ou(e){return jr("function"==typeof e?e:ar(e,1))}var su=Jr((function(e,t){return function(n){return Or(n,e,t)}})),au=Jr((function(e,t){return function(n){return Or(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 bt(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__=Ti(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function cu(){}var lu=$i(At),fu=$i(St),du=$i(Ot);function pu(e){return bo(e)?Mt(Fo(e)):function(e){return function(t){return wr(t,e)}}(e)}var hu=Ui(),gu=Ui(!0);function yu(){return[]}function vu(){return!1}var mu,bu=Bi((function(e,t){return e+t}),0),_u=zi("ceil"),Su=Bi((function(e,t){return e/t}),1),wu=zi("floor"),Cu=Bi((function(e,t){return e*t}),1),Eu=zi("round"),Au=Bi((function(e,t){return e-t}),0);return Wn.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},Wn.ary=Is,Wn.assign=_a,Wn.assignIn=Sa,Wn.assignInWith=wa,Wn.assignWith=Ca,Wn.at=Ea,Wn.before=Os,Wn.bind=Rs,Wn.bindAll=eu,Wn.bindKey=Ns,Wn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Gs(e)?e:[e]},Wn.chain=ps,Wn.chunk=function(e,t,n){t=(n?mo(e,t,n):t===i)?1:vn(ga(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(ln(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},Wn.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},Wn.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 Lt(Gs(n)?Ti(n):[n],yr(t,1))},Wn.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 Te(o);return[n(e[0]),e[1]]})):[],Jr((function(n){for(var r=-1;++r<t;){var i=e[r];if(vt(i[0],this,n))return vt(i[1],this,n)}}))},Wn.conforms=function(e){return function(e){var t=ka(e);return function(n){return ur(n,e,t)}}(ar(e,1))},Wn.constant=tu,Wn.countBy=ys,Wn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},Wn.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Wn.curryRight=function e(t,n,r){var o=Yi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Wn.debounce=ks,Wn.defaults=Aa,Wn.defaultsDeep=La,Wn.defer=Ds,Wn.delay=js,Wn.difference=$o,Wn.differenceBy=Vo,Wn.differenceWith=Uo,Wn.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):[]},Wn.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):[]},Wn.dropRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0,!0):[]},Wn.dropWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0):[]},Wn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&mo(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:ya(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Wn.filter=function(e,t){return(Gs(e)?wt:gr)(e,so(t,3))},Wn.flatMap=function(e,t){return yr(Es(e,t),1)},Wn.flatMapDeep=function(e,t){return yr(Es(e,t),l)},Wn.flatMapDepth=function(e,t,n){return n=n===i?1:ga(n),yr(Es(e,t),n)},Wn.flatten=zo,Wn.flattenDeep=function(e){return null!=e&&e.length?yr(e,l):[]},Wn.flattenDepth=function(e,t){return null!=e&&e.length?yr(e,t=t===i?1:ga(t)):[]},Wn.flip=function(e){return Yi(e,512)},Wn.flow=nu,Wn.flowRight=ru,Wn.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},Wn.functions=function(e){return null==e?[]:Sr(e,ka(e))},Wn.functionsIn=function(e){return null==e?[]:Sr(e,Da(e))},Wn.groupBy=Ss,Wn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Wn.intersection=Jo,Wn.intersectionBy=Yo,Wn.intersectionWith=Qo,Wn.invert=Oa,Wn.invertBy=Ra,Wn.invokeMap=ws,Wn.iteratee=ou,Wn.keyBy=Cs,Wn.keys=ka,Wn.keysIn=Da,Wn.map=Es,Wn.mapKeys=function(e,t){var n={};return t=so(t,3),br(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Wn.mapValues=function(e,t){var n={};return t=so(t,3),br(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Wn.matches=function(e){return Fr(ar(e,1))},Wn.matchesProperty=function(e,t){return Wr(e,ar(t,1))},Wn.memoize=Ps,Wn.merge=ja,Wn.mergeWith=Pa,Wn.method=su,Wn.methodOf=au,Wn.mixin=uu,Wn.negate=xs,Wn.nthArg=function(e){return e=ga(e),Jr((function(t){return $r(t,e)}))},Wn.omit=xa,Wn.omitBy=function(e,t){return Fa(e,xs(so(t)))},Wn.once=function(e){return Os(2,e)},Wn.orderBy=function(e,t,n,r){return null==e?[]:(Gs(t)||(t=null==t?[]:[t]),Gs(n=r?i:n)||(n=null==n?[]:[n]),Vr(e,t,n))},Wn.over=lu,Wn.overArgs=Ms,Wn.overEvery=fu,Wn.overSome=du,Wn.partial=Fs,Wn.partialRight=Ws,Wn.partition=As,Wn.pick=Ma,Wn.pickBy=Fa,Wn.property=pu,Wn.propertyOf=function(e){return function(t){return null==e?i:wr(e,t)}},Wn.pull=Zo,Wn.pullAll=Xo,Wn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,so(n,2)):e},Wn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,i,n):e},Wn.pullAt=es,Wn.range=hu,Wn.rangeRight=gu,Wn.rearg=Bs,Wn.reject=function(e,t){return(Gs(e)?wt:gr)(e,xs(so(t,3)))},Wn.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 Gr(e,i),n},Wn.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Jr(e,t=t===i?t:ga(t))},Wn.reverse=ts,Wn.sampleSize=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ga(t),(Gs(e)?Kn:Qr)(e,t)},Wn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Wn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Kr(e,t,n,r)},Wn.shuffle=function(e){return(Gs(e)?Zn:ei)(e)},Wn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mo(e,t,n)?(t=0,n=r):(t=null==t?0:ga(t),n=n===i?r:ga(n)),ti(e,t,n)):[]},Wn.sortBy=Ls,Wn.sortedUniq=function(e){return e&&e.length?oi(e):[]},Wn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Wn.split=function(e,t,n){return n&&"number"!=typeof n&&mo(e,t,n)&&(t=n=i),(n=n===i?p:n>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?bi(sn(e),0,n):e.split(t,n):[]},Wn.spread=function(e,t){if("function"!=typeof e)throw new Te(o);return t=null==t?0:vn(ga(t),0),Jr((function(n){var r=n[t],i=bi(n,0,t);return r&&Lt(i,r),vt(e,this,i)}))},Wn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Wn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ga(t))<0?0:t):[]},Wn.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):[]},Wn.takeRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!1,!0):[]},Wn.takeWhile=function(e,t){return e&&e.length?fi(e,so(t,3)):[]},Wn.tap=function(e,t){return t(e),e},Wn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Te(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})},Wn.thru=hs,Wn.toArray=pa,Wn.toPairs=Wa,Wn.toPairsIn=Ba,Wn.toPath=function(e){return Gs(e)?At(e,Fo):ca(e)?[e]:Ti(Mo(ba(e)))},Wn.toPlainObject=ma,Wn.transform=function(e,t,n){var r=Gs(e),i=r||Ys(e)||la(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Zs(o)?Bn(ze(e)):{}}return(i?bt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Wn.unary=function(e){return Is(e,1)},Wn.union=ns,Wn.unionBy=rs,Wn.unionWith=is,Wn.uniq=function(e){return e&&e.length?ui(e):[]},Wn.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},Wn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Wn.unset=function(e,t){return null==e||ci(e,t)},Wn.unzip=os,Wn.unzipWith=ss,Wn.update=function(e,t,n){return null==e?e:li(e,t,yi(n))},Wn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,yi(n),r)},Wn.values=$a,Wn.valuesIn=function(e){return null==e?[]:Ht(e,Da(e))},Wn.without=as,Wn.words=Za,Wn.wrap=function(e,t){return Fs(yi(t),e)},Wn.xor=us,Wn.xorBy=cs,Wn.xorWith=ls,Wn.zip=fs,Wn.zipObject=function(e,t){return hi(e||[],t||[],er)},Wn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Kr)},Wn.zipWith=ds,Wn.entries=Wa,Wn.entriesIn=Ba,Wn.extend=Sa,Wn.extendWith=wa,uu(Wn,Wn),Wn.add=bu,Wn.attempt=Xa,Wn.camelCase=Va,Wn.capitalize=Ua,Wn.ceil=_u,Wn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=va(n))==n?n:0),t!==i&&(t=(t=va(t))==t?t:0),sr(va(e),t,n)},Wn.clone=function(e){return ar(e,4)},Wn.cloneDeep=function(e){return ar(e,5)},Wn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Wn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Wn.conformsTo=function(e,t){return null==t||ur(e,t,ka(t))},Wn.deburr=Ha,Wn.defaultTo=function(e,t){return null==e||e!=e?t:e},Wn.divide=Su,Wn.endsWith=function(e,t,n){e=ba(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},Wn.eq=$s,Wn.escape=function(e){return(e=ba(e))&&J.test(e)?e.replace(z,Qt):e},Wn.escapeRegExp=function(e){return(e=ba(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Wn.every=function(e,t,n){var r=Gs(e)?St:pr;return n&&mo(e,t,n)&&(t=i),r(e,so(t,3))},Wn.find=vs,Wn.findIndex=Ho,Wn.findKey=function(e,t){return Nt(e,so(t,3),br)},Wn.findLast=ms,Wn.findLastIndex=Go,Wn.findLastKey=function(e,t){return Nt(e,so(t,3),_r)},Wn.floor=wu,Wn.forEach=bs,Wn.forEachRight=_s,Wn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Da)},Wn.forInRight=function(e,t){return null==e?e:mr(e,so(t,3),Da)},Wn.forOwn=function(e,t){return e&&br(e,so(t,3))},Wn.forOwnRight=function(e,t){return e&&_r(e,so(t,3))},Wn.get=Ta,Wn.gt=Vs,Wn.gte=Us,Wn.has=function(e,t){return null!=e&&ho(e,t,Lr)},Wn.hasIn=Ia,Wn.head=qo,Wn.identity=iu,Wn.includes=function(e,t,n,r){e=qs(e)?e:$a(e),n=n&&!r?ga(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Dt(e,t,n)>-1},Wn.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=vn(r+i,0)),Dt(e,t,i)},Wn.inRange=function(e,t,n){return t=ha(t),n===i?(n=t,t=0):n=ha(n),function(e,t,n){return e>=mn(t,n)&&e<vn(t,n)}(e=va(e),t,n)},Wn.invoke=Na,Wn.isArguments=Hs,Wn.isArray=Gs,Wn.isArrayBuffer=zs,Wn.isArrayLike=qs,Wn.isArrayLikeObject=Js,Wn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Er(e)==v},Wn.isBuffer=Ys,Wn.isDate=Qs,Wn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},Wn.isEmpty=function(e){if(null==e)return!0;if(qs(e)&&(Gs(e)||"string"==typeof e||"function"==typeof e.splice||Ys(e)||la(e)||Hs(e)))return!e.length;var t=po(e);if(t==w||t==T)return!e.size;if(wo(e))return!Pr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Wn.isEqual=function(e,t){return Nr(e,t)},Wn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Nr(e,t,i,n):!!r},Wn.isError=Ks,Wn.isFinite=function(e){return"number"==typeof e&&hn(e)},Wn.isFunction=Zs,Wn.isInteger=Xs,Wn.isLength=ea,Wn.isMap=ra,Wn.isMatch=function(e,t){return e===t||kr(e,t,uo(t))},Wn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,kr(e,t,uo(t),n)},Wn.isNaN=function(e){return ia(e)&&e!=+e},Wn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Wn.isNil=function(e){return null==e},Wn.isNull=function(e){return null===e},Wn.isNumber=ia,Wn.isObject=ta,Wn.isObjectLike=na,Wn.isPlainObject=oa,Wn.isRegExp=sa,Wn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},Wn.isSet=aa,Wn.isString=ua,Wn.isSymbol=ca,Wn.isTypedArray=la,Wn.isUndefined=function(e){return e===i},Wn.isWeakMap=function(e){return na(e)&&po(e)==R},Wn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Er(e)},Wn.join=function(e,t){return null==e?"":gn.call(e,t)},Wn.kebabCase=Ga,Wn.last=Ko,Wn.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?vn(r+o,0):mn(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,Pt,o,!0)},Wn.lowerCase=za,Wn.lowerFirst=qa,Wn.lt=fa,Wn.lte=da,Wn.max=function(e){return e&&e.length?hr(e,iu,Ar):i},Wn.maxBy=function(e,t){return e&&e.length?hr(e,so(t,2),Ar):i},Wn.mean=function(e){return xt(e,iu)},Wn.meanBy=function(e,t){return xt(e,so(t,2))},Wn.min=function(e){return e&&e.length?hr(e,iu,xr):i},Wn.minBy=function(e,t){return e&&e.length?hr(e,so(t,2),xr):i},Wn.stubArray=yu,Wn.stubFalse=vu,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=Cu,Wn.nth=function(e,t){return e&&e.length?$r(e,ga(t)):i},Wn.noConflict=function(){return ot._===this&&(ot._=Fe),this},Wn.noop=cu,Wn.now=Ts,Wn.pad=function(e,t,n){e=ba(e);var r=(t=ga(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Vi(fn(i),n)+e+Vi(ln(i),n)},Wn.padEnd=function(e,t,n){e=ba(e);var r=(t=ga(t))?on(e):0;return t&&r<t?e+Vi(t-r,n):e},Wn.padStart=function(e,t,n){e=ba(e);var r=(t=ga(t))?on(e):0;return t&&r<t?Vi(t-r,n)+e:e},Wn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(ba(e).replace(re,""),t||0)},Wn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mo(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 mn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return zr(e,t)},Wn.reduce=function(e,t,n){var r=Gs(e)?Tt:Wt,i=arguments.length<3;return r(e,so(t,4),n,i,fr)},Wn.reduceRight=function(e,t,n){var r=Gs(e)?It:Wt,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},Wn.repeat=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ga(t),qr(ba(e),t)},Wn.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wn.result=function(e,t,n){var r=-1,o=(t=vi(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},Wn.round=Eu,Wn.runInContext=e,Wn.sample=function(e){return(Gs(e)?Qn:Yr)(e)},Wn.size=function(e){if(null==e)return 0;if(qs(e))return ua(e)?on(e):e.length;var t=po(e);return t==w||t==T?e.size:Pr(e).length},Wn.snakeCase=Ja,Wn.some=function(e,t,n){var r=Gs(e)?Ot:ni;return n&&mo(e,t,n)&&(t=i),r(e,so(t,3))},Wn.sortedIndex=function(e,t){return ri(e,t)},Wn.sortedIndexBy=function(e,t,n){return ii(e,t,so(n,2))},Wn.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},Wn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Wn.sortedLastIndexBy=function(e,t,n){return ii(e,t,so(n,2),!0)},Wn.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},Wn.startCase=Ya,Wn.startsWith=function(e,t,n){return e=ba(e),n=null==n?0:sr(ga(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},Wn.subtract=Au,Wn.sum=function(e){return e&&e.length?Bt(e,iu):0},Wn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},Wn.template=function(e,t,n){var r=Wn.templateSettings;n&&mo(e,t,n)&&(t=i),e=ba(e),t=wa({},t,r,Qi);var o,s,a=wa({},t.imports,r.imports,Qi),u=ka(a),c=Ht(a,u),l=0,f=t.interpolate||be,d="__p += '",p=Ae((t.escape||be).source+"|"+f.source+"|"+(f===K?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";e.replace(p,(function(t,n,r,i,a,u){return r||(r=i),d+=e.slice(l,u).replace(_e,Kt),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var g=De.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(V,""):d).replace(U,"$1").replace(H,"$1;"),d="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")+d+"return __p\n}";var y=Xa((function(){return we(u,h+"return "+d).apply(i,c)}));if(y.source=d,Ks(y))throw y;return y},Wn.times=function(e,t){if((e=ga(e))<1||e>f)return[];var n=p,r=mn(e,p);t=so(t),e-=p;for(var i=$t(r,t);++n<e;)t(n);return i},Wn.toFinite=ha,Wn.toInteger=ga,Wn.toLength=ya,Wn.toLower=function(e){return ba(e).toLowerCase()},Wn.toNumber=va,Wn.toSafeInteger=function(e){return e?sr(ga(e),-9007199254740991,f):0===e?e:0},Wn.toString=ba,Wn.toUpper=function(e){return ba(e).toUpperCase()},Wn.trim=function(e,t,n){if((e=ba(e))&&(n||t===i))return Vt(e);if(!e||!(t=ai(t)))return e;var r=sn(e),o=sn(t);return bi(r,zt(r,o),qt(r,o)+1).join("")},Wn.trimEnd=function(e,t,n){if((e=ba(e))&&(n||t===i))return e.slice(0,an(e)+1);if(!e||!(t=ai(t)))return e;var r=sn(e);return bi(r,0,qt(r,sn(t))+1).join("")},Wn.trimStart=function(e,t,n){if((e=ba(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=sn(e);return bi(r,zt(r,sn(t))).join("")},Wn.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=ba(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 c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),sa(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ae(o.source,ba(de.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;c=c.slice(0,d===i?u:d)}}else if(e.indexOf(ai(o),u)!=u){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},Wn.unescape=function(e){return(e=ba(e))&&q.test(e)?e.replace(G,un):e},Wn.uniqueId=function(e){var t=++je;return ba(e)+t},Wn.upperCase=Qa,Wn.upperFirst=Ka,Wn.each=bs,Wn.eachRight=_s,Wn.first=qo,uu(Wn,(mu={},br(Wn,(function(e,t){De.call(Wn.prototype,t)||(mu[t]=e)})),mu),{chain:!1}),Wn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wn[e].placeholder=Wn})),bt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:vn(ga(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,p),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(iu)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Jr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Or(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(xs(so(e)))},Un.prototype.slice=function(e,t){e=ga(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(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)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(p)},br(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Wn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Wn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Un,c=a[0],l=u||Gs(t),f=function(e){var t=o.apply(Wn,Lt([e],a));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=s&&!d,g=u&&!p;if(!s&&l){t=g?t:new Un(this);var y=e.apply(t,a);return y.__actions__.push({func:hs,args:[f],thisArg:i}),new Vn(y,d)}return h&&g?e.apply(this,a):(y=this.thru(f),h?r?y.value()[0]:y.value():y)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Wn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Gs(i)?i:[],e)}return this[n]((function(n){return t.apply(Gs(n)?n:[],e)}))}})),br(Un.prototype,(function(e,t){var n=Wn[t];if(n){var r=n.name+"";De.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[Fi(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Gs(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=mn(t,e+s);break;case"takeRight":e=vn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,d=0,p=mn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return di(e,this.__actions__);var h=[];e:for(;u--&&d<p;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],m=v.iteratee,b=v.type,_=m(y);if(2==b)y=_;else if(!_){if(1==b)continue e;break e}}h[d++]=y}return h},Wn.prototype.at=gs,Wn.prototype.chain=function(){return ps(this)},Wn.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Wn.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__++]}},Wn.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},Wn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Vn(t,this.__chain__)}return this.thru(ts)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,st&&(Wn.prototype[st]=function(){return this}),Wn}();ot._=cn,(r=function(){return cn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},98253:(e,t,n)=>{var r=n(158);e.exports=function(){return r.Date.now()}},38172:(e,t,n)=>{var r=n(76897),i=n(23619);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})}},95053:(e,t,n)=>{var r=n(12383),i=n(23619),o=n(81878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=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)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},50586:(e,t,n)=>{var r=n(36589),i=n(22708),o=i;o.v1=r,o.v4=i,e.exports=o},98726: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++]]}},76338:(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},36589:(e,t,n)=>{var r=n(76338),i=n(98726),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,c=0;e.exports=function(e,t,n){var r=t&&n||0,o=t||[],l=void 0!==(e=e||{}).clockseq?e.clockseq:a,f=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:c+1,p=f-u+(d-c)/1e4;if(p<0&&void 0===e.clockseq&&(l=l+1&16383),(p<0||f>u)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=f,c=d,a=l;var h=(1e4*(268435455&(f+=122192928e5))+d)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=255&h;var g=f/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++]=l>>>8|128,o[r++]=255&l;for(var y=e.node||s,v=0;v<6;++v)o[r+v]=y[v];return t||i(o)}},22708:(e,t,n)=>{var r=n(76338),i=n(98726);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)}},34361:function(e,t,n){"use strict";var r,i,o,s,a,u,c,l,f,d,p,h,g,y=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},v=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)},m=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const b=n(98832),_=m(n(72551)),S=n(6192),w=n(81298),C=n(81298),E=m(n(60306));class A{constructor(e){r.set(this,void 0),i.set(this,void 0),y(this,r,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};v(this,r,"f").transmit(w.HEARTBEAT_CHANNEL,t),y(this,i,setInterval((()=>{v(this,r,"f").transmit(w.HEARTBEAT_CHANNEL,t)}),w.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(v(this,i,"f")),y(this,i,void 0,"f")}}r=new WeakMap,i=new WeakMap;class L{constructor(e,t,n="app"){o.set(this,void 0),y(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){v(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return v(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return v(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),c.set(this,""),l.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),f.set(this,{}),d.set(this,{}),p.set(this,[]),h.set(this,void 0),g.set(this,void 0),y(this,h,e,"f"),y(this,a,new A(e),"f"),y(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:v(this,c,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(v(this,d,"f")[t?.type]??[]).concat(v(this,d,"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=v(this,f,"f")[t];n&&(r||[]).forEach((e=>e(n)))}handleIncoming(e){switch(_.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=v(this,c,"f")),e);v(this,p,"f").forEach((async t=>{const{message:n,handler:r,resolve:i}=t,{err:o,response:s}=await v(this,h,"f").query(w.SERVER_CHANNEL,e(n),r);i({err:o,receiveMessage:s?.data})})),y(this,p,[],"f")}async connectWhenFSBLIsReady(){v(this,u,"f")||(y(this,u,!0,"f"),await v(this,g,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(v(this,s,"f")){const{err:r,response:i}=await v(this,h,"f").query(w.SERVER_CHANNEL,e,t);n({err:r,receiveMessage:i?.data})}else v(this,p,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=v(this,g,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;_.default.log(`fdc3.connect StartupData for ${t}`,e),y(this,c,t,"f");const r={type:"register",meta:this.meta(),payload:{clientChannel:v(this,l,"f"),windowName:t,authenticationToken:n}};v(this,h,"f").query(w.SERVER_CHANNEL,r,(e=>{e?_.default.error("connect error",e):(v(this,h,"f").addResponder(v(this,l,"f"),((e,t)=>{if(e||!t){const t=C.errorAsString(e??"No request received on responder");_.default.error(`FinsembleDesktopAgent can't listen on channel ${v(this,l,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),y(this,s,!0,"f"),this.releaseQueue())})),v(this,a,"f").start(v(this,c,"f"))}stop(){v(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{v(this,h,"f").removeResponder(v(this,l,"f")),y(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 L(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 b.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 b.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 b.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 b.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){v(this,f,"f")[e]=C.mmAdd(v(this,f,"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),v(this,f,"f")[e]=C.mmRemove(v(this,f,"f"),e,t)}}}channelAddContextListener(e,t,n){const r=n?t:"*";n||(n=t);const i={handler:n,channel:e};v(this,d,"f")[r]=C.mmAdd(v(this,f,"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),v(this,d,"f")[r]=C.mmRemove(v(this,f,"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 L(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 L(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:E.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,g=new WeakMap},81298:(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"}}},10589: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.FSBLService=void 0;const i=r(n(39319)),o=n(67580),s=n(51742),a=n(16925),u=n(50586),c=n(6192),l=n(34361);t.FSBLService=class{async startApp(){await s.System.ready();const e=await o.getSystemStartupData(),t=s.System.Window.getCurrent(),n=t.name??document?.location?.href??"Unknown App",r=t.name??document?.location?.href??`Unknown window-${u.v4()}`,f=o.getManifestFromStartupData(e)??{},d=o.getRouterConfig({windowName:r,systemManifest:f});await i.default.start(d);const p=a.Startup.getInstance();p.setStartupData({windowName:r,authenticationToken:{authenticationKeyType:"unauthenticated",meta:{name:n}}}),c.Globals.fdc3=new l.FinsembleDesktopAgent({routerClient:i.default,startup:p}),p.ready()}async stopApp(){i.default.stop()}}},67580: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(72551)),o=n(51742),s=n(33998),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}},16925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const r=n(81298),i=n(6192),o=n(50586),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},17348: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(57664),u=o(n(19886)),c=s(n(72551)),l=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&&c.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||c.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||c.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};return l.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)):c.default.system.error("DistributedStore.setValues:params must be an array"):c.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){l.distributedStoreClient.routerClient.query("storeService.getValue",{store:this.name,field:e.field},((e,n)=>e?t(e):t(e,n.data)))}getGlobalValues(e,t){l.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};l.distributedStoreClient.removeStore(t,(t=>t?e(t):e(null,!0)))}changeSub(e){this.subs||(this.subs=[]),this.subs[e]||(this.isGlobal&&l.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]?(c.default.system.debug("DistributedStore.triggerListeners",e,t),this.listeners[e][n](null,{field:e,value:t})):c.default.system.warn("DistributedStoreClient:triggerListeners: listener is not a function",e,n,this.listeners[e][n])}}},72669: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(39319)),o=r(n(72551)),s=n(51742),a=n(13854);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}}},70010: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(57664),o=r(n(13712)),s=n(72669),a=r(n(5020)),u=r(n(72551));class c 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 l=new c({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=l},43190: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(72669),o=r(n(17348));let s;const a=window;let u;const c={};function l(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 f(e,t){u.routerClient.query("storeService.removeStore",e,((e,n)=>t(e,!e&&n.data)))}class d extends i._BaseClient{constructor(e){super(e),this.load=function(e){e()},u=this,this.ls=c}getStore(e,t){return e.global?l(e,t):e.store&&c[e.store]?t(null,c[e.store]):l(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(c[e.store])return n({err:null,data:c[e.store]}),t(null,c[e.store]);const i=new s(e,u.routerClient);return c[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?f(e,t):c[e.store]?(delete c[e.store],t(null,!0)):void f(e,t)}}var p=new d({startupDependencies:{},onReady(e){s=o.default,p.load(e)},name:"distributedStoreClient"});a.distributedStoreClient=p,t.default=p},75729:(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},c={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},l={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:c,system:c,perf:c};function f(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=f,this.setting=()=>l,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}}},72551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerConstructor=void 0;const r=n(51742),i=n(75729),o=n(16925),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(38172);t.LoggerConstructor=function(e){const i=this;let c;i.RouterClient=e&&e.RouterClient;let l=!1,f=!1;const d=i;let p,h,g=0,y=0;this.startupTime=0;let v=[];if("undefined"==typeof window)return;let m=r.System.Window.getCurrent().name;window.top!==window&&(m=`${m}.Frame`),this.onLogStateChangeCallback=[];let b={console:a,dev:s,system:s,perf:s};function _(e,t,n){this.category=e,!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),this.logClientName=c?`${m}: view-${c}`:m,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+g}function S(e,t){e&&e.dev&&(b=e,i.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){d.system.debug("Logger updateQueueBasedOnState",e,g,"QUEUE LENGTH",v.length,b);const t=[];for(let n=0,{length:r}=v;n<r;n++)if(b[v[n].category][v[n].logType]&&!b[v[n].category].LocalOnly)e&&(v[n].logTimestamp=v[n].logTimestamp+g),t.push(v[n]);else if(b[v[n].category][v[n].logType]&&b[v[n].category].LocalOnly){const e=v[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}v=t}(t)}function w(){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"),m=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),m},this.clearMessageList=function(){v=[]},this.callStack=function(){return w()},this.setting=function(){return b};const C=console.error,E=console.warn,A=console.info,L=console.log,T=console.debug;function I(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?I(t):t)),[])}function O(e,t){try{e.apply(console,I(t))}catch(e){(t=[]).push(w())}}let R=()=>{v.length>0&&(i.RouterClient.transmit("logger.service.logMessages",v),d.clearMessageList())};function N(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?(O(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 _(e,n,JSON.stringify(r))}catch(t){r.splice(0,r.length),r.push(w()),i=new _(e,n,`*** Logging Error: ${JSON.stringify(r)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(i)?function(e){if(v.length<2e4)v.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",v.length);let e,n=0;for(;e=v.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(i):++y<=5&&O(A,[`"Filtered Logger Message (${y} of first 5 shown)`,i]),f&&R()}function k(){const{windowName:e}=o.Startup.getInstance().getStartupData();m=e,window.top!==window&&(m=`${m}.Frame`);const t=`finsemble.logger.client.${m}`;!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),d.system.debug("logger.service.registering",m),r.System.Window.getCurrent().getOptions((n=>{const r=n?.customData?.component?.centralLoggerNamePrefix;i.RouterClient.query("logger.service.register",{clientName:m,clientChannel:t,windowName:e,viewId:c,centralLoggerNamePrefix:r},((e,t)=>{if(e)setTimeout(k,750);else{for(const e of v)e.viewId=c;f=!0,d.system.debug("logger.service.registered"),p=t.data,"routerService"!==m?(g=h,S(p,!0)):S(p,!1),N("system","Debug",["Logger Registered"]),R()}}))})),i.RouterClient.addListener(t,((e,t)=>{d.system.debug("logger.client.setLogState",t.data),p=t.data,S(p,!1)}))}R=u(R,"routerService"===m?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(w()),b.dev.Error&&!b.dev.LocalOnly&&N("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),O(C,e)},this.warn=function(){if(b.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(w()),b.dev.Warn&&!b.dev.LocalOnly&&N("dev","Warn",e),b.dev.Warn&&b.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),O(E,e))}},this.info=function(){if(b.dev.Info){const e=Array.prototype.slice.call(arguments);b.dev.Info&&!b.dev.LocalOnly&&N("dev","Info",e),b.dev.Info&&b.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),O(A,e))}},this.log=function(){if(b.dev.Log){const e=Array.prototype.slice.call(arguments);b.dev.Log&&!b.dev.LocalOnly&&N("dev","Log",e),b.dev.Log&&b.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),O(L,e))}},this.debug=function(){if(b.dev.Debug){const e=Array.prototype.slice.call(arguments);b.dev.Debug&&!b.dev.LocalOnly&&N("dev","Debug",e),b.dev.Debug&&b.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),O(T,e))}},this.verbose=function(){if(b.dev.Verbose){const e=Array.prototype.slice.call(arguments);b.dev.Verbose&&!b.dev.LocalOnly&&N("dev","Verbose",e),b.dev.Verbose&&b.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),O(T,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(w()),b.system.Error&&!b.system.LocalOnly&&N("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),O(C,e)},this.system.warn=function(){if(b.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(w()),b.system.Warn&&!b.system.LocalOnly&&N("system","Warn",e),b.system.Warn&&b.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),O(E,e))}},this.system.info=function(){if(b.system.Info){const e=Array.prototype.slice.call(arguments);b.system.Info&&!b.system.LocalOnly&&N("system","Info",e),b.system.Info&&b.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),O(A,e))}},this.system.log=function(){if(b.system.Log){const e=Array.prototype.slice.call(arguments);b.system.Log&&!b.system.LocalOnly&&N("system","Log",e),b.system.Log&&b.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),O(L,e))}},this.system.debug=function(){if(b.system.Debug){const e=Array.prototype.slice.call(arguments);b.system.Debug&&!b.system.LocalOnly&&N("system","Debug",e),b.system.Debug&&b.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),O(T,e))}},this.system.verbose=function(){if(b.system.Verbose){var e=Array.prototype.slice.call(arguments);b.system.Verbose&&!b.system.LocalOnly&&N("system","Verbose",e),b.system.Verbose&&b.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),O(T,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(w()),b.perf.Error&&!b.perf.LocalOnly&&N("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),O(C,e)},this.perf.warn=function(){if(b.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(w()),b.perf.Warn&&!b.perf.LocalOnly&&N("perf","Warn",e),b.perf.Warn&&b.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),O(E,e))}},this.perf.info=function(){if(b.perf.Info){const e=Array.prototype.slice.call(arguments);b.perf.Info&&!b.perf.LocalOnly&&N("perf","Info",e),b.perf.Info&&b.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),O(A,e))}},this.perf.log=function(){if(b.perf.Log){const e=Array.prototype.slice.call(arguments);b.perf.Log&&!b.perf.LocalOnly&&N("perf","Log",e),b.perf.Log&&b.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),O(L,e))}},this.perf.debug=function(){if(b.perf.Debug){const e=Array.prototype.slice.call(arguments);b.perf.Debug&&!b.perf.LocalOnly&&N("perf","Debug",e),b.perf.Debug&&b.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),O(T,e))}},this.perf.verbose=function(){if(b.perf.Verbose){const e=Array.prototype.slice.call(arguments);b.perf.Verbose&&!b.perf.LocalOnly&&N("perf","Verbose",e),b.perf.Verbose&&b.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),O(T,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){d.system.debug("logger.service.unregister",m,e,c),R();const n=e||{clientName:m,viewId:c};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(39319).default);const t=()=>{e=i.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(i.status="online",d.system.debug("Logger onReady",m),i.RouterClient.calibrateTimeWithRouterService((e=>{h=e,l||(i.startupTime=performance.now()-i.startupTime,k(),l=!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},40568: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(82369)),o=r(n(13712)),s=r(n(73699)),a=n(51742),u=n(72551),c=n(6192),l=n(75729),f=n(50586),d=[];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={},y={},v={},m={},b={},_={},S={};let w,C=null,E=!1;const A=[];function L(){this.header={origin:w,type:"initialHandshake"}}function T(e,t){this.header={origin:w,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function I(e){this.header={origin:w,type:"addListener",channel:e}}function O(e,t,n){this.header={origin:w,type:"transmit",channel:e},this.data=t,this.options=n}function R(e){this.header={origin:w,type:"removeListener",channel:e}}function N(e){this.header={origin:w,type:"addResponder",channel:e}}function k(e,t,n){this.header={origin:w,type:"query",queryID:e,channel:t},this.data=n}function D(e,t,n){this.header={origin:w,type:"queryResponse",queryID:e,error:t},this.data=n}function j(e){this.header={origin:w,type:"removeResponder",channel:e}}function P(e,t){this.header={origin:w,type:"subscribe",subscribeID:e,topic:t}}function x(e,t){this.header={origin:w,type:"unsubscribe",subscribeID:e,topic:t}}function M(e,t){this.header={origin:w,type:"publish",topic:e},this.data=t}function F(e,t,n,r){this.header={origin:w,type:"notify",subscribeID:e,topic:t,error:n},this.data=r}function W(e,t,n){this.header={origin:w,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:w,type:"removePubSubResponder",topic:e}}function $(e){C?C.send(e):(p.system.info("RouterClient: Queuing message since router initialization not complete",e),d.push(e))}function V(){return this.header.origin===this.header.lastClient}function U(e,t){p.system.info("RouterClient: outgoing query response","CHANNEL",this.header.channel,"RESPONSE DATA",t,"QUERY ID",this.header.queryID),$(new D(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=V,t.sendQueryResponse=U.bind(t),p.system.info("RouterClient: incoming query","CHANNEL",t.header.channel,"FROM",t.header.origin,"QUERY MESSAGE",t),n(null,t))}function G(e,t){if(e)p.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{g[this.header.topic]=t;const n=v[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 z(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=v,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 q(){!function(e,t,n){let r=!1;if(t in e){const i=v[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)}`)}(v,this.header.topic,this.header.subscribeID)}function J(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=V,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])}(_,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=V,p.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(m,i);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in y)if(y[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=G,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 y)if(y[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=z,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 y)if(y[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=q,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 Y(e,t){t.header.lastClient=w,t.header.incomingTransportInfo=e,J(t)}this.startupTime=0,this.notificationURL="";const Q=(t,n,r)=>{let o,a;p.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,c,l,f,h=!1,g=0;const y=t=>{a=0,p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),C=t,e=f,l(),o=setInterval(l,200)};u=e=>{p.system.error("RouterClientError",e)};const v=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),i.default.getTransport(t,n,Y,w,"RouterService").then(y).catch(u)};c=()=>{if(clearInterval(o),g++,g<=3)p.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",g,t),v();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})}},l=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),$(new L),a++>50&&c()},f=()=>{if(!h){if(p.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${w} with transport ${C.identifier()}`),h=!0,clearInterval(o),d)for(let e=0;e<d.length;e++){p.system.debug("RouterClient: firing queued msg");const t=d[e];C.send(t)}r&&r()}},v()};function K(){return`${w}.${f.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(c.Globals.performance.timing.navigationStart+c.Globals.performance.now()),$(new T(t.clientBaseTime,t.serviceBaseTime)))},t(new T([],[]))},this.onReady=e=>new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};E?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 I(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 O(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 R(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 N(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=`${K()}.${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){_[i]=(c,l)=>{o({err:c,response:l}),"function"==typeof r?r(c,l):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})},c.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 W(e.toString(),t,!0)),s="success"):!function(e,t,n,r){let i=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(y[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 W(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 y[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=K();return function(e,t,n,r){e[t]=n,b[t]=r}(m,n,t,e),$(new P(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 M(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}(m,e.subscribeID)?p.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):$(new x(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 R(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 y[e.toString()];for(const e in m){const t=b[e];p.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),$(new x(e,t)),delete m[e],delete b[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 l.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(p=new l.LocalLogger),w=`RouterClient.${e.windowName}.${f.v4()}`;const n=`"RouterClient Check: connecting new client for ${w}`;p.system.debug(n),console.debug(n),Q(e,e.transportName,(()=>{!function(){for(p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),E=!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}}},39319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const r=n(40568),i=n(72551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",r.RouterClientConstructor),i.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(40568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},6192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window},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]}},78379:(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"}},13854: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(39319)),s=n(78379),a=r(n(5020)),u=r(n(72551));class c 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 l(){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 f{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=l();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new c({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 d{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=l();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 f,this.shutdown=new d,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},82369: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(72551)),o=n(51742),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 c=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(c)},s(this)},c=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 c(){i.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function l(){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(c,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&&(l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},l()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",c),t.default=s},51742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const r=n(16925);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 c{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return c.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!c.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!c.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 c.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=c},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(39319)),o=r(n(72551)),s=n(56188),a=n(33509),u=n(95269),c=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 c=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 l=i.default.subscribe(a.STAGE_CHANNEL,((a,f)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data.stage,l),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===c)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(f.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data,l),"stageEntered"===t&&a+1>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,l,n.name),n(),r(),i.default.unsubscribe(l)):"stageCompleted"===t&&a>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,l),n(),r(),i.default.unsubscribe(l)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${c} `,a,c,e,l)}}))}))}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=c},96755: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.BaseService=void 0;const a=n(57664),u=n(13854),c=s(n(39319)),l=s(n(72551)),f=s(n(5020)),d=n(51742),p=o(n(78379)),h=n(6192),g=n(10589),{SERVICE_INITIALIZING_CHANNEL:y,SERVICE_READY_CHANNEL:v,SERVICE_QUERY_READY_CHANNEL:m,SERVICE_CLOSING_CHANNEL:b,SERVICE_CLOSED_CHANNEL:_,SERVICE_STOP_CHANNEL:S}=p,w={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},addOFWrapper:!1,name:window.name};t.BaseService=class{constructor(e=w){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=w.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=w.startupDependencies.clients)):e.startupDependencies=w.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=w.shutdownDependencies.services):e.shutdownDependencies=w.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=l.default,this.RouterClient=c.default,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),h.Globals.finsembleServices?h.Globals.finsembleServices.push(this):h.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){l.default.system.debug("BaseService.start.setParentUUID"),d.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,t.parentUuid=n.customData.parentUuid,e()}))}async function r(){await(new g.FSBLService).startApp(),c.default.addResponder(m(e.name),((t,n)=>{(e.status="ready")?n?.sendQueryResponse(null):n?.sendQueryResponse("service not ready")})),c.default.transmit(y,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const n=t.customData.debugServiceDelay||0;if(l.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;l.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),f.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),console.log("Startup Dependencies for",t.name,t.startupDependencies),console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),u.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),c.default.transmit(`${d.System.Window.getCurrent().name}.onSpawned`,{name:d.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e).on("err",(e=>{l.default.system.error(e)}))}function s(e){const n=d.System.Window.getCurrent();n.isShowing((r=>{r&&!1!==t.customData.showDevConsoleOnVisible?d.System.showDeveloperTools(n.uuid,n.name,null,e):(l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return l.default.system.debug(`${this.name} starting`),new Promise((e=>{a.series([r,n,s,i,o],(()=>{e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",c.default.transmit(v,{serviceName:this.name},{suppressWarnings:!0}),l.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),f.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),l.default.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){l.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(c.default.transmit(b,{waitForMe:!0,name:this.name}),a.each(this.listeners.onShutdown,(function(e,t){a.asyncify(e)(null,t)}),(function(t){t&&l.default.system.error(t),e.shutdownComplete()}))):(c.default.transmit(b,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){l.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),c.default.transmit(_,{name:this.name,uuid:d.System.Application.getCurrent().uuid})}},window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return l.default.error(e.message,`File: ${e.filename}`,`Line: ${e.lineno}`,`Column: ${e.colno}`,`Error Stack: \n ${t}`),!1})),window.addEventListener("unhandledrejection",(e=>{"Cannot Wrap Service Manager or Services"==e.reason?l.default.warn("A service tried To wrap itself. This is a side effect of using Clients in services."):l.default.error("Unhandled rejection","reason",e.reason)}))},33509:(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"},56188:(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}}},95269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=t.killOldApplications=void 0;const r=n(51742),i=n(33509);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}`}},88801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80498:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74215:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89520:(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"},55182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35644:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36611:(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}},55972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91767:(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"},91966:(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 c(...e){return{unionMembers:e}}function l(e,t){return{props:e,additional:t}}function f(e){return{props:[],additional:e}}function d(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),d("Context"))}static contextToJson(e){return JSON.stringify(a(e,d("Context")),null,2)}static toContact(e){return s(JSON.parse(e),d("Contact"))}static contactToJson(e){return JSON.stringify(a(e,d("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),d("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,d("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),d("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,d("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),d("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,d("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),d("Country"))}static countryToJson(e){return JSON.stringify(a(e,d("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),d("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,d("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),d("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,d("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),d("Position"))}static positionToJson(e){return JSON.stringify(a(e,d("Position")),null,2)}};const p={Context:l([{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:l([{json:"contacts",js:"contacts",typ:u(d("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Contact:l([{json:"id",js:"id",typ:d("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),ContactID:l([{json:"email",js:"email",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")}],""),InstrumentList:l([{json:"instruments",js:"instruments",typ:u(d("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Instrument:l([{json:"id",js:"id",typ:d("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),InstrumentID:l([{json:"BBG",js:"BBG",typ:c(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"FIGI",js:"FIGI",typ:c(void 0,"")},{json:"ISIN",js:"ISIN",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")},{json:"RIC",js:"RIC",typ:c(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:c(void 0,"")},{json:"ticker",js:"ticker",typ:c(void 0,"")}],""),Country:l([{json:"id",js:"id",typ:d("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),CountryID:l([{json:"ISOALPHA2",js:"ISOALPHA2",typ:c(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:c(void 0,"")}],""),Organization:l([{json:"id",js:"id",typ:d("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),OrganizationID:l([{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"LEI",js:"LEI",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")}],""),Portfolio:l([{json:"positions",js:"positions",typ:u(d("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Position:l([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:d("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any")}},98832: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(88801),t),i(n(77661),t),i(n(80498),t),i(n(55972),t),i(n(74215),t),i(n(19600),t),i(n(89520),t),i(n(35644),t),i(n(66129),t),i(n(51854),t),i(n(55182),t),i(n(36611),t),i(n(91767),t),i(n(91966),t),i(n(77178),t)},77178:(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"},60306: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"}}')}},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),(()=>{"use strict";var e=r(96755),t=s(r(39319)),n=s(r(43190)),i=s(r(72551)),o=s(r(22708));function s(e){return e&&e.__esModule?e:{default:e}}n.default.initialize(),i.default.start(),i.default.system.log("Starting Search Service");class a extends e.BaseService{constructor(e){e&&void 0!==e||(e={}),e.hasOwnProperty("startupDependencies")||(e.startupDependencies={clients:["distributedStoreClient"]}),e.name="searchService",super(e),this.searchProviders={},this.onBaseServiceReady(this.initialize.bind(this)),this.start()}createRouterEndpoints=()=>{t.default.addResponder("Search.register",((e,t)=>{console.log("Search.register",t),this.register(t.data);const n=e?null:{status:"success"};t.sendQueryResponse(e,n)})),t.default.addResponder("Search.unregister",((e,t)=>{if(console.log("Search.unregister",t),!t)return;this.unregister(t.data);const n=e?null:{status:"success"};t.sendQueryResponse(e,n)})),t.default.addResponder("Search.search",((e,t)=>{this.search(t.data,((e,n)=>{t.sendQueryResponse(e,n)}))}))};initialize=(e=Function.prototype)=>{this.createRouterEndpoints(),e()};register=e=>{console.log("register",e),this.searchProviders[e.channel]=e};unregister=e=>{delete this.searchProviders[e.channel]};search=(e,t)=>{const n=(0,o.default)();let r=0;for(const t in this.searchProviders)r++,this.queryProvider(this.searchProviders[t],n,e);return t(null,{searchId:n,providerCount:r})};queryProvider(e,n,r){t.default.query(`Search.Provider.${e.channel}`,r,((i,o)=>{for(let t=0;t<o.data.length;t++)o.data[t].provider=e.channel;console.log("query",e);const s={provider:{displayName:e.name,channel:e.channel,providerActionTitle:e.providerActionTitle,providerActionCallback:e.providerActionCallback},returnCallback:`${r.windowName}.${e.name}`,searchId:n,data:o.data};t.default.publish(`Search.${r.windowName}`,s)}))}}new a})()})();