@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 assimilationService.js.LICENSE.txt */
2
- (()=>{var e={57664:(e,t,n)=>{"use strict";function i(e,...t){return(...n)=>e(...t,...n)}function r(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>ht,apply:()=>i,applyEach:()=>I,applyEachSeries:()=>N,asyncify:()=>c,auto:()=>M,autoInject:()=>$,cargo:()=>V,cargoQueue:()=>z,compose:()=>K,concat:()=>X,concatLimit:()=>Q,concatSeries:()=>Z,constant:()=>ee,detect:()=>ne,detectLimit:()=>ie,detectSeries:()=>re,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>ce,eachLimit:()=>de,eachOf:()=>T,eachOfLimit:()=>A,eachOfSeries:()=>O,eachSeries:()=>fe,ensureAsync:()=>pe,every:()=>he,everyLimit:()=>me,everySeries:()=>we,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>Ce,forever:()=>_e,groupBy:()=>We,groupByLimit:()=>Ae,groupBySeries:()=>Ee,log:()=>Te,map:()=>L,mapLimit:()=>J,mapSeries:()=>k,mapValues:()=>Ie,mapValuesLimit:()=>Le,mapValuesSeries:()=>Oe,memoize:()=>ke,nextTick:()=>Ne,parallel:()=>Pe,parallelLimit:()=>Me,priorityQueue:()=>Be,queue:()=>Fe,race:()=>$e,reduce:()=>G,reduceRight:()=>He,reflect:()=>Ue,reflectAll:()=>qe,reject:()=>ze,rejectLimit:()=>Ge,rejectSeries:()=>Ye,retry:()=>Je,retryable:()=>Xe,seq:()=>Y,series:()=>Ze,setImmediate:()=>l,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>it,timeout:()=>rt,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>lt,unmemoize:()=>ct,until:()=>ft,waterfall:()=>pt,whilst:()=>dt,all:()=>he,allLimit:()=>me,allSeries:()=>we,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>ie,findSeries:()=>re,flatMap:()=>X,flatMapLimit:()=>Q,flatMapSeries:()=>Z,forEach:()=>ce,forEachSeries:()=>fe,forEachLimit:()=>de,forEachOf:()=>T,forEachOfSeries:()=>O,forEachOfLimit:()=>A,inject:()=>G,foldl:()=>G,foldr:()=>He,select:()=>be,selectLimit:()=>Se,selectSeries:()=>Ce,wrapSync:()=>c,during:()=>dt,doDuring:()=>ae});var o="function"==typeof setImmediate&&setImmediate,s="object"==typeof process&&"function"==typeof process.nextTick;function a(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var l=u(o?setImmediate:s?process.nextTick:a);function c(e){return p(e)?function(...t){const n=t.pop();return d(e.apply(this,t),n)}:r((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return d(i,n);n(null,i)}))}function d(e,t){return e.then((e=>{f(t,null,e)}),(e=>{f(t,e&&e.message?e:new Error(e))}))}function f(e,t,n){try{e(t,n)}catch(e){l((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function h(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?c(e):e}function m(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(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}}function w(e){return function(t,...n){return m((function(i){var r=this;return e(t,((e,t)=>{h(e).apply(r,n.concat(t))}),i)}))}}function g(e,t,n,i){t=t||[];var r=[],o=0,s=h(n);return e(t,((e,t,n)=>{var i=o++;s(e,((e,t)=>{r[i]=t,n(e)}))}),(e=>{i(e,r)}))}function y(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const v={};function b(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function S(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function C(e,t,n,i){let r=!1,o=!1,s=!1,a=0,u=0;function l(){a>=t||s||r||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!r){if(s=!1,t)return r=!0,void(a<=0&&i(null));a++,n(e,u,c),u++,l()}})).catch(d))}function c(e,t){if(a-=1,!o)return e?d(e):!1===e?(r=!0,void(o=!0)):t===v||r&&a<=0?(r=!0,i(null)):void l()}function d(e){o||(s=!1,r=!0,i(e))}l()}var _=e=>(t,n,i)=>{if(i=b(i),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return i(null);if("AsyncGenerator"===t[Symbol.toStringTag])return C(t,e,n,i);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return C(t[Symbol.asyncIterator](),e,n,i);var r=function(e){if(y(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,i,r,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):[],i=-1,r=n.length,function(){var e=n[++i];return i<r?{value:t[e],key:e}:null})}(t),o=!1,s=!1,a=0,u=!1;function l(e,t){if(!s)if(a-=1,e)o=!0,i(e);else if(!1===e)o=!0,s=!0;else{if(t===v||o&&a<=0)return o=!0,i(null);u||c()}}function c(){for(u=!0;a<e&&!o;){var t=r();if(null===t)return o=!0,void(a<=0&&i(null));a+=1,n(t.value,t.key,S(l))}u=!1}c()},A=m((function(e,t,n,i){return _(t)(e,h(n),i)}),4);function W(e,t,n){n=b(n);var i=0,r=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++r!==o&&t!==v||n(null))}for(0===o&&n(null);i<o;i++)t(e[i],i,S(a))}function E(e,t,n){return A(e,1/0,t,n)}var T=m((function(e,t,n){return(y(e)?W:E)(e,h(t),n)}),3),L=m((function(e,t,n){return g(T,e,t,n)}),3),I=w(L),O=m((function(e,t,n){return A(e,1,t,n)}),3),k=m((function(e,t,n){return g(O,e,t,n)}),3),N=w(k);const R=Symbol("promiseCallback");function P(){let e,t;function n(n,...i){if(n)return t(n);e(i.length>1?i:i[0])}return n[R]=new Promise(((n,i)=>{e=n,t=i})),n}function M(e,t,n){"number"!=typeof t&&(n=t,t=null),n=b(n||P());var i=Object.keys(e).length;if(!i)return n(null);t||(t=i);var r={},o=0,s=!1,a=!1,u=Object.create(null),l=[],c=[],d={};function f(e,t){l.push((()=>function(e,t){if(!a){var i=S(((t,...i)=>{if(o--,!1!==t)if(i.length<2&&([i]=i),t){var l={};if(Object.keys(r).forEach((e=>{l[e]=r[e]})),l[e]=i,a=!0,u=Object.create(null),s)return;n(t,l)}else r[e]=i,(u[e]||[]).forEach((e=>e())),p();else s=!0}));o++;var l=h(t[t.length-1]);t.length>1?l(r,i):l(i)}}(e,t)))}function p(){if(!s){if(0===l.length&&0===o)return n(null,r);for(;l.length&&o<t;)l.shift()()}}function m(t){var n=[];return Object.keys(e).forEach((i=>{const r=e[i];Array.isArray(r)&&r.indexOf(t)>=0&&n.push(i)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return f(t,[n]),void c.push(t);var i=n.slice(0,n.length-1),r=i.length;if(0===r)return f(t,n),void c.push(t);d[t]=r,i.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+i.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--r&&f(t,n)}))}))})),function(){for(var e=0;c.length;)e++,m(c.pop()).forEach((e=>{0==--d[e]&&c.push(e)}));if(e!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),p(),n[R]}var F=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,D=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,x=/,/,j=/(=.+)?(\s*)$/,B=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function $(e,t){var n={};return Object.keys(e).forEach((t=>{var i,r=e[t],o=p(r),s=!o&&1===r.length||o&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(i.length>0?a:r);else if(s)n[t]=r;else{if(i=function(e){const t=e.toString().replace(B,"");let n=t.match(F);if(n||(n=t.match(D)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,i]=n;return i.replace(/\s/g,"").split(x).map((e=>e.replace(j,"").trim()))}(r),0===r.length&&!o&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");o||i.pop(),n[t]=i.concat(a)}function a(e,t){var n=i.map((t=>e[t]));n.push(t),h(r)(...n)}})),M(n,t)}class H{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 q(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var i=h(e),r=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var c=!1;function d(e,t,n,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var r,o;function s(e,...t){return e?n?o(e):r():t.length<=1?r(t[0]):void r(t)}g.started=!0;var a={data:e,callback:n?s:i||s};if(t?g._tasks.unshift(a):g._tasks.push(a),c||(c=!0,l((()=>{c=!1,g.process()}))),n||!i)return new Promise(((e,t)=>{r=e,o=t}))}function f(e){return function(t,...n){r-=1;for(var i=0,s=e.length;i<s;i++){var a=e[i],l=o.indexOf(a);0===l?o.shift():l>0&&o.splice(l,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}r<=g.concurrency-g.buffer&&u("unsaturated"),g.idle()&&u("drain"),g.process()}}function p(e){return!(0!==e.length||!g.idle()||(l((()=>u("drain"))),0))}const m=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,i){const r=(...i)=>{a(e,r),((e,i)=>{if(e)return n(e);t(i)})(...i)};s[e].push(r)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var w=!1,g={_tasks:new H,*[Symbol.iterator](){yield*g._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!1,t)))}return d(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!0,t)))}return d(e,!1,!0,t)},kill(){a(),g._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!1,t)))}return d(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!0,t)))}return d(e,!0,!0,t)},remove(e){g._tasks.remove(e)},process(){if(!w){for(w=!0;!g.paused&&r<g.concurrency&&g._tasks.length;){var e=[],t=[],n=g._tasks.length;g.payload&&(n=Math.min(n,g.payload));for(var s=0;s<n;s++){var a=g._tasks.shift();e.push(a),o.push(a),t.push(a.data)}r+=1,0===g._tasks.length&&u("empty"),r===g.concurrency&&u("saturated");var l=S(f(e));i(t,l)}w=!1}},length:()=>g._tasks.length,running:()=>r,workersList:()=>o,idle:()=>g._tasks.length+r===0,pause(){g.paused=!0},resume(){!1!==g.paused&&(g.paused=!1,l(g.process))}};return Object.defineProperties(g,{saturated:{writable:!1,value:m("saturated")},unsaturated:{writable:!1,value:m("unsaturated")},empty:{writable:!1,value:m("empty")},drain:{writable:!1,value:m("drain")},error:{writable:!1,value:m("error")}}),g}function V(e,t){return q(e,1,t)}function z(e,t,n){return q(e,t,n)}var G=m((function(e,t,n,i){i=b(i);var r=h(n);return O(e,((e,n,i)=>{r(t,e,((e,n)=>{t=n,i(e)}))}),(e=>i(e,t)))}),4);function Y(...e){var t=e.map(h);return function(...e){var n=this,i=e[e.length-1];return"function"==typeof i?e.pop():i=P(),G(t,e,((e,t,i)=>{t.apply(n,e.concat(((e,...t)=>{i(e,t)})))}),((e,t)=>i(e,...t))),i[R]}}function K(...e){return Y(...e.reverse())}var J=m((function(e,t,n,i){return g(_(t),e,n,i)}),4),Q=m((function(e,t,n,i){var r=h(n);return J(e,t,((e,t)=>{r(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],r=0;r<t.length;r++)t[r]&&(n=n.concat(...t[r]));return i(e,n)}))}),4),X=m((function(e,t,n){return Q(e,1/0,t,n)}),3),Z=m((function(e,t,n){return Q(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,i,r,o)=>{var s,a=!1;const u=h(r);n(i,((n,i,r)=>{u(n,((i,o)=>i||!1===i?r(i):e(o)&&!s?(a=!0,s=t(!0,n),r(null,v)):void r()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=m((function(e,t,n){return te((e=>e),((e,t)=>t))(T,e,t,n)}),3),ie=m((function(e,t,n,i){return te((e=>e),((e,t)=>t))(_(t),e,n,i)}),4),re=m((function(e,t,n){return te((e=>e),((e,t)=>t))(_(1),e,t,n)}),3);function oe(e){return(t,...n)=>h(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=m((function(e,t,n){n=S(n);var i,r=h(e),o=h(t);function s(e,...t){if(e)return n(e);!1!==e&&(i=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...i):void 0}return a(null,!0)}),3);function ue(e,t,n){const i=h(t);return ae(e,((...e)=>{const t=e.pop();i(...e,((e,n)=>t(e,!n)))}),n)}function le(e){return(t,n,i)=>e(t,i)}var ce=m((function(e,t,n){return T(e,le(h(t)),n)}),3),de=m((function(e,t,n,i){return _(t)(e,le(h(n)),i)}),4),fe=m((function(e,t,n){return de(e,1,t,n)}),3);function pe(e){return p(e)?e:function(...t){var n=t.pop(),i=!0;t.push(((...e)=>{i?l((()=>n(...e))):n(...e)})),e.apply(this,t),i=!1}}var he=m((function(e,t,n){return te((e=>!e),(e=>!e))(T,e,t,n)}),3),me=m((function(e,t,n,i){return te((e=>!e),(e=>!e))(_(t),e,n,i)}),4),we=m((function(e,t,n){return te((e=>!e),(e=>!e))(O,e,t,n)}),3);function ge(e,t,n,i){var r=new Array(t.length);e(t,((e,t,i)=>{n(e,((e,n)=>{r[t]=!!n,i(e)}))}),(e=>{if(e)return i(e);for(var n=[],o=0;o<t.length;o++)r[o]&&n.push(t[o]);i(null,n)}))}function ye(e,t,n,i){var r=[];e(t,((e,t,i)=>{n(e,((n,o)=>{if(n)return i(n);o&&r.push({index:t,value:e}),i(n)}))}),(e=>{if(e)return i(e);i(null,r.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function ve(e,t,n,i){return(y(t)?ge:ye)(e,t,h(n),i)}var be=m((function(e,t,n){return ve(T,e,t,n)}),3),Se=m((function(e,t,n,i){return ve(_(t),e,n,i)}),4),Ce=m((function(e,t,n){return ve(O,e,t,n)}),3),_e=m((function(e,t){var n=S(t),i=h(pe(e));return function e(t){if(t)return n(t);!1!==t&&i(e)}()}),2),Ae=m((function(e,t,n,i){var r=h(n);return J(e,t,((e,t)=>{r(e,((n,i)=>n?t(n):t(n,{key:i,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:r}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];r.call(n,s)?n[s].push(a):n[s]=[a]}return i(e,n)}))}),4);function We(e,t,n){return Ae(e,1/0,t,n)}function Ee(e,t,n){return Ae(e,1,t,n)}var Te=oe("log"),Le=m((function(e,t,n,i){i=b(i);var r={},o=h(n);return _(t)(e,((e,t,n)=>{o(e,t,((e,i)=>{if(e)return n(e);r[t]=i,n(e)}))}),(e=>i(e,r)))}),4);function Ie(e,t,n){return Le(e,1/0,t,n)}function Oe(e,t,n){return Le(e,1,t,n)}function ke(e,t=(e=>e)){var n=Object.create(null),i=Object.create(null),o=h(e),s=r(((e,r)=>{var s=t(...e);s in n?l((()=>r(null,...n[s]))):s in i?i[s].push(r):(i[s]=[r],o(...e,((e,...t)=>{e||(n[s]=t);var r=i[s];delete i[s];for(var o=0,a=r.length;o<a;o++)r[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Ne=u(s?process.nextTick:o?setImmediate:a),Re=m(((e,t,n)=>{var i=y(t)?[]:{};e(t,((e,t,n)=>{h(e)(((e,...r)=>{r.length<2&&([r]=r),i[t]=r,n(e)}))}),(e=>n(e,i)))}),3);function Pe(e,t){return Re(T,e,t)}function Me(e,t,n){return Re(_(t),e,n)}function Fe(e,t){var n=h(e);return q(((e,t)=>{n(e[0],t)}),t,1)}class De{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&&je(this.heap[e],this.heap[t=xe(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&&je(this.heap[t+1],this.heap[t])&&(t+=1),!je(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=xe(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function xe(e){return(e+1>>1)-1}function je(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=Fe(e,t);return n._tasks=new De,n.push=function(e,t=0,i=(()=>{})){if("function"!=typeof i)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return l((()=>n.drain()));for(var r=0,o=e.length;r<o;r++){var s={data:e[r],priority:t,callback:i};n._tasks.push(s)}l(n.process)},delete n.unshift,n}var $e=m((function(e,t){if(t=b(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,i=e.length;n<i;n++)h(e[n])(t)}),2);function He(e,t,n,i){var r=[...e].reverse();return G(r,t,n,i)}function Ue(e){var t=h(e);return r((function(e,n){return e.push(((e,...t)=>{let i={};if(e&&(i.error=e),t.length>0){var r=t;t.length<=1&&([r]=t),i.value=r}n(null,i)})),t.apply(this,e)}))}function qe(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 Ve(e,t,n,i){const r=h(n);return ve(e,t,((e,t)=>{r(e,((e,n)=>{t(e,!n)}))}),i)}var ze=m((function(e,t,n){return Ve(T,e,t,n)}),3),Ge=m((function(e,t,n,i){return Ve(_(t),e,n,i)}),4),Ye=m((function(e,t,n){return Ve(O,e,t,n)}),3);function Ke(e){return function(){return e}}function Je(e,t,n){var i={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(n=t||P(),t=e):(Qe(i,e),n=n||P()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=h(t),o=1;function s(){r(((e,...t)=>{!1!==e&&(e&&o++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(s,i.intervalFunc(o-1)):n(e,...t))}))}return s(),n[R]}function Qe(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+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 Xe(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;p(t)&&(n+=1);var i=h(t);return r(((t,r)=>{function o(e){i(...t,e)}return(t.length<n-1||null==r)&&(t.push(r),r=P()),e?Je(e,o,r):Je(o,r),r[R]}))}function Ze(e,t){return Re(O,e,t)}var et=m((function(e,t,n){return te(Boolean,(e=>e))(T,e,t,n)}),3),tt=m((function(e,t,n,i){return te(Boolean,(e=>e))(_(t),e,n,i)}),4),nt=m((function(e,t,n){return te(Boolean,(e=>e))(O,e,t,n)}),3),it=m((function(e,t,n){var i=h(t);return L(e,((e,t)=>{i(e,((n,i)=>{if(n)return t(n);t(n,{value:e,criteria:i})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(r).map((e=>e.value)))}));function r(e,t){var n=e.criteria,i=t.criteria;return n<i?-1:n>i?1:0}}),3);function rt(e,t,n){var i=h(e);return r(((r,o)=>{var s,a=!1;r.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",i=new Error('Callback function "'+t+'" timed out.');i.code="ETIMEDOUT",n&&(i.info=n),a=!0,o(i)}),t),i(...r)}))}function ot(e,t,n,i){var r=h(n);return J(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,r,i)}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,i){arguments.length<=3&&"function"==typeof t&&(i=n,n=t,t=Array.isArray(e)?[]:{}),i=b(i||P());var r=h(n);return T(e,((e,n,i)=>{r(t,e,n,i)}),(e=>i(e,t))),i[R]}var lt=m((function(e,t){var n,i=null;return fe(e,((e,t)=>{h(e)(((e,...r)=>{if(!1===e)return t(e);r.length<2?[n]=r:n=r,i=e,t(e?null:{})}))}),(()=>t(i,n)))}));function ct(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=m((function(e,t,n){n=S(n);var i=h(t),r=h(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&r(a)}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...o):void 0}return r(a)}),3);function ft(e,t,n){const i=h(e);return dt((e=>i(((t,n)=>e(t,!n)))),t,n)}var pt=m((function(e,t){if(t=b(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function i(t){h(e[n++])(...t,S(r))}function r(r,...o){if(!1!==r)return r||n===e.length?t(r,...o):void i(o)}i([])}));const ht={apply:i,applyEach:I,applyEachSeries:N,asyncify:c,auto:M,autoInject:$,cargo:V,cargoQueue:z,compose:K,concat:X,concatLimit:Q,concatSeries:Z,constant:ee,detect:ne,detectLimit:ie,detectSeries:re,dir:se,doUntil:ue,doWhilst:ae,each:ce,eachLimit:de,eachOf:T,eachOfLimit:A,eachOfSeries:O,eachSeries:fe,ensureAsync:pe,every:he,everyLimit:me,everySeries:we,filter:be,filterLimit:Se,filterSeries:Ce,forever:_e,groupBy:We,groupByLimit:Ae,groupBySeries:Ee,log:Te,map:L,mapLimit:J,mapSeries:k,mapValues:Ie,mapValuesLimit:Le,mapValuesSeries:Oe,memoize:ke,nextTick:Ne,parallel:Pe,parallelLimit:Me,priorityQueue:Be,queue:Fe,race:$e,reduce:G,reduceRight:He,reflect:Ue,reflectAll:qe,reject:ze,rejectLimit:Ge,rejectSeries:Ye,retry:Je,retryable:Xe,seq:Y,series:Ze,setImmediate:l,some:et,someLimit:tt,someSeries:nt,sortBy:it,timeout:rt,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:lt,unmemoize:ct,until:ft,waterfall:pt,whilst:dt,all:he,allLimit:me,allSeries:we,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:ie,findSeries:re,flatMap:X,flatMapLimit:Q,flatMapSeries:Z,forEach:ce,forEachSeries:fe,forEachLimit:de,forEachOf:T,forEachOfSeries:O,forEachOfLimit:A,inject:G,foldl:G,foldr:He,select:be,selectLimit:Se,selectSeries:Ce,wrapSync:c,during:dt,doDuring:ae}},33998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var i=s(n(72551)),r=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,r=0,o=!0;function s(e){const t=e.split(/[/\\:?=&\s]/);for(let n=0;n<t.length;n++)if("$"===t[n][0]){const r=t[n].substring(1);let s=a(r);if(void 0!==s){const a=e.replace(t[n],s);i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveString configString",t[n],r,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&&i.default.system.warn("ConfigUtil.resolveString",`Missing [${t}] variable from finsemble.custom configuration object`)):i.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){i.default.system.verbose("forceObjectsToLogger","resolveArray","pass",t,"recursionLevel",n,"configArray:",e);for(let i=0;i<e.length;i++){const r=e[i];"string"==typeof r&&r.indexOf("$")>-1?e[i]=s(r):r instanceof Array?u(r,t,n+1):"object"==typeof r&&l(r,t,n+1)}}function l(e,t,n){e=e||{},i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveObject","pass",t,"recursionLevel",n,"configObject:",e),Object.keys(e).forEach((i=>{const r=e[i];"string"==typeof r&&r.indexOf("$")>-1?e[i]=s(r):r instanceof Array?u(r,t,n+1):"object"==typeof r&&l(r,t,n+1)}))}for(;o&&r++<100;)o=!1,l(t,++n,1);r>=100&&i.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){i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getRawManifest",s,a),s.getManifest((n=>{i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",n),e.resolveConfigVariables(n.finsemble,n.finsemble),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",n),t(n)}),(e=>{e&&(i.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e),n&&n()),s.getParentUuid((e=>{const n=r.System.Application.wrap(e);i.default.system.debug("forceObjectsToLogger","uuid",e,"parentApplication",n),a<10?o(t,n,++a):t("could not find manifest in parent applications")}))}))}i.default.system.debug("ConfigUtil.getExpandedRawManifest starting"),r.System.ready((()=>{const e=r.System.Application.getCurrent();o(t,e,1)}))},this.readConfigFile=function(e,t){i.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){r.System.ready((()=>{r.System.Application.getCurrent().getManifest((n=>{n.finsemble=n.finsemble||{},e.resolveConfigVariables(n.finsemble,n.finsemble),n.finsemble.applicationRoot||i.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const r=`${n.finsemble.moduleRoot}/configs/core/config.json`;e.readConfigFile(r,((o,s)=>{o?i.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${n.finsemble.moduleRoot}; Full Path=${r}`,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),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",n)),t(n)}))}))}))},this.promptAndSaveJSONToLocalFile=function(e,t){i.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),r=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",r),s.setAttribute("download",o),s.click()},this.configFormatForExport=function(e,t){i.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 i=n;if(e){try{const n=t.split(".");let r=e;for(let e=1;e<n.length;e++)r=r[n[e]];i=r}catch(e){i=n}void 0===i&&(i=n)}return i},this.getFile=async function(e,t=Function.prototype){i.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},93802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(5939),r=u(n(72551)),o=u(n(88021)),s=u(n(71879)),a=n(24232);function u(e){return e&&e.__esModule?e:{default:e}}let l;class c extends i.EventEmitter{constructor(e,t,n){if(super(),!n||!n.System)throw new Error("Monitors class requires dependency injection. Ensure that System is being passed in.");({System:l}=n),this.cachedMonitorInfo=null,this.limitedMonitorRefreshQueue=new o.default({concurrency:1}),this.bindAllFunctions(),this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(e))),l.addEventListener("monitor-info-changed",(()=>{this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))})),l.addEventListener("session-changed",(e=>{e&&("object"!=typeof e||!e.hasOwnProperty("reason")||"unlock"!==e.reason&&"remote-connect"!==e.reason&&"unknown"!==e.reason)||this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))}))}bindAllFunctions(){let e=this;for(let t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){let n=e[t];n instanceof Function&&n!==c&&(e[t]=e[t].bind(e))}}asyncIt(e,t){return t(e),e}rationalizeMonitor(e){e.monitorRect.width=e.monitorRect.right-e.monitorRect.left,e.monitorRect.height=e.monitorRect.bottom-e.monitorRect.top,e.availableRect.width=e.availableRect.right-e.availableRect.left,e.availableRect.height=e.availableRect.bottom-e.availableRect.top}calculateMonitorScale(e,t){return(t.right-t.left)/(e.right-e.left)}monitorInfoIsChanged(e,t){if(!e||!t)return!0;if(e.nonPrimaryMonitors.length!==t.nonPrimaryMonitors.length)return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.availableRect,t.primaryMonitor.availableRect))return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.monitorRect,t.primaryMonitor.monitorRect))return!0;e.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0)),t.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0));let n=!1;return e.nonPrimaryMonitors.forEach(((e,i)=>{const r=t.nonPrimaryMonitors[i];(0,a.checkIfBoundsAreEqual)(e.availableRect,r.availableRect)&&(0,a.checkIfBoundsAreEqual)(e.monitorRect,r.monitorRect)||(n=!0)})),n}async refreshMonitors(e=Function.prototype){this.limitedMonitorRefreshQueue.clear();const t=await l.getMonitorInfo();if(!this.monitorInfoIsChanged(this.cachedMonitorInfo,t))return r.default.system.info("Skipped refreshMonitors because monitors do not change."),e(this.allMonitors);this.allMonitors=[];let{primaryMonitor:n}=t;if(Object.entries(n).length){n.whichMonitor="primary",n.position=0,this.allMonitors.push(Object.assign({},n));for(let e=0;e<t.nonPrimaryMonitors.length;e++){let n=t.nonPrimaryMonitors[e];n.whichMonitor=e,n.position=e+1,this.allMonitors.push(n)}for(let e=0;e<this.allMonitors.length;e++){let t=this.allMonitors[e];this.rationalizeMonitor(t)}this.cachedMonitorInfo=(0,s.default)(t),e(this.allMonitors),this.ready=!0,1===this.limitedMonitorRefreshQueue.pending&&this.emit("monitors-changed",{monitors:this.allMonitors})}else r.default.system.info("There is no primary monitor in 'monitorInfo' - the system is still in the process of updating the monitor information. Returning from monitorsAndScaling -> refreshMonitors")}getAllMonitors(e=Function.prototype){return this.ready?this.asyncIt(JSON.parse(JSON.stringify(this.allMonitors)),e):e?void this.refreshMonitors(e):"not ready"}getMonitorFromScaledXY(e,t,n=Function.prototype){return new Promise((i=>{if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromScaledXY(e,t,n)})),"not ready";let r=null;for(var o=this.allMonitors,s=0;s<o.length;s++){var a=o[s],{monitorRect:u}=a;if(e>=u.left&&e<u.right&&t>=u.top&&t<u.bottom){r=a;break}}i(r),n(r)}))}getMonitorFromUnscaledXY(e,t,n=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromUnscaledXY(e,t,n)})),"not ready";for(var i=this.allMonitors,r=0;r<i.length;r++){var o=i[r],s=o.monitor.scaledRect;if(e>=s.left&&e<s.right&&t>=s.top&&t<s.bottom)return this.asyncIt(o,n)}return this.asyncIt(null,n)}async translatePointFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointFromScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var{monitor:i}=e;i||(i=(await this.getMonitorFromScaledXY(n.x,n.y)).data);let r=null;if(i){var o=n.x-i.monitorRect.left,s=n.y-i.monitorRect.top,a=o*i.deviceScaleFactor,u=s*i.deviceScaleFactor;r={x:a+i.monitor.scaledRect.left,y:u+i.monitor.scaledRect.top}}return t(r),Promise.resolve(r)}translatePointToScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointToScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var i=e.monitor||this.getMonitorFromUnscaledXY(n.x,n.y);if(!i)return this.asyncIt(null,t);var r=n.x-i.monitor.scaledRect.left,o=n.y-i.monitor.scaledRect.top,s=r/i.deviceScaleFactor,a=o/i.deviceScaleFactor,u={x:s+i.monitorRect.left,y:a+i.monitorRect.top};return this.asyncIt(u,t)}async translateRectToScaled(e,t=Function.prototype){let n;if(!this.ready)return this.refreshMonitors((()=>{this.translateRectToScaled(e,t)})),"not ready";var i=this.translatePointToScaled({x:e.left,y:e.top}),r=this.translatePointToScaled({x:e.right,y:e.bottom});return!i&&r&&(n=await this.getMonitorFromScaledXY(r),i=this.translatePointToScaled({monitor:n,point:{x:e.left,y:e.top}})),!r&&i&&(n=await this.getMonitorFromScaledXY(r),r=this.translatePointToScaled({monitor:n,point:{x:e.right,y:e.bottom}})),this.asyncIt({top:i?i.y:null,left:i?i.x:null,bottom:r?r.y:null,right:r?r.x:null,height:i&&r?r.y-i.y:null,width:i&&r?r.x-i.x:null},t)}translateRectFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translateRectFromScaled(e,t)})),"not ready";var n=this.translatePointFromScaled({x:e.left,y:e.top}),i=this.translatePointFromScaled({x:e.right,y:e.bottom});return!n&&i&&(n=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(i),point:{x:e.left,y:e.top}})),!i&&n&&(i=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(n),point:{x:e.right,y:e.bottom}})),this.asyncIt({top:n?n.y:null,left:n?n.x:null,bottom:i?i.y:null,right:i?i.x:null,height:n&&i?i.y-n.y:null,width:n&&i?i.x-n.x:null},t)}}var d=c;t.default=d},19886:(e,t)=>{"use strict";function i(e,t){const n=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<n.length;++t){const i=n[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(i in e))return null;e=e[i]}return e}function r(e,t){const n=[];for(const i in e){const r=`${t}.`;i.includes(r)&&(n.push(i),delete e[i])}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.byString=i,t.initObject=function e(t,i,r){let o;if(i||(i=null),"object"!=typeof t)return o=i?`${i}.${n}`:n,void(r[o]=i);for(const n in t)"object"==typeof t[n]&&"undefined"!==t[n]?(o=i?`${i}.${n}`:n,r[o]=i,e(t[n],o,r)):(o=i?`${i}.${n}`:n,r[o]=i)},t.mapField=function e(t,n,r){if(r[n])return;const o=(n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),s=n;if(!r.hasOwnProperty(s)){let e=null;o.length>1&&(o.pop(),e=o.join(".")),r[s]=e}const a=i(t,s);if("undefined"!==a&&"object"==typeof a)for(const n in a)e(t,`${s}.${n}`,r)},t.checkForObjectChange=function(e,t,n){const o=i(e,t);return null!==o&&("object"==typeof o||"object"!=typeof o&&"object"==typeof t?r(n,t):null)},t.setPath=void 0,t.setPath=(e,t,n)=>t.split(".").reduce(((e,i)=>e[i]=t.split(".").pop()===i?n:e[i]||{}),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 i=a(n(72551)),r=n(33998),o=n(51742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var l=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(70010).default),u.getValue({field:"finsemble"},((t,n)=>{a=r.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(a)})))},this.alert=function(e,t,n,i,r){const o=this;r&&r.url?this.alertInternal(e,t,n,i,r,r.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,i,r,s)}))},this.alertInternal=function(n,r,a,u,l,c){let d=!1;const f=`UserNotification.alert.${a}`,p=(l=l||{}).duration||864e5;switch(r){case"ONCE-SINCE-STARTUP":f in e?d=!1:(d=!0,e[f]=!0);break;case"MAX-COUNT":{let e=0;const n=l.maxCount||1;f in t&&(e=t[f]),t[f]=++e,e<=n&&(d=!0);break}default:d=!0}if(i.default.log("UserNotification.alert",n,d,r,a,u,l),d){const e={url:c,message:u,timeout:p};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=l},13712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(21014))&&i.__esModule?i:{default:i},o=new function(){function e(e,t,n){const i=function(){try{throw Error("")}catch(e){return e}}(),r=i.stack.split("\n")[5],o=r.indexOf("at "),s=r.slice(o+2,r.length),a=i.stack.split("\n")[6],u=a.indexOf("at "),l=a.slice(u+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${l}`)}this.args=function(){let t=!0;if(r.default.validationEnabled()){const n=arguments.length;if((n+1)%2!=0)for(let i=0;i<n;i+=2){let n=!1;const r=arguments[i];let o=arguments[i+1];if("="===o.slice(-1)&&(o=o.slice(0,-1),n=!0),typeof r!==o&&!(n&&void 0===r||void 0!==r&&"any"===o)){e(i/2+1,r,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(r.default.validationEnabled()){const n=arguments.length;if((n+1)%3!=0)for(let i=0;i<n;i+=3){let n=!1;const r=arguments[i],o=arguments[i+1];let s=arguments[i+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(r,o,s),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t}};t.default=o},15828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=d(n(22708)),r=d(n(80089)),o=d(n(32407)),s=d(n(39319)),a=d(n(9562)),u=n(51742),l=d(n(72551)),c=n(78379);function d(e){return e&&e.__esModule?e:{default:e}}const{REMOTE_FOCUS:f}=c.WINDOW_SERVICE_REQUESTS;a.default.initialize();const p=e=>(0,r.default)(e,"window.descriptor.isWPF",(0,r.default)(e,"descriptor.isWPF"));class h extends o.default{constructor(e,t){super(),this.port=e.port,this.manifest=e,this.assimilationWindowManager=t,this.setupListeners(),this.keyboard={}}setupListeners(){this.addListener("startMove",this.onWindowStartMove.bind(this)),this.addListener("moveUpdate",this.onWindowMoveUpdate.bind(this)),this.addListener("moveEnd",this.onMoveEnd.bind(this)),this.addListener("windowClicked",this.onWindowClicked.bind(this)),this.addListener("locationResponse",this.onLocationResponse.bind(this)),this.addListener("addWindow",this.onAddWindow.bind(this)),this.addListener("removeWindow",this.onRemoveWindow.bind(this)),this.addListener("applicationList",this.onApplicationList.bind(this)),this.addListener("keyDown",this.onKeyDown.bind(this)),this.addListener("keyUp",this.onKeyUp.bind(this)),this.addListener("focus",this.onWindowFocused.bind(this)),this.addListener("maximize",this.onWindowMaximize.bind(this)),this.addListener("restore",this.onWindowRestore.bind(this)),this.addListener("minimize",this.onWindowMinimize.bind(this)),this.addListener("windowInfo",this.onWindowInfo.bind(this)),this.addListener("openNewApp",this.onNewApp.bind(this)),this.addListener("openAssetApp",this.onNewApp.bind(this)),this.addListener("socketError",this.onSocketError.bind(this)),this.addListener("socketClosed",this.onSocketClosed.bind(this)),this.addListener("socketOpen",this.onSocketOpened.bind(this)),this.addListener("closeWindow",this.onCloseWindow.bind(this)),this.addListener("getBounds",this.onGetBoundsReturned.bind(this)),this.addListener("hookWindow",this.onWindowHooked.bind(this)),this.addListener("onLog",this.onLog.bind(this))}onGetBoundsReturned(e){l.default.system.verbose("APPLICATION LIFECYCLE:Assimilation:onGetBoundsReturned",e.ref,e),s.default.transmit(`${e.ref}-Assimilation.boundsUpdate`,e)}onWindowHooked(e){const t=this.assimilationWindowManager.getWindowByUUID(e.uuid);t&&t.descriptor&&t.descriptor.alwaysOnTop&&this.assimilationWindowManager.alwaysOnTop({data:{alwaysonTop:t.descriptor.alwaysOnTop,key:e.uuid}})}onLog(e){let{type:t,content:n}=e;"function"==typeof l.default.system[t]?l.default.system[t](`Assimilation EXE: ${n}`):l.default.system.warn(`Assimilation unable to log type ${t} from EXE. Defaulting to warn: ${n}`)}onNewApp(e){if(l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:openNewApp",e),e.error&&!e.error.startsWith("The operation completed successfully"))return l.default.system.error(e.error);try{const t=JSON.parse(e.window),n=this.assimilationWindowManager.updateSpawningWindow(e.ref,t.uuid);this.assimilationWindowManager.handleSpawnComplete(n,t)}catch(e){l.default.system.error("No Window found. Either the executable path is wrong or it has no window")}}onCloseWindow(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:closeWindow",e)}onWindowStartMove(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowStartMove",e),e.uuid?this.assimilationWindowManager.setMovingWindow(this.assimilationWindowManager.getWindowByUUID(e.uuid)).setStartBounds(e):l.default.system.error("window is missing uuid",e)}onWindowMoveUpdate(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMoveUpdate",e);const t=this.assimilationWindowManager.getMovingWindow();t.calculateWindowLocation(e),s.default.transmit(`AssimilationService.bounds-change-request.${t.window.name}`,{...t.location})}onWindowMaximize(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMaximize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&n.maximize({fromAssimilation:!0})}onWindowMinimize(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMinimize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.cachedLocation=n.location,n.minimize({fromAssimilation:!0}))}onWindowRestore(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowRestore",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.state="restore",Date.now()-n.lastMinimized<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.restore({fromAssimilation:!0}))}onWindowFocused(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowFocused",e);const t=JSON.parse(e.data),n=this.assimilationWindowManager.getWindowByUUID(t.uuid),i={name:n&&n.name||t.name,windowHandle:t.uuid};s.default.transmit(f,i),n&&setTimeout((()=>{"minimize"!==n.state&&(Date.now()-n.lastRestored<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.focus({fromAssimilation:!0}))}),this.assimilationWindowManager.assimilationHelper.manifest.focusDelay)}onRemoveWindow(e){const t=JSON.parse(e.window);this.assimilationWindowManager.removeWindow(t.uuid,!0)}onWindowClicked(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked",e);const t=JSON.parse(e.data);this.onWindowFocused(e);const n=this.assimilationWindowManager.getWindowByUUID(t.uuid);if(n&&!p(n)){if(this.keyboard[162]){const e=n.parentWindow?n.parentWindow.windowName:n.windowName;s.default.query("DockingService.getGroupObjectsForWindow",{name:e},((t,n)=>{let i=!1;for(let e=0;e<n.data.length;e++)if(n.data[e].isMovable){i=!0;break}return i?s.default.query("DockingService.leaveGroup",{name:e},(()=>{})):s.default.transmit("DockingService.formGroup",{windowName:e})}))}}else l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked no window found for window UUID",t.uuid)}onApplicationList(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onApplicationList",e),this.assimilationWindowManager.parseApplicationList(e.list)}onLocationResponse(e){if(!e.window)return;const t=JSON.parse(e.window),n=this.assimilationWindowManager.getWindowByUUID(t.uuid);n&&s.default.transmit("DockingService.updateWindowLocation",{windowName:n.windowName,location:{left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top}})}onAddWindow(e){const t=JSON.parse(e.window);t.uuid&&this.assimilationWindowManager.addNativeWindow(t)}onWindowInfo(){l.default.system.warn("This function does nothing.")}onMoveEnd(e){l.default.system.info("moveEnd",e);const t=this.assimilationWindowManager.getMovingWindow();if(t){if(this.keyboard[162]&&!p(t)){if(t.window.grouped)return s.default.query("DockingService.leaveGroup",{name:t.window.windowName},(()=>{}));s.default.transmit("DockingService.formGroup",{windowName:t.window.windowName})}e.location=t.window.location,s.default.transmit(`${t.window.name}.endMovement`,e),this.assimilationWindowManager.saveWindow({data:{key:t.window.uuid,location:t.window.location}})}}onKeyUp(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onKeyUp",e),e.key=Number(e.key),clearTimeout(this.keyboard[e.key]),delete this.keyboard[e.key],s.default.publish("humanInterface.keyup",{key:e.key}),160===e.key&&(self.shift=!1),s.default.transmit("finsemble.assimilation.keyup",{key:e.key})}onKeyDown(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onKeyDown",e),e.key=Number(e.key),this.keyboard[e.key]&&clearTimeout(this.keyboard[e.key]),this.keyboard[e.key]=setTimeout((()=>this.onKeyUp(e)),this.manifest.hotkeyTimeout),s.default.publish("humanInterface.keydown",{key:e.key}),160===e.key&&(self.shift=!0),s.default.transmit("finsemble.assimilation.keydown",{key:e.key})}onSocketConnected(e=Function.prototype){this.enableAppHooks(),this.getMonitorInfo(),this.connectCallback&&(this.connectCallback(),this.connectCallback=null),e()}onSocketError(e){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketError",e);var t=setTimeout((()=>{clearTimeout(t),this.connect()}),5e3)}onSocketClosed(){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketClosed"),this.connect()}onSocketOpened(){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketOpened"),clearTimeout(this.wsConnectionFailureTimeout),this.wsConnectionFailureTimeout=null,this.onSocketConnected()}setThrottle(e){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:enable move throttle",e),this.send(this.prepareAction({topic:"throttle",throttle:e}))}enableAppHooks(){l.default.system.info("APPLICATION LIFECYCLE:Assimilation:Enable Assimilation hooks"),this.send(this.prepareAction({topic:"enableHooks",data:{whitelist:[],blacklist:[]}}))}connect(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:connect to websocket"),e&&(this.connectCallback=e),this.ws&&this.ws.readyState<2||(this.wsConnectionFailureTimeout||(this.wsConnectionFailureTimeout=setTimeout((()=>{console.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds"),l.default.system.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds")}),7500)),super.connect())}prepareAction(e){const t=(0,i.default)();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}getMonitorInfo(){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:getMonitorInfo"),u.System.getMonitorInfo((e=>{this.send(JSON.stringify({topic:"monitorInfo",data:e}))}))}setMonitorInfo(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:setMonitorInfo"),this.send(JSON.stringify({topic:"monitorInfo",data:e}))}getApplicationList(){this.send(this.prepareAction({topic:"applicationList"}))}}t.default=h},32407:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=n(5939),o=(i=n(72551))&&i.__esModule?i:{default:i};class s extends r.EventEmitter{constructor(e){super(),this.ws=null,this.port=e||8392,this.wsConnectionFailureTimeout=null}connect(){if(this.ws&&(0===this.ws.readyState||1===this.ws.readyState))return;if(this.ws&&2===this.ws.readyState){const e=setTimeout((()=>{clearTimeout(e),this.connect()}),1e3);return}o.default.system.debug("Assimilation connecting to :",`ws://127.0.0.1:${this.port}`);const e=this.ws=new WebSocket(`ws://127.0.0.1:${this.port}`);e.onopen=()=>{o.default.system.debug("Assimilation connected to socket"),this.emit("socketOpen")},e.onerror=e=>{this.emit("socketError",e)},e.onmessage=e=>{let t;try{if(t=JSON.parse(e.data),!t.topic)return;return this.emit(t.topic,t)}catch(t){o.default.system.error("Assimilation:Socket.onMessage:err:",t,e)}},e.onclose=()=>{this.emit("socketClosed"),o.default.system.log("SERVICE LIFECYCLE:Web socket closed")}}send(e){(!this.ws||this.ws.readyState>1)&&this.connect(),this.ws&&1===this.ws.readyState?this.ws.send(e):this.on("socketOpen",(()=>this.send(e)))}}t.default=s},96963:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{constructor(e){this.window=e,this.mouseLocation={},this.mouseOffset={},this.startBounds={},this.resizeType=null,this.location=e.location}setStartBounds(e){e.resizeType&&(this.resizeType=e.resizeType),this.startBounds={left:e.left,top:e.top,bottom:e.bottom,right:e.right,x:e.x,y:e.y,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top},this.location=this.startBounds,this.setMouseLocation(e),this.setMouseOffset(this.startBounds)}setMouseLocation(e){this.mouseLocation={x:Number(e.x),y:Number(e.y)}}setMouseOffset(e){this.mouseOffset={left:e.x-e.left,top:e.y-e.top}}calculateWindowLocation(e){const t={x:Math.round(Number(e.x)),y:Math.round(Number(e.y))};this.edge||(this.edge=this.getResizeEdge(this.startBounds,t,this.resizeType));let n,i,{left:r}=this.location,{right:o}=this.location,{top:s}=this.location,{bottom:a}=this.location,u=0;if(this.edge){switch(u=1,this.edge){case"left":r=t.x;break;case"right":o=t.x;break;case"top":s=t.y;break;case"bottom":a=t.y;break;case"top-left":r=t.x,s=t.y;break;case"top-right":o=t.x,s=t.y;break;case"bottom-left":r=t.x,a=t.y;break;case"bottom-right":o=t.x,a=t.y}i=o-r,n=a-s}else r=t.x-Number(this.mouseOffset.left),s=t.y-Number(this.mouseOffset.top),a=Number(a)-(t.y-this.mouseLocation.y),o=Number(o)-(t.x-this.mouseLocation.x),n=Number(this.location.height),i=Number(this.location.width);const l=this.location;return l.changeType=u,l.left=Number(r),l.top=Number(s),l.bottom=Number(a),l.right=Number(o),l.height=Number(n),l.width=Number(i),this.mouseLocation=t,this.location=l,l}getResizeEdge(e,t,n){if("None"===n)return null;let i=null;switch(n){case"WE":i=Math.abs(t.x-e.left)<Math.abs(t.x-e.right)?"left":"right";break;case"NS":i=Math.abs(t.y-e.bottom)<Math.abs(t.y-e.top)?"bottom":"top";break;case"NESW":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-right":"bottom-left";break;case"NWSE":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-left":"bottom-right"}return i}}},32790:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=h(n(22708)),r=h(n(80089)),o=h(n(72551)),s=h(n(9562)),a=h(n(6008)),u=n(75688),l=n(51742),c=h(n(39319)),d=h(n(96963)),f=h(n(5020)),p=n(76163);function h(e){return e&&e.__esModule?e:{default:e}}s.default.initialize(),t.default=class{constructor(e){this.assimilationHelper=e,this.activeWindows={},this.awaitingAssimilationSpawn={},this.awaitingSpawn={},this.allWindows={},this.movingWindow=null,this.floatingTitlebar=null,this.updateActiveWindowHeartbeats()}setWebsocket(e){this.ws=e}sendSocketMessage(e){if(!this.ws)return setTimeout((()=>{this.sendSocketMessage(e)}),100);this.ws.send(e)}setMovingWindow(e){return o.default.system.debug("Assimilation.AssimilationWindowManager.setMovingWindow",e),this.movingWindow=new d.default(e)}getMovingWindow(){return o.default.system.debug("Assimilation.AssimilationWindowManager.getMovingWindow"),this.movingWindow}getWindowByUUID(e){return o.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByUUID:",e),this.activeWindows[e]}getWindowByName(e){o.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByName:",e);const t=Object.keys(this.activeWindows);for(let n=0;n<t.length;n++){const i=this.activeWindows[t[n]];if(i.windowName===e)return i}}updateSpawningWindow(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager.updateSpawningWindow:",e,t);const n=this.awaitingAssimilationSpawn[e];if(n)return t||(n.windowLess=!0,t=e),n.uuid=t,this.activeWindows[t]=n,delete this.awaitingAssimilationSpawn[e],n}updateSpawningWindowFromWindowObject(e){const t=e.data,n={name:e.data.name,windowType:"FinsembleNativeWindow"};return u.FinsembleWindow.getInstance(n,(async(e,n)=>{n.descriptor.hideTitleBar=!0,n.uuid=parseInt(t.windowHandle,10).toString(16),this.activeWindows[n.uuid]=n;const i=await n.getBounds();i.data&&this.handleSpawnComplete(n,i.data)}))}handleSpawnComplete(e,t){if(o.default.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:",e,t),!e)return o.default.system.error("no window reference found");const n=(0,r.default)(e,"descriptor.customData.foreign.services.windowService.manageWindowMovement",!0);t&&n&&this.assimilationHelper.canHookWindow(e)&&(e.location=t,e.setBounds({bounds:t}),e.onReady((()=>{c.default.transmit(`${e.name}.endMovement`)}))),this.registerWindow(e,e)}addNativeWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow:",e),this.allWindows[e.uuid]=e;let t=this;this.assimilationHelper.executableInConfig(e,((n,i)=>{i||(e.windowName=e.name,t.assimilationHelper.canHookWindow(e)&&s.default._createWrap({name:e.uuid},((n,i)=>{n&&o.default.system.error("Error inside of createWrap:",n),u.FinsembleWindow.getInstance(i.data,((n,i)=>{if(n)return o.default.system.error("Could not create wrap for window",e);t.activeWindows[e.uuid]=i,i.uuid=e.uuid,t.handleSpawnComplete(i,e)}))})))}))}moveWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.moveWindow:",e),!e.location)return;if(!e.name)return;let t=this.getWindowByUUID(e.key);if(!t){if(t=this.getWindowByName(e.name),!t)return void o.default.system.error("MoveWindow - could not find window. Name:",e.name,"Handle:",e.key);o.default.system.warn("MoveWindow - Could not find window by UUID, but did find window by name. Name:",e.name,"Handle:",e.key)}e.location.width=Math.round(e.location.width),e.location.bottom=Math.round(e.location.bottom),e.location.height=Math.round(e.location.height),e.location.left=Math.round(e.location.left),e.location.right=Math.round(e.location.right),isNaN(e.location.left)||(isNaN(e.location.height)&&(e.location.height=e.location.bottom-e.location.top,e.location.width=e.location.right-e.location.left),t.location={...e.location},this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"moveWindow",uuid:t.uuid,windowId:t.uuid,location:e.location,locationResponse:e.locationResponse,resizable:e.resizable})))}showWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.showWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"showWindow",uuid:e.data.key,windowId:e.data.key}))}hideWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.hideWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hideWindow",uuid:e.data.key,windowId:e.data.key}))}dockWindow(e){const t=("00000000"+e.data.key).substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"dockWindow",uuid:t,windowId:t,edge:e.data.edge,bounds:e.data.bounds}))}undockWindow(e){const t=("00000000"+e.data.key).substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"undockWindow",uuid:t,windowId:t}))}closeWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.closeWindow:",e);const t=this.getWindowByName(e.data.name);t&&(t.windowLess?(c.default.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this.removeWindow(t.uuid,!1)):t.spawnedByFea?this._closeSpawned(t.finUUID,e.sendQueryResponse):(t.queryResponder=e.sendQueryResponse,this._closeAssimilationSpawned(t.uuid)))}_closeAssimilationSpawned(e){o.default.system.debug("Assimilation.AssimilationWindowManager._closeAssimilationSpawned:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e})),setTimeout((()=>{this.getWindowByUUID(e)&&this._closeAssimilationSpawned(e)}),1e3)}_closeSpawned(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager._closeSpawned:",e),l.System.terminateExternalProcess(e,0,(e=>{t&&t(null,null),o.default.system.debug("Assimilation window closed:",e)}),(e=>{t&&t(null,null),o.default.system.error("Assimilation window closed error:",e)}))}closeAllWindows(e){o.default.system.debug("Assimilation.AssimilationWindowManager.closeAllWindows:",e),Object.keys(this.activeWindows).map((e=>{c.default.transmit("LauncherService.shutdownResponse",{waitForMe:!1,name:this.activeWindows[e].windowName}),this.removeWindow(e,!1),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e}))}))}bringToFront(e){let t;if(o.default.system.debug("Assimilation.AssimilationWindowManager.bringToFront:",e),e.data.name){if(t=this.getWindowByName(e.data.name),!t)return void console.log("Failed to get window",e.data.name);e.data.key=t.uuid}else t=this.getWindowByUUID(e.data.key);"minimize"===t.state&&this.showWindow(e),t.descriptor.alwaysOnTop||this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"bringToFront",uuid:e.data.key,windowId:e.data.key}))}minimizeWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.minimizeWindow:",e);const t=this.getWindowByName(e.data.name);e.data.name&&(e.data.key=t.uuid),t.state="minimize",t.lastMinimized=Date.now(),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"minimize",uuid:e.data.key,windowId:e.data.key}))}maximizeWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.maximizeWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="maximize"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"maximize",uuid:e.data.key,windowId:e.data.key}))}restoreWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.restoreWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="restore"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"restore",uuid:e.data.key,windowId:e.data.key})),c.default.transmit(`${e.data.name}.restored`,{})}alwaysOnTop(e){let t;t=e.data.name&&!e.data.key?this.getWindowByName(e.data.name):this.getWindowByUUID(e.data.key),(t||e.data.key)&&(o.default.system.debug("Assimilation.AssimilationWindowManager.alwaysOnTop:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"alwaysOnTop",uuid:e.data.key||t.uuid,alwaysOnTop:e.data.alwaysonTop})),t.descriptor&&t.descriptor.alwaysOnTop!==e.data.alwaysonTop&&t.updateOptions({alwaysOnTop:e.data.alwaysonTop},Function.prototype))}removeWindow(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager.removeWindow:",e);const n=this.getWindowByUUID(e);if(!n)return delete this.activeWindows[e],delete this.allWindows[e];n.queryResponder?n.queryResponder(null,null):n.close({fromAssimilation:!0,removeFromWorkspace:t}),delete this.activeWindows[e],delete this.allWindows[e],c.default.query("Launcher.removeComponent",{name:n.windowName},(()=>{}))}parseApplicationList(e){o.default.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList:",e);const t=JSON.parse(e);this.checkForRemoved(t);for(let e=0;e<t.length;e++){const n=t[e];this.allWindows[n.uuid]||this.addNativeWindow(n)}}checkForRemoved(e){let t;o.default.system.debug("Assimilation.AssimilationWindowManager.checkForRemoved:",e);for(const n in this.allWindows)if(t=!1,!this.allWindows[n].windowLess){for(let i=0;i<e.length;i++)if(e[i].uuid===this.allWindows[n].uuid){t=!0;break}t||(this.activeWindows[n]&&this.activeWindows[n].unRegisterWithDocking(),delete this.activeWindows[n],delete this.allWindows[n])}}registerWindow(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager.registerWindow:",t.windowName,e,t),e.name=t.windowName;const n={name:t.windowName,uuid:t.uuid,windowType:"NativeWindow",windowMsg:{location:e.location?e.location:null},options:{minWidth:t.descriptor.minWidth||0,minHeight:t.descriptor.minHeight||0,maxWidth:t.descriptor.maxWidth||1/0,maxHeight:t.descriptor.maxHeight||1/0}};let i=`Finsemble.${t.windowName}.wrapReady`;var r=c.default.subscribe(i,((i,o)=>{t.wrapState="ready",t.initializeWindow({identifier:n,manageWindowMovement:Boolean(e.location)}),o.data&&o.data.name===n.name&&"closed"!==o.data.state&&(t.descriptor.isWPF,c.default.transmit(`${e.name}.onSpawned`,n),f.default.publishBootStatus(t.componentType,"components","completed"),c.default.unsubscribe(r))}));e.location&&this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hookWindow",uuid:t.uuid}))}unRegisterAllWindows(){if(o.default.system.debug("Assimilation.AssimilationWindowManager.unRegisterAllWindows:"),Object.keys(this.activeWindows).length>0)for(const e in this.activeWindows)this.activeWindows[e].unRegisterWithDocking();this.activeWindows={}}spawnWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.spawnWindow:",e);const t=this.assimilationHelper.manifest.useFeaSpawn,n=e.descriptor.customData.window.hasOwnProperty("useFeaSpawn")?e.descriptor.customData.window.useFeaSpawn:t;if(e.descriptor.alias)return n?this._spawnByAlias(e):this._SpawnByAlias(e);n?this._spawnByPathThroughContainer(e):this._spawnByPath(e)}async saveWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.saveWindow:",e);const t=this.getWindowByUUID(e.data.key);if(t&&(e.data.location&&(t.location=e.data.location,t.location.width||(t.location.width=t.location.right-t.location.left),t.location.height||(t.location.height=t.location.bottom-t.location.top),t.descriptor.defaultLeft=t.location.left,t.descriptor.defaultTop=t.location.top,t.descriptor.defaultWidth=t.location.width,t.descriptor.defaultHeight=t.location.height,t.descriptor.defaultRight=t.location.left+t.location.width,t.descriptor.defaultBottom=t.location.top+t.location.height,t.descriptor.left=t.location.left,t.descriptor.top=t.location.top,t.descriptor.width=t.location.width,t.descriptor.height=t.location.height,t.descriptor.right=t.descriptor.defaultRight,t.descriptor.bottom=t.descriptor.defaultBottom),t.descriptor.cacheLocation=t.restoreBounds,e.data.options&&e.data.options.autoShow&&(t.descriptor.autoShow=e.data.options.autoShow),t.descriptor=Object.assign(t.descriptor,e.data),t.descriptor.customData&&delete t.descriptor.customData.manifest,delete t.descriptor.url,!t.outsideOfFinsemble)){const e=await p.BaseWindow.cleanupState(t.descriptor);try{a.default._setWindowState({windowName:t.descriptor.name,state:{windowData:e}})}catch{}}}setFloatingTitlebar(e){this.floatingTitlebar=e}getFloatingTitlebar(){return this.floatingTitlebar}updateActiveWindowHeartbeats(){setInterval((()=>{for(const e in this.activeWindows){const t=this.activeWindows[e];t.descriptor.isWPF||c.default.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName})}}),1e3)}_spawnByPath(e){console.log(`Spawning ${e.name}`),o.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,i.default)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n={topic:"openNewApp",env:e.descriptor.env,path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,alwaysOnTop:!!e.descriptor.hasOwnProperty("alwaysOnTop")&&e.descriptor.alwaysOnTop,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,spawnUUID:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,r.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,r.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,r.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(n))}_SpawnByAlias(e){o.default.system.debug("Assimilation.AssimilationWindowManager._SpawnByAlias:",e);const t=(0,i.default)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=this.assimilationHelper.findAssetByAlias(e.descriptor.alias||e.descriptor.generatedPath||e.descriptor.path);if(!n)return o.default.system.error("The alias or path for this asset is missing");const s={topic:"openAssetApp",alias:n.alias,env:e.descriptor.env,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,version:n.version,target:n.target,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,spawnUUID:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,r.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,r.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,r.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(s))}_spawnByPathThroughContainer(e){o.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,i.default)();e.ref=t,e.spawnedByFea=!0,this.awaitingSpawn[t]=e,l.System.launchExternalProcess({path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,lifetime:"window",listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),o.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):o.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{o.default.system.error("Error in spawnByPath",e)}))}_spawnByAlias(e){o.default.system.debug("Assimilation.AssimilationWindowManager._spawnByAlias:",e);const t=(0,i.default)();e.ref=t,e.spawnedByFea=!0,e.appAsset=this.assimilationHelper.findAssetByAlias(e.descriptor.alias),this.awaitingSpawn[t]=e,l.System.launchExternalProcess({alias:e.descriptor.alias,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,lifetime:"window",listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),o.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):o.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{o.default.system.error(e)}))}}},44791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(22708)),r=s(n(72551)),o=s(n(70010));function s(e){return e&&e.__esModule?e:{default:e}}o.default.initialize(),t.default=class{constructor(e){this.appAssets=e.appAssets,this.manifest=e.manifest,this.blacklist=this.manifest.blacklist.map((e=>e.toUpperCase())),this.whitelist=this.manifest.whitelist.map((e=>e.toUpperCase()))}canHookWindow(e){const t=this.manifest.onlySpawned;return!(t&&!e.descriptor||(t&&e.descriptor&&!this.checkBlacklist(e)?(r.default.system.debug("Assimilation.canHookWindow: true"),0):this.checkBlacklist(e)||!this.checkWhitelist(e)&&this.whitelist.length>0))}executableInConfig(e,t){if(!e.executablePath)return t("not found",!1);const n=e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase();o.default.getValue({field:"finsemble.components"},((i,r)=>{const o=Object.keys(r);for(let i=0;i<o.length;i++){const s=r[o[i]];if(s.window&&s.window.path){const i=s.window.path.replace(/^.*[\\\/]/,"").toUpperCase();if(e.executablePath&&i===n)return t(null,!0)}}return this.executableInAssets(e,t)}))}executableInAssets(e,t){for(let n=0;n<this.appAssets.length;n++)if(this.appAssets[n].target.toUpperCase()===e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase())return t(null,!0);return t(null,!1)}checkBlacklist(e){if(!e.windowName)return!1;if(this.blacklist.length>0&&this.blacklist.includes(e.windowName.toUpperCase()))return!0;for(let t=0;t<this.blacklist.length;t++){const n=new RegExp(`^.*\\${this.blacklist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!1;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!1}return!1}checkWhitelist(e){if(!e.windowName)return!1;for(let t=0;t<this.whitelist.length;t++){const n=new RegExp(`^.*\\${this.whitelist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!0;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!0}return!1}prepareAction(e){const t=(0,i.default)();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}findAssetByAlias(e){if(!Array.isArray(this.appAssets))return null;for(let t=0;t<this.appAssets.length;t++)if(this.appAssets[t].alias===e||this.appAssets[t].path===e)return this.appAssets[t];return null}}},74602:function(e,t,n){var i,r;void 0===(r="function"==typeof(i=function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(t,n){return n&&!0===n.clone&&e(t)?i((r=t,Array.isArray(r)?[]:{}),t,n):t;var r}function n(n,r,o){var s=n.slice();return r.forEach((function(r,a){void 0===s[a]?s[a]=t(r,o):e(r)?s[a]=i(n[a],r,o):-1===n.indexOf(r)&&s.push(t(r,o))})),s}function i(r,o,s){var a=Array.isArray(o),u=(s||{arrayMerge:n}).arrayMerge||n;return a?Array.isArray(r)?u(r,o,s):t(o,s):function(n,r,o){var s={};return e(n)&&Object.keys(n).forEach((function(e){s[e]=t(n[e],o)})),Object.keys(r).forEach((function(a){e(r[a])&&n[a]?s[a]=i(n[a],r[a],o):s[a]=t(r[a],o)})),s}(r,o,s)}return i.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,n){return i(e,n,t)}))},i})?i.call(t,n,t,e):i)||(e.exports=r)},33034:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new r(i,o||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,s=new Array(o);r<o;r++)s[r]=i[r].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},a.prototype.emit=function(e,t,i,r,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,o,s),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,i);break;case 4:c[l].fn.call(c[l].context,t,i,r);break;default:if(!u)for(f=1,u=new Array(d-1);f<d;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,i,r){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||r&&!a.once||i&&a.context!==i||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||r&&!a[u].once||i&&a[u].context!==i)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},5939:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=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 r=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,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,i){var r,o,s,l;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=u(e))>0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=c.bind(i);return r.listener=n,i.wrapFn=r,r}function f(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]: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}(r):h(r,r.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),i=0;i<t;++i)n[i]=e[i];return n}function m(e,t,n,i){if("function"==typeof e.on)i.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 r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(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||r(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 r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){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)i(u,this,t);else{var l=u.length,c=h(u,l);for(n=0;n<l;++n)i(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;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 r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);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(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},24081:(e,t,n)=>{var i=n(21059)(n(158),"DataView");e.exports=i},15999:(e,t,n)=>{var i=n(13387),r=n(69252),o=n(31125),s=n(9021),a=n(68131);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}u.prototype.clear=i,u.prototype.delete=r,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},26811:(e,t,n)=>{var i=n(72215),r=n(56105),o=n(30484),s=n(8046),a=n(30603);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}u.prototype.clear=i,u.prototype.delete=r,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},60945:(e,t,n)=>{var i=n(21059)(n(158),"Map");e.exports=i},25835:(e,t,n)=>{var i=n(73633),r=n(39382),o=n(28850),s=n(70756),a=n(2769);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}u.prototype.clear=i,u.prototype.delete=r,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},27540:(e,t,n)=>{var i=n(21059)(n(158),"Promise");e.exports=i},80476:(e,t,n)=>{var i=n(21059)(n(158),"Set");e.exports=i},74868:(e,t,n)=>{var i=n(25835),r=n(57554),o=n(18800);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=r,s.prototype.has=o,e.exports=s},34987:(e,t,n)=>{var i=n(26811),r=n(73832),o=n(31676),s=n(33577),a=n(43343),u=n(20488);function l(e){var t=this.__data__=new i(e);this.size=t.size}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},44937:(e,t,n)=>{var i=n(158).Symbol;e.exports=i},48596:(e,t,n)=>{var i=n(158).Uint8Array;e.exports=i},18307:(e,t,n)=>{var i=n(21059)(n(158),"WeakMap");e.exports=i},90929:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},73034:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},5680:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}},92554:(e,t,n)=>{var i=n(65086),r=n(67016),o=n(93706),s=n(77638),a=n(49699),u=n(70094),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&r(e),d=!n&&!c&&s(e),f=!n&&!c&&!d&&u(e),p=n||c||d||f,h=p?i(e.length,String):[],m=h.length;for(var w in e)!t&&!l.call(e,w)||p&&("length"==w||d&&("offset"==w||"parent"==w)||f&&("buffer"==w||"byteLength"==w||"byteOffset"==w)||a(w,m))||h.push(w);return h}},57041:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},52824:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},99280:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},96122:(e,t,n)=>{var i=n(88039),r=n(1316),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&r(s,n)&&(void 0!==n||t in e)||i(e,t,n)}},33993:(e,t,n)=>{var i=n(1316);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},73977:(e,t,n)=>{var i=n(34386),r=n(23150);e.exports=function(e,t){return e&&i(t,r(t),e)}},5081:(e,t,n)=>{var i=n(34386),r=n(61530);e.exports=function(e,t){return e&&i(t,r(t),e)}},88039:(e,t,n)=>{var i=n(88689);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},49548:(e,t,n)=>{var i=n(34987),r=n(73034),o=n(96122),s=n(73977),a=n(5081),u=n(728),l=n(86923),c=n(21375),d=n(1584),f=n(47461),p=n(31441),h=n(35551),m=n(75539),w=n(83394),g=n(45010),y=n(93706),v=n(77638),b=n(55948),S=n(23619),C=n(78255),_=n(23150),A=n(61530),W="[object Arguments]",E="[object Function]",T="[object Object]",L={};L[W]=L["[object Array]"]=L["[object ArrayBuffer]"]=L["[object DataView]"]=L["[object Boolean]"]=L["[object Date]"]=L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Map]"]=L["[object Number]"]=L[T]=L["[object RegExp]"]=L["[object Set]"]=L["[object String]"]=L["[object Symbol]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L["[object Error]"]=L[E]=L["[object WeakMap]"]=!1,e.exports=function e(t,n,I,O,k,N){var R,P=1&n,M=2&n,F=4&n;if(I&&(R=k?I(t,O,k,N):I(t)),void 0!==R)return R;if(!S(t))return t;var D=y(t);if(D){if(R=m(t),!P)return l(t,R)}else{var x=h(t),j=x==E||"[object GeneratorFunction]"==x;if(v(t))return u(t,P);if(x==T||x==W||j&&!k){if(R=M||j?{}:g(t),!P)return M?d(t,a(R,t)):c(t,s(R,t))}else{if(!L[x])return k?t:{};R=w(t,x,P)}}N||(N=new i);var B=N.get(t);if(B)return B;N.set(t,R),C(t)?t.forEach((function(i){R.add(e(i,n,I,i,t,N))})):b(t)&&t.forEach((function(i,r){R.set(r,e(i,n,I,r,t,N))}));var $=D?void 0:(F?M?p:f:M?A:_)(t);return r($||t,(function(i,r){$&&(i=t[r=i]),o(R,r,e(i,n,I,r,t,N))})),R}},33776:(e,t,n)=>{var i=n(23619),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},22153:(e,t,n)=>{var i=n(52824),r=n(76648);e.exports=function e(t,n,o,s,a){var u=-1,l=t.length;for(o||(o=r),a||(a=[]);++u<l;){var c=t[u];n>0&&o(c)?n>1?e(c,n-1,o,s,a):i(a,c):s||(a[a.length]=c)}return a}},51845:(e,t,n)=>{var i=n(49160),r=n(46384);e.exports=function(e,t){for(var n=0,o=(t=i(t,e)).length;null!=e&&n<o;)e=e[r(t[n++])];return n&&n==o?e:void 0}},45328:(e,t,n)=>{var i=n(52824),r=n(93706);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},20194:(e,t,n)=>{var i=n(44937),r=n(15401),o=n(92445),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?r(e):o(e)}},56640:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},64634:(e,t,n)=>{var i=n(20194),r=n(81653);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},95372:(e,t,n)=>{var i=n(55365),r=n(81653);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,o,s,e,a))}},55365:(e,t,n)=>{var i=n(34987),r=n(95428),o=n(1108),s=n(71711),a=n(35551),u=n(93706),l=n(77638),c=n(70094),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,w,g){var y=u(e),v=u(t),b=y?f:a(e),S=v?f:a(t),C=(b=b==d?p:b)==p,_=(S=S==d?p:S)==p,A=b==S;if(A&&l(e)){if(!l(t))return!1;y=!0,C=!1}if(A&&!C)return g||(g=new i),y||c(e)?r(e,t,n,m,w,g):o(e,t,b,n,m,w,g);if(!(1&n)){var W=C&&h.call(e,"__wrapped__"),E=_&&h.call(t,"__wrapped__");if(W||E){var T=W?e.value():e,L=E?t.value():t;return g||(g=new i),w(T,L,n,m,g)}}return!!A&&(g||(g=new i),s(e,t,n,m,w,g))}},2471:(e,t,n)=>{var i=n(35551),r=n(81653);e.exports=function(e){return r(e)&&"[object Map]"==i(e)}},4249:(e,t,n)=>{var i=n(39277),r=n(83481),o=n(23619),s=n(91223),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?f:a).test(s(e))}},42388:(e,t,n)=>{var i=n(35551),r=n(81653);e.exports=function(e){return r(e)&&"[object Set]"==i(e)}},88595:(e,t,n)=>{var i=n(20194),r=n(62008),o=n(81653),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!s[i(e)]}},76324:(e,t,n)=>{var i=n(3067),r=n(32501),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},21506:(e,t,n)=>{var i=n(23619),r=n(3067),o=n(90807),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=r(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},11241:(e,t,n)=>{var i=n(10722),r=n(47975);e.exports=function(e,t){return i(e,t,(function(t,n){return r(e,n)}))}},10722:(e,t,n)=>{var i=n(51845),r=n(68400),o=n(49160);e.exports=function(e,t,n){for(var s=-1,a=t.length,u={};++s<a;){var l=t[s],c=i(e,l);n(c,l)&&r(u,o(l,e),c)}return u}},68400:(e,t,n)=>{var i=n(96122),r=n(49160),o=n(49699),s=n(23619),a=n(46384);e.exports=function(e,t,n,u){if(!s(e))return e;for(var l=-1,c=(t=r(t,e)).length,d=c-1,f=e;null!=f&&++l<c;){var p=a(t[l]),h=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(l!=d){var m=f[p];void 0===(h=u?u(m,p,f):void 0)&&(h=s(m)?m:o(t[l+1])?[]:{})}i(f,p,h),f=f[p]}return e}},86920:(e,t,n)=>{var i=n(80446),r=n(88689),o=n(41549),s=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:o;e.exports=s},65086:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},80430:(e,t,n)=>{var i=n(44937),r=n(57041),o=n(93706),s=n(81878),a=i?i.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},12383:(e,t,n)=>{var i=n(38725),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},2723:e=>{e.exports=function(e){return function(t){return e(t)}}},67446:e=>{e.exports=function(e,t){return e.has(t)}},49160:(e,t,n)=>{var i=n(93706),r=n(63140),o=n(39230),s=n(33270);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:o(s(e))}},53310:(e,t,n)=>{var i=n(48596);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},728:(e,t,n)=>{e=n.nmd(e);var i=n(158),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}},14352:(e,t,n)=>{var i=n(53310);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},44694:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},29169:(e,t,n)=>{var i=n(44937),r=i?i.prototype:void 0,o=r?r.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},69752:(e,t,n)=>{var i=n(53310);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},86923:e=>{e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},34386:(e,t,n)=>{var i=n(96122),r=n(88039);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=o?o(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),s?r(n,l,c):i(n,l,c)}return n}},21375:(e,t,n)=>{var i=n(34386),r=n(45278);e.exports=function(e,t){return i(e,r(e),t)}},1584:(e,t,n)=>{var i=n(34386),r=n(27508);e.exports=function(e,t){return i(e,r(e),t)}},38728:(e,t,n)=>{var i=n(158)["__core-js_shared__"];e.exports=i},88689:(e,t,n)=>{var i=n(21059),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},95428:(e,t,n)=>{var i=n(74868),r=n(99280),o=n(67446);e.exports=function(e,t,n,s,a,u){var l=1&n,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(e),p=u.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,w=2&n?new i:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var g=e[h],y=t[h];if(s)var v=l?s(y,g,h,t,e,u):s(g,y,h,e,t,u);if(void 0!==v){if(v)continue;m=!1;break}if(w){if(!r(t,(function(e,t){if(!o(w,t)&&(g===e||a(g,e,n,s,u)))return w.push(t)}))){m=!1;break}}else if(g!==y&&!a(g,y,n,s,u)){m=!1;break}}return u.delete(e),u.delete(t),m}},1108:(e,t,n)=>{var i=n(44937),r=n(48596),o=n(1316),s=n(95428),a=n(11382),u=n(76680),l=i?i.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,i,l,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var h=1&i;if(p||(p=u),e.size!=t.size&&!h)return!1;var m=f.get(e);if(m)return m==t;i|=2,f.set(e,t);var w=s(p(e),p(t),i,l,d,f);return f.delete(e),w;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},71711:(e,t,n)=>{var i=n(47461),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var u=1&n,l=i(e),c=l.length;if(c!=i(t).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in t:r.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var w=u;++d<c;){var g=e[f=l[d]],y=t[f];if(o)var v=u?o(y,g,f,t,e,a):o(g,y,f,e,t,a);if(!(void 0===v?g===y||s(g,y,n,o,a):v)){m=!1;break}w||(w="constructor"==f)}if(m&&!w){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(m=!1)}return a.delete(e),a.delete(t),m}},39169:(e,t,n)=>{var i=n(30597),r=n(53039),o=n(47209);e.exports=function(e){return o(r(e,void 0,i),e+"")}},14528:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},47461:(e,t,n)=>{var i=n(45328),r=n(45278),o=n(23150);e.exports=function(e){return i(e,o,r)}},31441:(e,t,n)=>{var i=n(45328),r=n(27508),o=n(61530);e.exports=function(e){return i(e,o,r)}},5662:(e,t,n)=>{var i=n(10205);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},21059:(e,t,n)=>{var i=n(4249),r=n(4759);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},97959:(e,t,n)=>{var i=n(78579)(Object.getPrototypeOf,Object);e.exports=i},15401:(e,t,n)=>{var i=n(44937),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[a]=n:delete e[a]),r}},45278:(e,t,n)=>{var i=n(5680),r=n(59174),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),i(s(e),(function(t){return o.call(e,t)})))}:r;e.exports=a},27508:(e,t,n)=>{var i=n(52824),r=n(97959),o=n(45278),s=n(59174),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,o(e)),e=r(e);return t}:s;e.exports=a},35551:(e,t,n)=>{var i=n(24081),r=n(60945),o=n(27540),s=n(80476),a=n(18307),u=n(20194),l=n(91223),c="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",m=l(i),w=l(r),g=l(o),y=l(s),v=l(a),b=u;(i&&b(new i(new ArrayBuffer(1)))!=h||r&&b(new r)!=c||o&&b(o.resolve())!=d||s&&b(new s)!=f||a&&b(new a)!=p)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,i=n?l(n):"";if(i)switch(i){case m:return h;case w:return c;case g:return d;case y:return f;case v:return p}return t}),e.exports=b},4759:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},96919:(e,t,n)=>{var i=n(49160),r=n(67016),o=n(93706),s=n(49699),a=n(62008),u=n(46384);e.exports=function(e,t,n){for(var l=-1,c=(t=i(t,e)).length,d=!1;++l<c;){var f=u(t[l]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(f,c)&&(o(e)||r(e))}},13387:(e,t,n)=>{var i=n(45155);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},69252:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},31125:(e,t,n)=>{var i=n(45155),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},9021:(e,t,n)=>{var i=n(45155),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},68131:(e,t,n)=>{var i=n(45155);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},75539:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,i=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(i.index=e.index,i.input=e.input),i}},83394:(e,t,n)=>{var i=n(53310),r=n(14352),o=n(44694),s=n(29169),a=n(69752);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return i(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return r(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return s(e)}}},45010:(e,t,n)=>{var i=n(33776),r=n(97959),o=n(3067);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:i(r(e))}},76648:(e,t,n)=>{var i=n(44937),r=n(67016),o=n(93706),s=i?i.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||r(e)||!!(s&&e&&e[s])}},49699:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},63140:(e,t,n)=>{var i=n(93706),r=n(81878),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!r(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},10205:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},83481:(e,t,n)=>{var i,r=n(38728),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},3067:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},72215:e=>{e.exports=function(){this.__data__=[],this.size=0}},56105:(e,t,n)=>{var i=n(33993),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():r.call(t,n,1),--this.size,0))}},30484:(e,t,n)=>{var i=n(33993);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},8046:(e,t,n)=>{var i=n(33993);e.exports=function(e){return i(this.__data__,e)>-1}},30603:(e,t,n)=>{var i=n(33993);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},73633:(e,t,n)=>{var i=n(15999),r=n(26811),o=n(60945);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},39382:(e,t,n)=>{var i=n(5662);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},28850:(e,t,n)=>{var i=n(5662);e.exports=function(e){return i(this,e).get(e)}},70756:(e,t,n)=>{var i=n(5662);e.exports=function(e){return i(this,e).has(e)}},2769:(e,t,n)=>{var i=n(5662);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},11382:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}},32202:(e,t,n)=>{var i=n(54883);e.exports=function(e){var t=i(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},45155:(e,t,n)=>{var i=n(21059)(Object,"create");e.exports=i},32501:(e,t,n)=>{var i=n(78579)(Object.keys,Object);e.exports=i},90807:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},41771:(e,t,n)=>{e=n.nmd(e);var i=n(14528),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r&&i.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},92445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78579:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},53039:(e,t,n)=>{var i=n(90929),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=r(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=o[s];return l[t]=n(u),i(e,this,l)}}},158:(e,t,n)=>{var i=n(14528),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},57554:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},18800:e=>{e.exports=function(e){return this.__data__.has(e)}},76680:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},47209:(e,t,n)=>{var i=n(86920),r=n(10832)(i);e.exports=r},10832:e=>{var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),o=16-(r-i);if(i=r,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},73832:(e,t,n)=>{var i=n(26811);e.exports=function(){this.__data__=new i,this.size=0}},31676:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},33577:e=>{e.exports=function(e){return this.__data__.get(e)}},43343:e=>{e.exports=function(e){return this.__data__.has(e)}},20488:(e,t,n)=>{var i=n(26811),r=n(60945),o=n(25835);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!r||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},39230:(e,t,n)=>{var i=n(32202),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,(function(e,n,i,r){t.push(i?r.replace(o,"$1"):n||e)})),t}));e.exports=s},46384:(e,t,n)=>{var i=n(81878);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},91223:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},38725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},71879:(e,t,n)=>{var i=n(49548);e.exports=function(e){return i(e,4)}},99748:(e,t,n)=>{var i=n(49548);e.exports=function(e){return i(e,5)}},80446:e=>{e.exports=function(e){return function(){return e}}},76897:(e,t,n)=>{var i=n(23619),r=n(98253),o=n(95053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,l,c,d,f,p,h=0,m=!1,w=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=u,i=l;return u=l=void 0,h=t,d=e.apply(i,n)}function v(e){return h=e,f=setTimeout(S,t),m?y(e):d}function b(e){var n=e-p;return void 0===p||n>=t||n<0||w&&e-h>=c}function S(){var e=r();if(b(e))return C(e);f=setTimeout(S,function(e){var n=t-(e-p);return w?a(n,c-(e-h)):n}(e))}function C(e){return f=void 0,g&&u?y(e):(u=l=void 0,d)}function _(){var e=r(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return v(p);if(w)return clearTimeout(f),f=setTimeout(S,t),y(p)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,i(n)&&(m=!!n.leading,c=(w="maxWait"in n)?s(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=p=l=f=void 0},_.flush=function(){return void 0===f?d:C(r())},_}},1316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},30597:(e,t,n)=>{var i=n(22153);e.exports=function(e){return null!=e&&e.length?i(e,1):[]}},80089:(e,t,n)=>{var i=n(51845);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},47975:(e,t,n)=>{var i=n(56640),r=n(96919);e.exports=function(e,t){return null!=e&&r(e,t,i)}},41549:e=>{e.exports=function(e){return e}},67016:(e,t,n)=>{var i=n(64634),r=n(81653),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=i(function(){return arguments}())?i:function(e){return r(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},93706:e=>{var t=Array.isArray;e.exports=t},51528:(e,t,n)=>{var i=n(39277),r=n(62008);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},77638:(e,t,n)=>{e=n.nmd(e);var i=n(158),r=n(30647),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?i.Buffer:void 0,u=(a?a.isBuffer:void 0)||r;e.exports=u},47184:(e,t,n)=>{var i=n(95372);e.exports=function(e,t){return i(e,t)}},65162:(e,t,n)=>{var i=n(95372);e.exports=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?i(e,t,void 0,n):!!r}},39277:(e,t,n)=>{var i=n(20194),r=n(23619);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},62008:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},55948:(e,t,n)=>{var i=n(2471),r=n(2723),o=n(41771),s=o&&o.isMap,a=s?r(s):i;e.exports=a},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}},78255:(e,t,n)=>{var i=n(42388),r=n(2723),o=n(41771),s=o&&o.isSet,a=s?r(s):i;e.exports=a},81878:(e,t,n)=>{var i=n(20194),r=n(81653);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},70094:(e,t,n)=>{var i=n(88595),r=n(2723),o=n(41771),s=o&&o.isTypedArray,a=s?r(s):i;e.exports=a},23150:(e,t,n)=>{var i=n(92554),r=n(76324),o=n(51528);e.exports=function(e){return o(e)?i(e):r(e)}},61530:(e,t,n)=>{var i=n(92554),r=n(21506),o=n(51528);e.exports=function(e){return o(e)?i(e,!0):r(e)}},53059:function(e,t,n){var i;e=n.nmd(e),function(){var r,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",w="[object Array]",g="[object Boolean]",y="[object Date]",v="[object Error]",b="[object Function]",S="[object GeneratorFunction]",C="[object Map]",_="[object Number]",A="[object Object]",W="[object Promise]",E="[object RegExp]",T="[object Set]",L="[object String]",I="[object Symbol]",O="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",R="[object Float32Array]",P="[object Float64Array]",M="[object Int8Array]",F="[object Int16Array]",D="[object Int32Array]",x="[object Uint8Array]",j="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",H=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,G=RegExp(V.source),Y=RegExp(z.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,we=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\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",We="["+Ae+"]",Ee="["+Se+"]",Te="\\d+",Le="["+Ce+"]",Ie="[^\\ud800-\\udfff"+Ae+Te+"\\u2700-\\u27bf"+Ce+_e+"]",Oe="\\ud83c[\\udffb-\\udfff]",ke="[^\\ud800-\\udfff]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+_e+"]",Me="(?:"+Le+"|"+Ie+")",Fe="(?:"+Pe+"|"+Ie+")",De="(?:['’](?:d|ll|m|re|s|t|ve))?",xe="(?:['’](?:D|LL|M|RE|S|T|VE))?",je="(?:"+Ee+"|"+Oe+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+je+"(?:\\u200d(?:"+[ke,Ne,Re].join("|")+")"+Be+je+")*",He="(?:"+["[\\u2700-\\u27bf]",Ne,Re].join("|")+")"+$e,Ue="(?:"+[ke+Ee+"?",Ee,Ne,Re,"[\\ud800-\\udfff]"].join("|")+")",qe=RegExp("['’]","g"),Ve=RegExp(Ee,"g"),ze=RegExp(Oe+"(?="+Oe+")|"+Ue+$e,"g"),Ge=RegExp([Pe+"?"+Le+"+"+De+"(?="+[We,Pe,"$"].join("|")+")",Fe+"+"+xe+"(?="+[We,Pe+Me,"$"].join("|")+")",Pe+"?"+Me+"+"+De,Pe+"+"+xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,He].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=["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"],Qe=-1,Xe={};Xe[R]=Xe[P]=Xe[M]=Xe[F]=Xe[D]=Xe[x]=Xe[j]=Xe[B]=Xe[$]=!0,Xe[m]=Xe[w]=Xe[k]=Xe[g]=Xe[N]=Xe[y]=Xe[v]=Xe[b]=Xe[C]=Xe[_]=Xe[A]=Xe[E]=Xe[T]=Xe[L]=Xe[O]=!1;var Ze={};Ze[m]=Ze[w]=Ze[k]=Ze[N]=Ze[g]=Ze[y]=Ze[R]=Ze[P]=Ze[M]=Ze[F]=Ze[D]=Ze[C]=Ze[_]=Ze[A]=Ze[E]=Ze[T]=Ze[L]=Ze[I]=Ze[x]=Ze[j]=Ze[B]=Ze[$]=!0,Ze[v]=Ze[b]=Ze[O]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,rt="object"==typeof self&&self&&self.Object===Object&&self,ot=it||rt||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,lt=ut&&it.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&&lt.binding&&lt.binding("util")}catch(e){}}(),dt=ct&&ct.isArrayBuffer,ft=ct&&ct.isDate,pt=ct&&ct.isMap,ht=ct&&ct.isRegExp,mt=ct&&ct.isSet,wt=ct&&ct.isTypedArray;function gt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var s=e[r];t(i,s,n(s),e)}return i}function vt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}function _t(e,t){return!(null==e||!e.length)&&Rt(e,t,0)>-1}function At(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function Wt(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Et(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function Tt(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function Lt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function It(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Ot=Dt("length");function kt(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Nt(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function Rt(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Nt(e,Mt,n)}function Pt(e,t,n,i){for(var r=n-1,o=e.length;++r<o;)if(i(e[r],t))return r;return-1}function Mt(e){return e!=e}function Ft(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:f}function Dt(e){return function(t){return null==t?r:t[e]}}function xt(e){return function(t){return null==e?r:e[t]}}function jt(e,t,n,i,r){return r(e,(function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)})),n}function Bt(e,t){for(var n,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==r&&(n=n===r?s:n+s)}return n}function $t(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Ht(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Ut(e){return function(t){return e(t)}}function qt(e,t){return Wt(t,(function(t){return e[t]}))}function Vt(e,t){return e.has(t)}function zt(e,t){for(var n=-1,i=e.length;++n<i&&Rt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Rt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Kt=xt({À:"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"}),Jt=xt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Qt(e){return"\\"+et[e]}function Xt(e){return Ye.test(e)}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[r++]=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 Xt(e)?function(e){for(var t=ze.lastIndex=0;ze.test(e);)++t;return t}(e):Ot(e)}function sn(e){return Xt(e)?function(e){return e.match(ze)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var un=xt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function e(t){var n,i=(t=null==t?ot:ln.defaults(ot.Object(),t,ln.pick(ot,Je))).Array,re=t.Date,Se=t.Error,Ce=t.Function,_e=t.Math,Ae=t.Object,We=t.RegExp,Ee=t.String,Te=t.TypeError,Le=i.prototype,Ie=Ce.prototype,Oe=Ae.prototype,ke=t["__core-js_shared__"],Ne=Ie.toString,Re=Oe.hasOwnProperty,Pe=0,Me=(n=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Fe=Oe.toString,De=Ne.call(Ae),xe=ot._,je=We("^"+Ne.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:r,$e=t.Symbol,He=t.Uint8Array,Ue=Be?Be.allocUnsafe:r,ze=en(Ae.getPrototypeOf,Ae),Ye=Ae.create,et=Oe.propertyIsEnumerable,it=Le.splice,rt=$e?$e.isConcatSpreadable:r,st=$e?$e.iterator:r,at=$e?$e.toStringTag:r,lt=function(){try{var e=lo(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Ot=re&&re.now!==ot.Date.now&&re.now,xt=t.setTimeout!==ot.setTimeout&&t.setTimeout,cn=_e.ceil,dn=_e.floor,fn=Ae.getOwnPropertySymbols,pn=Be?Be.isBuffer:r,hn=t.isFinite,mn=Le.join,wn=en(Ae.keys,Ae),gn=_e.max,yn=_e.min,vn=re.now,bn=t.parseInt,Sn=_e.random,Cn=Le.reverse,_n=lo(t,"DataView"),An=lo(t,"Map"),Wn=lo(t,"Promise"),En=lo(t,"Set"),Tn=lo(t,"WeakMap"),Ln=lo(Ae,"create"),In=Tn&&new Tn,On={},kn=jo(_n),Nn=jo(An),Rn=jo(Wn),Pn=jo(En),Mn=jo(Tn),Fn=$e?$e.prototype:r,Dn=Fn?Fn.valueOf:r,xn=Fn?Fn.toString:r;function jn(e){if(na(e)&&!Vs(e)&&!(e instanceof Un)){if(e instanceof Hn)return e;if(Re.call(e,"__wrapped__"))return Bo(e)}return new Hn(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function $n(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Kn(e,t){var n=Vs(e),i=!n&&qs(e),r=!n&&!i&&Ks(e),o=!n&&!i&&!r&&ca(e),s=n||i||r||o,a=s?$t(e.length,Ee):[],u=a.length;for(var l in e)!t&&!Re.call(e,l)||s&&("length"==l||r&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||go(l,u))||a.push(l);return a}function Jn(e){var t=e.length;return t?e[zi(0,t-1)]:r}function Qn(e,t){return Po(Tr(e),si(t,0,e.length))}function Xn(e){return Po(Tr(e))}function Zn(e,t,n){(n!==r&&!$s(e[t],n)||n===r&&!(t in e))&&ri(e,t,n)}function ei(e,t,n){var i=e[t];Re.call(e,t)&&$s(i,n)&&(n!==r||t in e)||ri(e,t,n)}function ti(e,t){for(var n=e.length;n--;)if($s(e[n][0],t))return n;return-1}function ni(e,t,n,i){return di(e,(function(e,r,o){t(i,e,n(e),o)})),i}function ii(e,t){return e&&Lr(t,Na(t),e)}function ri(e,t,n){"__proto__"==t&&lt?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function oi(e,t){for(var n=-1,o=t.length,s=i(o),a=null==e;++n<o;)s[n]=a?r:Ta(e,t[n]);return s}function si(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ai(e,t,n,i,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!ta(e))return e;var d=Vs(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Tr(e,a)}else{var f=po(e),p=f==b||f==S;if(Ks(e))return Sr(e,u);if(f==A||f==m||p&&!o){if(a=l||p?{}:mo(e),!u)return l?function(e,t){return Lr(e,fo(e),t)}(e,function(e,t){return e&&Lr(t,Ra(t),e)}(a,e)):function(e,t){return Lr(e,co(e),t)}(e,ii(a,e))}else{if(!Ze[f])return o?e:{};a=function(e,t,n){var i,r=e.constructor;switch(t){case k:return Cr(e);case g:case y:return new r(+e);case N:return function(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case R:case P:case M:case F:case D:case x:case j:case B:case $:return _r(e,n);case C:return new r;case _:case L:return new r(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new r;case I:return i=e,Dn?Ae(Dn.call(i)):{}}}(e,f,u)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(i){a.add(ai(i,t,n,i,e,s))})):ia(e)&&e.forEach((function(i,r){a.set(r,ai(i,t,n,r,e,s))}));var w=d?r:(c?l?no:to:l?Ra:Na)(e);return vt(w||e,(function(i,r){w&&(i=e[r=i]),ei(a,r,ai(i,t,n,r,e,s))})),a}function ui(e,t,n){var i=n.length;if(null==e)return!i;for(e=Ae(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function li(e,t,n){if("function"!=typeof e)throw new Te(o);return Oo((function(){e.apply(r,n)}),t)}function ci(e,t,n,i){var r=-1,o=_t,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Wt(t,Ut(n))),i?(o=At,s=!1):t.length>=200&&(o=Vt,s=!1,t=new Gn(t));e:for(;++r<a;){var c=e[r],d=null==n?c:n(c);if(c=i||0!==c?c:0,s&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else o(t,d,i)||u.push(c)}return u}jn.templateSettings={escape:K,evaluate:J,interpolate:Q,variable:"",imports:{_:jn}},jn.prototype=$n.prototype,jn.prototype.constructor=jn,Hn.prototype=Bn($n.prototype),Hn.prototype.constructor=Hn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,qn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qn.prototype.get=function(e){var t=this.__data__;if(Ln){var n=t[e];return n===s?r:n}return Re.call(t,e)?t[e]:r},qn.prototype.has=function(e){var t=this.__data__;return Ln?t[e]!==r:Re.call(t,e)},qn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===r?s:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=ti(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},Vn.prototype.get=function(e){var t=this.__data__,n=ti(t,e);return n<0?r:t[n][1]},Vn.prototype.has=function(e){return ti(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,i=ti(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(An||Vn),string:new qn}},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),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var i=n.__data__;if(!An||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(i)}return n.set(e,t),this.size=n.size,this};var di=kr(vi),fi=kr(bi,!0);function pi(e,t){var n=!0;return di(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function hi(e,t,n){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(u===r?a==a&&!la(a):n(a,u)))var u=a,l=s}return l}function mi(e,t){var n=[];return di(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function wi(e,t,n,i,r){var o=-1,s=e.length;for(n||(n=wo),r||(r=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?wi(a,t-1,n,i,r):Et(r,a):i||(r[r.length]=a)}return r}var gi=Nr(),yi=Nr(!0);function vi(e,t){return e&&gi(e,t,Na)}function bi(e,t){return e&&yi(e,t,Na)}function Si(e,t){return Ct(t,(function(t){return Xs(e[t])}))}function Ci(e,t){for(var n=0,i=(t=gr(t,e)).length;null!=e&&n<i;)e=e[xo(t[n++])];return n&&n==i?e:r}function _i(e,t,n){var i=t(e);return Vs(e)?i:Et(i,n(e))}function Ai(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in Ae(e)?function(e){var t=Re.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var o=Fe.call(e);return i&&(t?e[at]=n:delete e[at]),o}(e):function(e){return Fe.call(e)}(e)}function Wi(e,t){return e>t}function Ei(e,t){return null!=e&&Re.call(e,t)}function Ti(e,t){return null!=e&&t in Ae(e)}function Li(e,t,n){for(var o=n?At:_t,s=e[0].length,a=e.length,u=a,l=i(a),c=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Wt(f,Ut(t))),c=yn(f.length,c),l[u]=!n&&(t||s>=120&&f.length>=120)?new Gn(u&&f):r}f=e[0];var p=-1,h=l[0];e:for(;++p<s&&d.length<c;){var m=f[p],w=t?t(m):m;if(m=n||0!==m?m:0,!(h?Vt(h,w):o(d,w,n))){for(u=a;--u;){var g=l[u];if(!(g?Vt(g,w):o(e[u],w,n)))continue e}h&&h.push(w),d.push(m)}}return d}function Ii(e,t,n){var i=null==(e=Eo(e,t=gr(t,e)))?e:e[xo(Qo(t))];return null==i?r:gt(i,e,n)}function Oi(e){return na(e)&&Ai(e)==m}function ki(e,t,n,i,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,o,s){var a=Vs(e),u=Vs(t),l=a?w:po(e),c=u?w:po(t),d=(l=l==m?A:l)==A,f=(c=c==m?A:c)==A,p=l==c;if(p&&Ks(e)){if(!Ks(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Yn),a||ca(e)?Zr(e,t,n,i,o,s):function(e,t,n,i,r,o,s){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case g:case y:case _:return $s(+e,+t);case v:return e.name==t.name&&e.message==t.message;case E:case L:return e==t+"";case C:var a=Zt;case T:var u=1&i;if(a||(a=nn),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;i|=2,s.set(e,t);var c=Zr(a(e),a(t),i,r,o,s);return s.delete(e),c;case I:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,l,n,i,o,s);if(!(1&n)){var h=d&&Re.call(e,"__wrapped__"),b=f&&Re.call(t,"__wrapped__");if(h||b){var S=h?e.value():e,W=b?t.value():t;return s||(s=new Yn),o(S,W,n,i,s)}}return!!p&&(s||(s=new Yn),function(e,t,n,i,o,s){var a=1&n,u=to(e),l=u.length;if(l!=to(t).length&&!a)return!1;for(var c=l;c--;){var d=u[c];if(!(a?d in t:Re.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var m=a;++c<l;){var w=e[d=u[c]],g=t[d];if(i)var y=a?i(g,w,d,t,e,s):i(w,g,d,e,t,s);if(!(y===r?w===g||o(w,g,n,i,s):y)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,i,o,s))}(e,t,n,i,ki,o))}function Ni(e,t,n,i){var o=n.length,s=o,a=!i;if(null==e)return!s;for(e=Ae(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var l=(u=n[o])[0],c=e[l],d=u[1];if(a&&u[2]){if(c===r&&!(l in e))return!1}else{var f=new Yn;if(i)var p=i(c,d,l,e,t,f);if(!(p===r?ki(d,c,3,i,f):p))return!1}}return!0}function Ri(e){return!(!ta(e)||(t=e,Me&&Me in t))&&(Xs(e)?je:me).test(jo(e));var t}function Pi(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Vs(e)?ji(e[0],e[1]):xi(e):pu(e)}function Mi(e){if(!Co(e))return wn(e);var t=[];for(var n in Ae(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fi(e,t){return e<t}function Di(e,t){var n=-1,r=Gs(e)?i(e.length):[];return di(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function xi(e){var t=uo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Ni(n,e,t)}}function ji(e,t){return vo(e)&&_o(t)?Ao(xo(e),t):function(n){var i=Ta(n,e);return i===r&&i===t?La(n,e):ki(t,i,3)}}function Bi(e,t,n,i,o){e!==t&&gi(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,i,o,s,a){var u=Lo(e,n),l=Lo(t,n),c=a.get(l);if(c)Zn(e,n,c);else{var d=s?s(u,l,n+"",e,t,a):r,f=d===r;if(f){var p=Vs(l),h=!p&&Ks(l),m=!p&&!h&&ca(l);d=l,p||h||m?Vs(u)?d=u:Ys(u)?d=Tr(u):h?(f=!1,d=Sr(l,!0)):m?(f=!1,d=_r(l,!0)):d=[]:oa(l)||qs(l)?(d=u,qs(u)?d=ya(u):ta(u)&&!Xs(u)||(d=mo(l))):f=!1}f&&(a.set(l,d),o(d,l,i,s,a),a.delete(l)),Zn(e,n,d)}}(e,t,a,n,Bi,i,o);else{var u=i?i(Lo(e,a),s,a+"",e,t,o):r;u===r&&(u=s),Zn(e,a,u)}}),Ra)}function $i(e,t){var n=e.length;if(n)return go(t+=t<0?n:0,n)?e[t]:r}function Hi(e,t,n){t=t.length?Wt(t,(function(e){return Vs(e)?function(t){return Ci(t,1===e.length?e[0]:e)}:e})):[ru];var i=-1;return t=Wt(t,Ut(so())),function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,o=t.criteria,s=r.length,a=n.length;++i<s;){var u=Ar(r[i],o[i]);if(u)return i>=a?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(Di(e,(function(e,n,r){return{criteria:Wt(t,(function(t){return t(e)})),index:++i,value:e}})))}function Ui(e,t,n){for(var i=-1,r=t.length,o={};++i<r;){var s=t[i],a=Ci(e,s);n(a,s)&&Qi(o,gr(s,e),a)}return o}function qi(e,t,n,i){var r=i?Pt:Rt,o=-1,s=t.length,a=e;for(e===t&&(t=Tr(t)),n&&(a=Wt(e,Ut(n)));++o<s;)for(var u=0,l=t[o],c=n?n(l):l;(u=r(a,c,u,i))>-1;)a!==e&&it.call(a,u,1),it.call(e,u,1);return e}function Vi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;go(r)?it.call(e,r,1):lr(e,r)}}return e}function zi(e,t){return e+dn(Sn()*(t-e+1))}function Gi(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=dn(t/2))&&(e+=e)}while(t);return n}function Yi(e,t){return ko(Wo(e,t,ru),e+"")}function Ki(e){return Jn($a(e))}function Ji(e,t){var n=$a(e);return Po(n,si(t,0,n.length))}function Qi(e,t,n,i){if(!ta(e))return e;for(var o=-1,s=(t=gr(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var l=xo(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var d=u[l];(c=i?i(d,l,u):r)===r&&(c=ta(d)?d:go(t[o+1])?[]:{})}ei(u,l,c),u=u[l]}return e}var Xi=In?function(e,t){return In.set(e,t),e}:ru,Zi=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ru;function er(e){return Po($a(e))}function tr(e,t,n){var r=-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=i(o);++r<o;)s[r]=e[r+t];return s}function nr(e,t){var n;return di(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function ir(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=e[o];null!==s&&!la(s)&&(n?s<=t:s<t)?i=o+1:r=o}return r}return rr(e,t,ru,n)}function rr(e,t,n,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,u=null===t,l=la(t),c=t===r;o<s;){var d=dn((o+s)/2),f=n(e[d]),p=f!==r,h=null===f,m=f==f,w=la(f);if(a)var g=i||m;else g=c?m&&(i||p):u?m&&p&&(i||!h):l?m&&p&&!h&&(i||!w):!h&&!w&&(i?f<=t:f<t);g?o=d+1:s=d}return yn(s,4294967294)}function or(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n],a=t?t(s):s;if(!n||!$s(a,u)){var u=a;o[r++]=0===s?0:s}}return o}function sr(e){return"number"==typeof e?e:la(e)?f:+e}function ar(e){if("string"==typeof e)return e;if(Vs(e))return Wt(e,ar)+"";if(la(e))return xn?xn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ur(e,t,n){var i=-1,r=_t,o=e.length,s=!0,a=[],u=a;if(n)s=!1,r=At;else if(o>=200){var l=t?null:Gr(e);if(l)return nn(l);s=!1,r=Vt,u=new Gn}else u=t?[]:a;e:for(;++i<o;){var c=e[i],d=t?t(c):c;if(c=n||0!==c?c:0,s&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(c)}else r(u,d,n)||(u!==a&&u.push(d),a.push(c))}return a}function lr(e,t){return null==(e=Eo(e,t=gr(t,e)))||delete e[xo(Qo(t))]}function cr(e,t,n,i){return Qi(e,t,n(Ci(e,t)),i)}function dr(e,t,n,i){for(var r=e.length,o=i?r:-1;(i?o--:++o<r)&&t(e[o],o,e););return n?tr(e,i?0:o,i?o+1:r):tr(e,i?o+1:0,i?r:o)}function fr(e,t){var n=e;return n instanceof Un&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Et([e],t.args))}),n)}function pr(e,t,n){var r=e.length;if(r<2)return r?ur(e[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=e[o],u=-1;++u<r;)u!=o&&(s[o]=ci(s[o]||a,e[u],t,n));return ur(wi(s,1),t,n)}function hr(e,t,n){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var u=i<s?t[i]:r;n(a,e[i],u)}return a}function mr(e){return Ys(e)?e:[]}function wr(e){return"function"==typeof e?e:ru}function gr(e,t){return Vs(e)?e:vo(e,t)?[e]:Do(va(e))}var yr=Yi;function vr(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:tr(e,t,n)}var br=ct||function(e){return ot.clearTimeout(e)};function Sr(e,t){if(t)return e.slice();var n=e.length,i=Ue?Ue(n):new e.constructor(n);return e.copy(i),i}function Cr(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function _r(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ar(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=la(e),a=t!==r,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||i&&a&&l||!n&&l||!o)return 1;if(!i&&!s&&!c&&e<t||c&&n&&o&&!i&&!s||u&&n&&o||!a&&o||!l)return-1}return 0}function Wr(e,t,n,r){for(var o=-1,s=e.length,a=n.length,u=-1,l=t.length,c=gn(s-a,0),d=i(l+c),f=!r;++u<l;)d[u]=t[u];for(;++o<a;)(f||o<s)&&(d[n[o]]=e[o]);for(;c--;)d[u++]=e[o++];return d}function Er(e,t,n,r){for(var o=-1,s=e.length,a=-1,u=n.length,l=-1,c=t.length,d=gn(s-u,0),f=i(d+c),p=!r;++o<d;)f[o]=e[o];for(var h=o;++l<c;)f[h+l]=t[l];for(;++a<u;)(p||o<s)&&(f[h+n[a]]=e[o++]);return f}function Tr(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function Lr(e,t,n,i){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=i?i(n[u],e[u],u,n,e):r;l===r&&(l=e[u]),o?ri(n,u,l):ei(n,u,l)}return n}function Ir(e,t){return function(n,i){var r=Vs(n)?yt:ni,o=t?t():{};return r(n,e,so(i,2),o)}}function Or(e){return Yi((function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&yo(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=Ae(t);++i<o;){var u=n[i];u&&e(t,u,i,s)}return t}))}function kr(e,t){return function(n,i){if(null==n)return n;if(!Gs(n))return e(n,i);for(var r=n.length,o=t?r:-1,s=Ae(n);(t?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function Nr(e){return function(t,n,i){for(var r=-1,o=Ae(t),s=i(t),a=s.length;a--;){var u=s[e?a:++r];if(!1===n(o[u],u,o))break}return t}}function Rr(e){return function(t){var n=Xt(t=va(t))?sn(t):r,i=n?n[0]:t.charAt(0),o=n?vr(n,1).join(""):t.slice(1);return i[e]()+o}}function Pr(e){return function(t){return Tt(Xa(qa(t).replace(qe,"")),e,"")}}function Mr(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),i=e.apply(n,t);return ta(i)?i:n}}function Fr(e){return function(t,n,i){var o=Ae(t);if(!Gs(t)){var s=so(n,3);t=Na(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[s?t[a]:a]:r}}function Dr(e){return eo((function(t){var n=t.length,i=n,s=Hn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Te(o);if(s&&!u&&"wrapper"==ro(a))var u=new Hn([],!0)}for(i=u?i:n;++i<n;){var l=ro(a=t[i]),c="wrapper"==l?io(a):r;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ro(c[0])].apply(u,c[3]):1==a.length&&bo(a)?u[l]():u.thru(a)}return function(){var e=arguments,i=e[0];if(u&&1==e.length&&Vs(i))return u.plant(i).value();for(var r=0,o=n?t[r].apply(this,e):i;++r<n;)o=t[r].call(this,o);return o}}))}function xr(e,t,n,o,s,a,u,c,d,f){var p=t&l,h=1&t,m=2&t,w=24&t,g=512&t,y=m?r:Mr(e);return function r(){for(var l=arguments.length,v=i(l),b=l;b--;)v[b]=arguments[b];if(w)var S=oo(r),C=Yt(v,S);if(o&&(v=Wr(v,o,s,w)),a&&(v=Er(v,a,u,w)),l-=C,w&&l<f){var _=tn(v,S);return Vr(e,t,xr,r.placeholder,n,v,_,c,d,f-l)}var A=h?n:this,W=m?A[e]:e;return l=v.length,c?v=To(v,c):g&&l>1&&v.reverse(),p&&d<l&&(v.length=d),this&&this!==ot&&this instanceof r&&(W=y||Mr(W)),W.apply(A,v)}}function jr(e,t){return function(n,i){return function(e,t,n,i){return vi(e,(function(e,r,o){t(i,n(e),r,o)})),i}(n,e,t(i),{})}}function Br(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=ar(n),i=ar(i)):(n=sr(n),i=sr(i)),o=e(n,i)}return o}}function $r(e){return eo((function(t){return t=Wt(t,Ut(so())),Yi((function(n){var i=this;return e(t,(function(e){return gt(e,i,n)}))}))}))}function Hr(e,t){var n=(t=t===r?" ":ar(t)).length;if(n<2)return n?Gi(t,e):t;var i=Gi(t,cn(e/on(t)));return Xt(t)?vr(sn(i),0,e).join(""):i.slice(0,e)}function Ur(e){return function(t,n,o){return o&&"number"!=typeof o&&yo(t,n,o)&&(n=o=r),t=ha(t),n===r?(n=t,t=0):n=ha(n),function(e,t,n,r){for(var o=-1,s=gn(cn((t-e)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=e,e+=n;return a}(t,n,o=o===r?t<n?1:-1:ha(o),e)}}function qr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ga(t),n=ga(n)),e(t,n)}}function Vr(e,t,n,i,o,s,a,l,c,d){var f=8&t;t|=f?u:64,4&(t&=~(f?64:u))||(t&=-4);var p=[e,t,o,f?s:r,f?a:r,f?r:s,f?r:a,l,c,d],h=n.apply(r,p);return bo(e)&&Io(h,p),h.placeholder=i,No(h,e,t)}function zr(e){var t=_e[e];return function(e,n){if(e=ga(e),(n=null==n?0:yn(ma(n),292))&&hn(e)){var i=(va(e)+"e").split("e");return+((i=(va(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Gr=En&&1/nn(new En([,-0]))[1]==c?function(e){return new En(e)}:lu;function Yr(e){return function(t){var n=po(t);return n==C?Zt(t):n==T?rn(t):function(e,t){return Wt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Kr(e,t,n,s,c,d,f,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(o);var m=s?s.length:0;if(m||(t&=-97,s=c=r),f=f===r?f:gn(ma(f),0),p=p===r?p:ma(p),m-=c?c.length:0,64&t){var w=s,g=c;s=c=r}var y=h?r:io(e),v=[e,t,n,s,c,w,g,d,f,p];if(y&&function(e,t){var n=e[1],i=t[1],r=n|i,o=r<131,s=i==l&&8==n||i==l&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Wr(c,u,t[4]):u,e[4]=c?tn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Er(c,u,t[6]):u,e[6]=c?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),i&l&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(v,y),e=v[0],t=v[1],n=v[2],s=v[3],c=v[4],!(p=v[9]=v[9]===r?h?0:e.length:gn(v[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Mr(e);return function s(){for(var a=arguments.length,u=i(a),l=a,c=oo(s);l--;)u[l]=arguments[l];var d=a<3&&u[0]!==c&&u[a-1]!==c?[]:tn(u,c);return(a-=d.length)<n?Vr(e,t,xr,s.placeholder,r,u,d,r,r,n-a):gt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,p):t!=u&&33!=t||c.length?xr.apply(r,v):function(e,t,n,r){var o=1&t,s=Mr(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=r.length,d=i(c+u),f=this&&this!==ot&&this instanceof t?s:e;++l<c;)d[l]=r[l];for(;u--;)d[l++]=arguments[++a];return gt(f,o?n:this,d)}}(e,t,n,s);else var b=function(e,t,n){var i=1&t,r=Mr(e);return function t(){return(this&&this!==ot&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return No((y?Xi:Io)(b,v),e,t)}function Jr(e,t,n,i){return e===r||$s(e,Oe[n])&&!Re.call(i,n)?t:e}function Qr(e,t,n,i,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Bi(e,t,r,Qr,s),s.delete(t)),e}function Xr(e){return oa(e)?r:e}function Zr(e,t,n,i,o,s){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,h=2&n?new Gn:r;for(s.set(e,t),s.set(t,e);++f<u;){var m=e[f],w=t[f];if(i)var g=a?i(w,m,f,t,e,s):i(m,w,f,e,t,s);if(g!==r){if(g)continue;p=!1;break}if(h){if(!It(t,(function(e,t){if(!Vt(h,t)&&(m===e||o(m,e,n,i,s)))return h.push(t)}))){p=!1;break}}else if(m!==w&&!o(m,w,n,i,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return ko(Wo(e,r,zo),e+"")}function to(e){return _i(e,Na,co)}function no(e){return _i(e,Ra,fo)}var io=In?function(e){return In.get(e)}:lu;function ro(e){for(var t=e.name+"",n=On[t],i=Re.call(On,t)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==e)return r.name}return t}function oo(e){return(Re.call(jn,"placeholder")?jn:e).placeholder}function so(){var e=jn.iteratee||ou;return e=e===ou?Pi:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function uo(e){for(var t=Na(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,_o(r)]}return t}function lo(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Ri(n)?n:r}var co=fn?function(e){return null==e?[]:(e=Ae(e),Ct(fn(e),(function(t){return et.call(e,t)})))}:wu,fo=fn?function(e){for(var t=[];e;)Et(t,co(e)),e=ze(e);return t}:wu,po=Ai;function ho(e,t,n){for(var i=-1,r=(t=gr(t,e)).length,o=!1;++i<r;){var s=xo(t[i]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&ea(r)&&go(s,r)&&(Vs(e)||qs(e))}function mo(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(ze(e))}function wo(e){return Vs(e)||qs(e)||!!(rt&&e&&e[rt])}function go(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?Gs(n)&&go(t,n.length):"string"==i&&t in n)&&$s(n[t],e)}function vo(e,t){if(Vs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||Z.test(e)||!X.test(e)||null!=t&&e in Ae(t)}function bo(e){var t=ro(e),n=jn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var i=io(n);return!!i&&e===i[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=N||An&&po(new An)!=C||Wn&&po(Wn.resolve())!=W||En&&po(new En)!=T||Tn&&po(new Tn)!=O)&&(po=function(e){var t=Ai(e),n=t==A?e.constructor:r,i=n?jo(n):"";if(i)switch(i){case kn:return N;case Nn:return C;case Rn:return W;case Pn:return T;case Mn:return O}return t});var So=ke?Xs:gu;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function _o(e){return e==e&&!ta(e)}function Ao(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in Ae(n))}}function Wo(e,t,n){return t=gn(t===r?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=gn(r.length-t,0),a=i(s);++o<s;)a[o]=r[t+o];o=-1;for(var u=i(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),gt(e,this,u)}}function Eo(e,t){return t.length<2?e:Ci(e,tr(t,0,-1))}function To(e,t){for(var n=e.length,i=yn(t.length,n),o=Tr(e);i--;){var s=t[i];e[i]=go(s,n)?o[s]:r}return e}function Lo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Io=Ro(Xi),Oo=xt||function(e,t){return ot.setTimeout(e,t)},ko=Ro(Zi);function No(e,t,n){var i=t+"";return ko(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return vt(h,(function(n){var i="_."+n[0];t&n[1]&&!_t(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(i),n)))}function Ro(e){var t=0,n=0;return function(){var i=vn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Po(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var s=zi(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Mo,Fo,Do=(Mo=Ms((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Fo.size&&Fo.clear(),e})),Fo=Mo.cache,Mo);function xo(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function jo(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Un)return e.clone();var t=new Hn(e.__wrapped__,e.__chain__);return t.__actions__=Tr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Yi((function(e,t){return Ys(e)?ci(e,wi(t,1,Ys,!0)):[]})),Ho=Yi((function(e,t){var n=Qo(t);return Ys(n)&&(n=r),Ys(e)?ci(e,wi(t,1,Ys,!0),so(n,2)):[]})),Uo=Yi((function(e,t){var n=Qo(t);return Ys(n)&&(n=r),Ys(e)?ci(e,wi(t,1,Ys,!0),r,n):[]}));function qo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=gn(i+r,0)),Nt(e,so(t,3),r)}function Vo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=ma(n),o=n<0?gn(i+o,0):yn(o,i-1)),Nt(e,so(t,3),o,!0)}function zo(e){return null!=e&&e.length?wi(e,1):[]}function Go(e){return e&&e.length?e[0]:r}var Yo=Yi((function(e){var t=Wt(e,mr);return t.length&&t[0]===e[0]?Li(t):[]})),Ko=Yi((function(e){var t=Qo(e),n=Wt(e,mr);return t===Qo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Li(n,so(t,2)):[]})),Jo=Yi((function(e){var t=Qo(e),n=Wt(e,mr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Li(n,r,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Xo=Yi(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?qi(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,i=oi(e,t);return Vi(e,Wt(t,(function(e){return go(e,n)?+e:e})).sort(Ar)),i}));function ts(e){return null==e?e:Cn.call(e)}var ns=Yi((function(e){return ur(wi(e,1,Ys,!0))})),is=Yi((function(e){var t=Qo(e);return Ys(t)&&(t=r),ur(wi(e,1,Ys,!0),so(t,2))})),rs=Yi((function(e){var t=Qo(e);return t="function"==typeof t?t:r,ur(wi(e,1,Ys,!0),r,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Ys(e))return t=gn(e.length,t),!0})),$t(t,(function(t){return Wt(e,Dt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:Wt(n,(function(e){return gt(t,r,e)}))}var as=Yi((function(e,t){return Ys(e)?ci(e,t):[]})),us=Yi((function(e){return pr(Ct(e,Ys))})),ls=Yi((function(e){var t=Qo(e);return Ys(t)&&(t=r),pr(Ct(e,Ys),so(t,2))})),cs=Yi((function(e){var t=Qo(e);return t="function"==typeof t?t:r,pr(Ct(e,Ys),r,t)})),ds=Yi(os),fs=Yi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ss(e,n)}));function ps(e){var t=jn(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ms=eo((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return oi(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Un&&go(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:r}),new Hn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ws=Ir((function(e,t,n){Re.call(e,n)?++e[n]:ri(e,n,1)})),gs=Fr(qo),ys=Fr(Vo);function vs(e,t){return(Vs(e)?vt:di)(e,so(t,3))}function bs(e,t){return(Vs(e)?bt:fi)(e,so(t,3))}var Ss=Ir((function(e,t,n){Re.call(e,n)?e[n].push(t):ri(e,n,[t])})),Cs=Yi((function(e,t,n){var r=-1,o="function"==typeof t,s=Gs(e)?i(e.length):[];return di(e,(function(e){s[++r]=o?gt(t,e,n):Ii(e,t,n)})),s})),_s=Ir((function(e,t,n){ri(e,n,t)}));function As(e,t){return(Vs(e)?Wt:Di)(e,so(t,3))}var Ws=Ir((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Es=Yi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Hi(e,wi(t,1),[])})),Ts=Ot||function(){return ot.Date.now()};function Ls(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Kr(e,l,r,r,r,r,t)}function Is(e,t){var n;if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Os=Yi((function(e,t,n){var i=1;if(n.length){var r=tn(n,oo(Os));i|=u}return Kr(e,i,t,n,r)})),ks=Yi((function(e,t,n){var i=3;if(n.length){var r=tn(n,oo(ks));i|=u}return Kr(t,i,e,n,r)}));function Ns(e,t,n){var i,s,a,u,l,c,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(o);function m(t){var n=i,o=s;return i=s=r,d=t,u=e.apply(o,n)}function w(e){return d=e,l=Oo(y,t),f?m(e):u}function g(e){var n=e-c;return c===r||n>=t||n<0||p&&e-d>=a}function y(){var e=Ts();if(g(e))return v(e);l=Oo(y,function(e){var n=t-(e-c);return p?yn(n,a-(e-d)):n}(e))}function v(e){return l=r,h&&i?m(e):(i=s=r,u)}function b(){var e=Ts(),n=g(e);if(i=arguments,s=this,c=e,n){if(l===r)return w(c);if(p)return br(l),l=Oo(y,t),m(c)}return l===r&&(l=Oo(y,t)),u}return t=ga(t)||0,ta(n)&&(f=!!n.leading,a=(p="maxWait"in n)?gn(ga(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){l!==r&&br(l),d=0,i=c=s=l=r},b.flush=function(){return l===r?u:v(Ts())},b}var Rs=Yi((function(e,t){return li(e,1,t)})),Ps=Yi((function(e,t,n){return li(e,ga(t)||0,n)}));function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(o);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Ms.Cache||zn),n}function Fs(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)}}Ms.Cache=zn;var Ds=yr((function(e,t){var n=(t=1==t.length&&Vs(t[0])?Wt(t[0],Ut(so())):Wt(wi(t,1),Ut(so()))).length;return Yi((function(i){for(var r=-1,o=yn(i.length,n);++r<o;)i[r]=t[r].call(this,i[r]);return gt(e,this,i)}))})),xs=Yi((function(e,t){var n=tn(t,oo(xs));return Kr(e,u,r,t,n)})),js=Yi((function(e,t){var n=tn(t,oo(js));return Kr(e,64,r,t,n)})),Bs=eo((function(e,t){return Kr(e,256,r,r,r,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Hs=qr(Wi),Us=qr((function(e,t){return e>=t})),qs=Oi(function(){return arguments}())?Oi:function(e){return na(e)&&Re.call(e,"callee")&&!et.call(e,"callee")},Vs=i.isArray,zs=dt?Ut(dt):function(e){return na(e)&&Ai(e)==k};function Gs(e){return null!=e&&ea(e.length)&&!Xs(e)}function Ys(e){return na(e)&&Gs(e)}var Ks=pn||gu,Js=ft?Ut(ft):function(e){return na(e)&&Ai(e)==y};function Qs(e){if(!na(e))return!1;var t=Ai(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Xs(e){if(!ta(e))return!1;var t=Ai(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=pt?Ut(pt):function(e){return na(e)&&po(e)==C};function ra(e){return"number"==typeof e||na(e)&&Ai(e)==_}function oa(e){if(!na(e)||Ai(e)!=A)return!1;var t=ze(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==De}var sa=ht?Ut(ht):function(e){return na(e)&&Ai(e)==E},aa=mt?Ut(mt):function(e){return na(e)&&po(e)==T};function ua(e){return"string"==typeof e||!Vs(e)&&na(e)&&Ai(e)==L}function la(e){return"symbol"==typeof e||na(e)&&Ai(e)==I}var ca=wt?Ut(wt):function(e){return na(e)&&ea(e.length)&&!!Xe[Ai(e)]},da=qr(Fi),fa=qr((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Gs(e))return ua(e)?sn(e):Tr(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=po(e);return(t==C?Zt:t==T?nn:$a)(e)}function ha(e){return e?(e=ga(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=ha(e),n=t%1;return t==t?n?t-n:t:0}function wa(e){return e?si(ma(e),0,p):0}function ga(e){if("number"==typeof e)return e;if(la(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var n=he.test(e);return n||we.test(e)?nt(e.slice(2),n?2:8):pe.test(e)?f:+e}function ya(e){return Lr(e,Ra(e))}function va(e){return null==e?"":ar(e)}var ba=Or((function(e,t){if(Co(t)||Gs(t))Lr(t,Na(t),e);else for(var n in t)Re.call(t,n)&&ei(e,n,t[n])})),Sa=Or((function(e,t){Lr(t,Ra(t),e)})),Ca=Or((function(e,t,n,i){Lr(t,Ra(t),e,i)})),_a=Or((function(e,t,n,i){Lr(t,Na(t),e,i)})),Aa=eo(oi),Wa=Yi((function(e,t){e=Ae(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&yo(t[0],t[1],o)&&(i=1);++n<i;)for(var s=t[n],a=Ra(s),u=-1,l=a.length;++u<l;){var c=a[u],d=e[c];(d===r||$s(d,Oe[c])&&!Re.call(e,c))&&(e[c]=s[c])}return e})),Ea=Yi((function(e){return e.push(r,Qr),gt(Ma,r,e)}));function Ta(e,t,n){var i=null==e?r:Ci(e,t);return i===r?n:i}function La(e,t){return null!=e&&ho(e,t,Ti)}var Ia=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),tu(ru)),Oa=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]}),so),ka=Yi(Ii);function Na(e){return Gs(e)?Kn(e):Mi(e)}function Ra(e){return Gs(e)?Kn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var i in e)("constructor"!=i||!t&&Re.call(e,i))&&n.push(i);return n}(e)}var Pa=Or((function(e,t,n){Bi(e,t,n)})),Ma=Or((function(e,t,n,i){Bi(e,t,n,i)})),Fa=eo((function(e,t){var n={};if(null==e)return n;var i=!1;t=Wt(t,(function(t){return t=gr(t,e),i||(i=t.length>1),t})),Lr(e,no(e),n),i&&(n=ai(n,7,Xr));for(var r=t.length;r--;)lr(n,t[r]);return n})),Da=eo((function(e,t){return null==e?{}:function(e,t){return Ui(e,t,(function(t,n){return La(e,n)}))}(e,t)}));function xa(e,t){if(null==e)return{};var n=Wt(no(e),(function(e){return[e]}));return t=so(t),Ui(e,n,(function(e,n){return t(e,n[0])}))}var ja=Yr(Na),Ba=Yr(Ra);function $a(e){return null==e?[]:qt(e,Na(e))}var Ha=Pr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Qa(va(e).toLowerCase())}function qa(e){return(e=va(e))&&e.replace(ye,Kt).replace(Ve,"")}var Va=Pr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),za=Pr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Rr("toLowerCase"),Ya=Pr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Pr((function(e,t,n){return e+(n?" ":"")+Qa(t)})),Ja=Pr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Rr("toUpperCase");function Xa(e,t,n){return e=va(e),(t=n?r:t)===r?function(e){return Ke.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Za=Yi((function(e,t){try{return gt(e,r,t)}catch(e){return Qs(e)?e:new Se(e)}})),eu=eo((function(e,t){return vt(t,(function(t){t=xo(t),ri(e,t,Os(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Dr(),iu=Dr(!0);function ru(e){return e}function ou(e){return Pi("function"==typeof e?e:ai(e,1))}var su=Yi((function(e,t){return function(n){return Ii(n,e,t)}})),au=Yi((function(e,t){return function(n){return Ii(e,n,t)}}));function uu(e,t,n){var i=Na(t),r=Si(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Si(t,Na(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Xs(e);return vt(r,(function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),r=n.__actions__=Tr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Et([this.value()],arguments))})})),e}function lu(){}var cu=$r(Wt),du=$r(St),fu=$r(It);function pu(e){return vo(e)?Dt(xo(e)):function(e){return function(t){return Ci(t,e)}}(e)}var hu=Ur(),mu=Ur(!0);function wu(){return[]}function gu(){return!1}var yu,vu=Br((function(e,t){return e+t}),0),bu=zr("ceil"),Su=Br((function(e,t){return e/t}),1),Cu=zr("floor"),_u=Br((function(e,t){return e*t}),1),Au=zr("round"),Wu=Br((function(e,t){return e-t}),0);return jn.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},jn.ary=Ls,jn.assign=ba,jn.assignIn=Sa,jn.assignInWith=Ca,jn.assignWith=_a,jn.at=Aa,jn.before=Is,jn.bind=Os,jn.bindAll=eu,jn.bindKey=ks,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},jn.chain=ps,jn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===r)?1:gn(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=i(cn(o/t));s<o;)u[a++]=tr(e,s,s+=t);return u},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var o=e[t];o&&(r[i++]=o)}return r},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Et(Vs(n)?Tr(n):[n],wi(t,1))},jn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Wt(e,(function(e){if("function"!=typeof e[1])throw new Te(o);return[n(e[0]),e[1]]})):[],Yi((function(n){for(var i=-1;++i<t;){var r=e[i];if(gt(r[0],this,n))return gt(r[1],this,n)}}))},jn.conforms=function(e){return function(e){var t=Na(e);return function(n){return ui(n,e,t)}}(ai(e,1))},jn.constant=tu,jn.countBy=ws,jn.create=function(e,t){var n=Bn(e);return null==t?n:ii(n,t)},jn.curry=function e(t,n,i){var o=Kr(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},jn.curryRight=function e(t,n,i){var o=Kr(t,16,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},jn.debounce=Ns,jn.defaults=Wa,jn.defaultsDeep=Ea,jn.defer=Rs,jn.delay=Ps,jn.difference=$o,jn.differenceBy=Ho,jn.differenceWith=Uo,jn.drop=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=n||t===r?1:ma(t))<0?0:t,i):[]},jn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,0,(t=i-(t=n||t===r?1:ma(t)))<0?0:t):[]},jn.dropRightWhile=function(e,t){return e&&e.length?dr(e,so(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?dr(e,so(t,3),!0):[]},jn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&yo(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=ma(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:ma(i))<0&&(i+=o),i=n>i?0:wa(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},jn.filter=function(e,t){return(Vs(e)?Ct:mi)(e,so(t,3))},jn.flatMap=function(e,t){return wi(As(e,t),1)},jn.flatMapDeep=function(e,t){return wi(As(e,t),c)},jn.flatMapDepth=function(e,t,n){return n=n===r?1:ma(n),wi(As(e,t),n)},jn.flatten=zo,jn.flattenDeep=function(e){return null!=e&&e.length?wi(e,c):[]},jn.flattenDepth=function(e,t){return null!=e&&e.length?wi(e,t=t===r?1:ma(t)):[]},jn.flip=function(e){return Kr(e,512)},jn.flow=nu,jn.flowRight=iu,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},jn.functions=function(e){return null==e?[]:Si(e,Na(e))},jn.functionsIn=function(e){return null==e?[]:Si(e,Ra(e))},jn.groupBy=Ss,jn.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},jn.intersection=Yo,jn.intersectionBy=Ko,jn.intersectionWith=Jo,jn.invert=Ia,jn.invertBy=Oa,jn.invokeMap=Cs,jn.iteratee=ou,jn.keyBy=_s,jn.keys=Na,jn.keysIn=Ra,jn.map=As,jn.mapKeys=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,t(e,i,r),e)})),n},jn.mapValues=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,i,t(e,i,r))})),n},jn.matches=function(e){return xi(ai(e,1))},jn.matchesProperty=function(e,t){return ji(e,ai(t,1))},jn.memoize=Ms,jn.merge=Pa,jn.mergeWith=Ma,jn.method=su,jn.methodOf=au,jn.mixin=uu,jn.negate=Fs,jn.nthArg=function(e){return e=ma(e),Yi((function(t){return $i(t,e)}))},jn.omit=Fa,jn.omitBy=function(e,t){return xa(e,Fs(so(t)))},jn.once=function(e){return Is(2,e)},jn.orderBy=function(e,t,n,i){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(n=i?r:n)||(n=null==n?[]:[n]),Hi(e,t,n))},jn.over=cu,jn.overArgs=Ds,jn.overEvery=du,jn.overSome=fu,jn.partial=xs,jn.partialRight=js,jn.partition=Ws,jn.pick=Da,jn.pickBy=xa,jn.property=pu,jn.propertyOf=function(e){return function(t){return null==e?r:Ci(e,t)}},jn.pull=Xo,jn.pullAll=Zo,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qi(e,t,so(n,2)):e},jn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?qi(e,t,r,n):e},jn.pullAt=es,jn.range=hu,jn.rangeRight=mu,jn.rearg=Bs,jn.reject=function(e,t){return(Vs(e)?Ct:mi)(e,Fs(so(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],o=e.length;for(t=so(t,3);++i<o;){var s=e[i];t(s,i,e)&&(n.push(s),r.push(i))}return Vi(e,r),n},jn.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Yi(e,t=t===r?t:ma(t))},jn.reverse=ts,jn.sampleSize=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ma(t),(Vs(e)?Qn:Ji)(e,t)},jn.set=function(e,t,n){return null==e?e:Qi(e,t,n)},jn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Qi(e,t,n,i)},jn.shuffle=function(e){return(Vs(e)?Xn:er)(e)},jn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yo(e,t,n)?(t=0,n=i):(t=null==t?0:ma(t),n=n===r?i:ma(n)),tr(e,t,n)):[]},jn.sortBy=Es,jn.sortedUniq=function(e){return e&&e.length?or(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?or(e,so(t,2)):[]},jn.split=function(e,t,n){return n&&"number"!=typeof n&&yo(e,t,n)&&(t=n=r),(n=n===r?p:n>>>0)?(e=va(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ar(t))&&Xt(e)?vr(sn(e),0,n):e.split(t,n):[]},jn.spread=function(e,t){if("function"!=typeof e)throw new Te(o);return t=null==t?0:gn(ma(t),0),Yi((function(n){var i=n[t],r=vr(n,0,t);return i&&Et(r,i),gt(e,this,r)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},jn.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===r?1:ma(t))<0?0:t):[]},jn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=i-(t=n||t===r?1:ma(t)))<0?0:t,i):[]},jn.takeRightWhile=function(e,t){return e&&e.length?dr(e,so(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?dr(e,so(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Te(o);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Ns(e,t,{leading:i,maxWait:t,trailing:r})},jn.thru=hs,jn.toArray=pa,jn.toPairs=ja,jn.toPairsIn=Ba,jn.toPath=function(e){return Vs(e)?Wt(e,xo):la(e)?[e]:Tr(Do(va(e)))},jn.toPlainObject=ya,jn.transform=function(e,t,n){var i=Vs(e),r=i||Ks(e)||ca(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:ta(e)&&Xs(o)?Bn(ze(e)):{}}return(r?vt:vi)(e,(function(e,i,r){return t(n,e,i,r)})),n},jn.unary=function(e){return Ls(e,1)},jn.union=ns,jn.unionBy=is,jn.unionWith=rs,jn.uniq=function(e){return e&&e.length?ur(e):[]},jn.uniqBy=function(e,t){return e&&e.length?ur(e,so(t,2)):[]},jn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ur(e,r,t):[]},jn.unset=function(e,t){return null==e||lr(e,t)},jn.unzip=os,jn.unzipWith=ss,jn.update=function(e,t,n){return null==e?e:cr(e,t,wr(n))},jn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:cr(e,t,wr(n),i)},jn.values=$a,jn.valuesIn=function(e){return null==e?[]:qt(e,Ra(e))},jn.without=as,jn.words=Xa,jn.wrap=function(e,t){return xs(wr(t),e)},jn.xor=us,jn.xorBy=ls,jn.xorWith=cs,jn.zip=ds,jn.zipObject=function(e,t){return hr(e||[],t||[],ei)},jn.zipObjectDeep=function(e,t){return hr(e||[],t||[],Qi)},jn.zipWith=fs,jn.entries=ja,jn.entriesIn=Ba,jn.extend=Sa,jn.extendWith=Ca,uu(jn,jn),jn.add=vu,jn.attempt=Za,jn.camelCase=Ha,jn.capitalize=Ua,jn.ceil=bu,jn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ga(n))==n?n:0),t!==r&&(t=(t=ga(t))==t?t:0),si(ga(e),t,n)},jn.clone=function(e){return ai(e,4)},jn.cloneDeep=function(e){return ai(e,5)},jn.cloneDeepWith=function(e,t){return ai(e,5,t="function"==typeof t?t:r)},jn.cloneWith=function(e,t){return ai(e,4,t="function"==typeof t?t:r)},jn.conformsTo=function(e,t){return null==t||ui(e,t,Na(t))},jn.deburr=qa,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=Su,jn.endsWith=function(e,t,n){e=va(e),t=ar(t);var i=e.length,o=n=n===r?i:si(ma(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},jn.eq=$s,jn.escape=function(e){return(e=va(e))&&Y.test(e)?e.replace(z,Jt):e},jn.escapeRegExp=function(e){return(e=va(e))&&ne.test(e)?e.replace(te,"\\$&"):e},jn.every=function(e,t,n){var i=Vs(e)?St:pi;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},jn.find=gs,jn.findIndex=qo,jn.findKey=function(e,t){return kt(e,so(t,3),vi)},jn.findLast=ys,jn.findLastIndex=Vo,jn.findLastKey=function(e,t){return kt(e,so(t,3),bi)},jn.floor=Cu,jn.forEach=vs,jn.forEachRight=bs,jn.forIn=function(e,t){return null==e?e:gi(e,so(t,3),Ra)},jn.forInRight=function(e,t){return null==e?e:yi(e,so(t,3),Ra)},jn.forOwn=function(e,t){return e&&vi(e,so(t,3))},jn.forOwnRight=function(e,t){return e&&bi(e,so(t,3))},jn.get=Ta,jn.gt=Hs,jn.gte=Us,jn.has=function(e,t){return null!=e&&ho(e,t,Ei)},jn.hasIn=La,jn.head=Go,jn.identity=ru,jn.includes=function(e,t,n,i){e=Gs(e)?e:$a(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=gn(r+n,0)),ua(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Rt(e,t,n)>-1},jn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=gn(i+r,0)),Rt(e,t,r)},jn.inRange=function(e,t,n){return t=ha(t),n===r?(n=t,t=0):n=ha(n),function(e,t,n){return e>=yn(t,n)&&e<gn(t,n)}(e=ga(e),t,n)},jn.invoke=ka,jn.isArguments=qs,jn.isArray=Vs,jn.isArrayBuffer=zs,jn.isArrayLike=Gs,jn.isArrayLikeObject=Ys,jn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Ai(e)==g},jn.isBuffer=Ks,jn.isDate=Js,jn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},jn.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||ca(e)||qs(e)))return!e.length;var t=po(e);if(t==C||t==T)return!e.size;if(Co(e))return!Mi(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return ki(e,t)},jn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?ki(e,t,r,n):!!i},jn.isError=Qs,jn.isFinite=function(e){return"number"==typeof e&&hn(e)},jn.isFunction=Xs,jn.isInteger=Zs,jn.isLength=ea,jn.isMap=ia,jn.isMatch=function(e,t){return e===t||Ni(e,t,uo(t))},jn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ni(e,t,uo(t),n)},jn.isNaN=function(e){return ra(e)&&e!=+e},jn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ri(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=ra,jn.isObject=ta,jn.isObjectLike=na,jn.isPlainObject=oa,jn.isRegExp=sa,jn.isSafeInteger=function(e){return Zs(e)&&e>=-9007199254740991&&e<=d},jn.isSet=aa,jn.isString=ua,jn.isSymbol=la,jn.isTypedArray=ca,jn.isUndefined=function(e){return e===r},jn.isWeakMap=function(e){return na(e)&&po(e)==O},jn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Ai(e)},jn.join=function(e,t){return null==e?"":mn.call(e,t)},jn.kebabCase=Va,jn.last=Qo,jn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ma(n))<0?gn(i+o,0):yn(o,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Nt(e,Mt,o,!0)},jn.lowerCase=za,jn.lowerFirst=Ga,jn.lt=da,jn.lte=fa,jn.max=function(e){return e&&e.length?hi(e,ru,Wi):r},jn.maxBy=function(e,t){return e&&e.length?hi(e,so(t,2),Wi):r},jn.mean=function(e){return Ft(e,ru)},jn.meanBy=function(e,t){return Ft(e,so(t,2))},jn.min=function(e){return e&&e.length?hi(e,ru,Fi):r},jn.minBy=function(e,t){return e&&e.length?hi(e,so(t,2),Fi):r},jn.stubArray=wu,jn.stubFalse=gu,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=_u,jn.nth=function(e,t){return e&&e.length?$i(e,ma(t)):r},jn.noConflict=function(){return ot._===this&&(ot._=xe),this},jn.noop=lu,jn.now=Ts,jn.pad=function(e,t,n){e=va(e);var i=(t=ma(t))?on(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Hr(dn(r),n)+e+Hr(cn(r),n)},jn.padEnd=function(e,t,n){e=va(e);var i=(t=ma(t))?on(e):0;return t&&i<t?e+Hr(t-i,n):e},jn.padStart=function(e,t,n){e=va(e);var i=(t=ma(t))?on(e):0;return t&&i<t?Hr(t-i,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(va(e).replace(ie,""),t||0)},jn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yo(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ha(e),t===r?(t=e,e=0):t=ha(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=Sn();return yn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return zi(e,t)},jn.reduce=function(e,t,n){var i=Vs(e)?Tt:jt,r=arguments.length<3;return i(e,so(t,4),n,r,di)},jn.reduceRight=function(e,t,n){var i=Vs(e)?Lt:jt,r=arguments.length<3;return i(e,so(t,4),n,r,fi)},jn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ma(t),Gi(va(e),t)},jn.replace=function(){var e=arguments,t=va(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(e,t,n){var i=-1,o=(t=gr(t,e)).length;for(o||(o=1,e=r);++i<o;){var s=null==e?r:e[xo(t[i])];s===r&&(i=o,s=n),e=Xs(s)?s.call(e):s}return e},jn.round=Au,jn.runInContext=e,jn.sample=function(e){return(Vs(e)?Jn:Ki)(e)},jn.size=function(e){if(null==e)return 0;if(Gs(e))return ua(e)?on(e):e.length;var t=po(e);return t==C||t==T?e.size:Mi(e).length},jn.snakeCase=Ya,jn.some=function(e,t,n){var i=Vs(e)?It:nr;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},jn.sortedIndex=function(e,t){return ir(e,t)},jn.sortedIndexBy=function(e,t,n){return rr(e,t,so(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=ir(e,t);if(i<n&&$s(e[i],t))return i}return-1},jn.sortedLastIndex=function(e,t){return ir(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return rr(e,t,so(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ir(e,t,!0)-1;if($s(e[n],t))return n}return-1},jn.startCase=Ka,jn.startsWith=function(e,t,n){return e=va(e),n=null==n?0:si(ma(n),0,e.length),t=ar(t),e.slice(n,n+t.length)==t},jn.subtract=Wu,jn.sum=function(e){return e&&e.length?Bt(e,ru):0},jn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},jn.template=function(e,t,n){var i=jn.templateSettings;n&&yo(e,t,n)&&(t=r),e=va(e),t=Ca({},t,i,Jr);var o,s,a=Ca({},t.imports,i.imports,Jr),u=Na(a),l=qt(a,u),c=0,d=t.interpolate||ve,f="__p += '",p=We((t.escape||ve).source+"|"+d.source+"|"+(d===Q?de:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),h="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(p,(function(t,n,i,r,a,u){return i||(i=r),f+=e.slice(c,u).replace(be,Qt),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var m=Re.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(H,""):f).replace(U,"$1").replace(q,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var w=Za((function(){return Ce(u,h+"return "+f).apply(r,l)}));if(w.source=f,Qs(w))throw w;return w},jn.times=function(e,t){if((e=ma(e))<1||e>d)return[];var n=p,i=yn(e,p);t=so(t),e-=p;for(var r=$t(i,t);++n<e;)t(n);return r},jn.toFinite=ha,jn.toInteger=ma,jn.toLength=wa,jn.toLower=function(e){return va(e).toLowerCase()},jn.toNumber=ga,jn.toSafeInteger=function(e){return e?si(ma(e),-9007199254740991,d):0===e?e:0},jn.toString=va,jn.toUpper=function(e){return va(e).toUpperCase()},jn.trim=function(e,t,n){if((e=va(e))&&(n||t===r))return Ht(e);if(!e||!(t=ar(t)))return e;var i=sn(e),o=sn(t);return vr(i,zt(i,o),Gt(i,o)+1).join("")},jn.trimEnd=function(e,t,n){if((e=va(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,0,Gt(i,sn(t))+1).join("")},jn.trimStart=function(e,t,n){if((e=va(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,zt(i,sn(t))).join("")},jn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ma(t.length):n,i="omission"in t?ar(t.omission):i}var s=(e=va(e)).length;if(Xt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var u=n-on(i);if(u<1)return i;var l=a?vr(a,0,u).join(""):e.slice(0,u);if(o===r)return l+i;if(a&&(u+=l.length-u),sa(o)){if(e.slice(u).search(o)){var c,d=l;for(o.global||(o=We(o.source,va(fe.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;l=l.slice(0,f===r?u:f)}}else if(e.indexOf(ar(o),u)!=u){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+i},jn.unescape=function(e){return(e=va(e))&&G.test(e)?e.replace(V,un):e},jn.uniqueId=function(e){var t=++Pe;return va(e)+t},jn.upperCase=Ja,jn.upperFirst=Qa,jn.each=vs,jn.eachRight=bs,jn.first=Go,uu(jn,(yu={},vi(jn,(function(e,t){Re.call(jn.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),jn.VERSION="4.17.21",vt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),vt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===r?1:gn(ma(n),0);var i=this.__filtered__&&!t?new Un(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,p),type:e+(i.__dir__<0?"Right":"")}),i},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),vt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=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__||i,t}})),vt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),vt(["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(ru)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Yi((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Ii(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Fs(so(e)))},Un.prototype.slice=function(e,t){e=ma(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!==r&&(n=(t=ma(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)},vi(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=jn[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(jn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,u=t instanceof Un,l=a[0],c=u||Vs(t),d=function(e){var t=o.apply(jn,Et([e],a));return i&&f?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=s&&!f,m=u&&!p;if(!s&&c){t=m?t:new Un(this);var w=e.apply(t,a);return w.__actions__.push({func:hs,args:[d],thisArg:r}),new Hn(w,f)}return h&&m?e.apply(this,a):(w=this.thru(d),h?i?w.value()[0]:w.value():w)})})),vt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Le[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Vs(r)?r:[],e)}return this[n]((function(n){return t.apply(Vs(n)?n:[],e)}))}})),vi(Un.prototype,(function(e,t){var n=jn[t];if(n){var i=n.name+"";Re.call(On,i)||(On[i]=[]),On[i].push({name:t,func:n})}})),On[xr(r,2).name]=[{name:"wrapper",func:r}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Tr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Tr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Tr(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=Vs(e),i=t<0,r=n?e.length:0,o=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yn(t,e+s);break;case"takeRight":e=gn(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=o.start,a=o.end,u=a-s,l=i?a:s-1,c=this.__iteratees__,d=c.length,f=0,p=yn(u,this.__takeCount__);if(!n||!i&&r==u&&p==u)return fr(e,this.__actions__);var h=[];e:for(;u--&&f<p;){for(var m=-1,w=e[l+=t];++m<d;){var g=c[m],y=g.iteratee,v=g.type,b=y(w);if(2==v)w=b;else if(!b){if(1==v)continue e;break e}}h[f++]=w}return h},jn.prototype.at=ms,jn.prototype.chain=function(){return ps(this)},jn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===r&&(this.__values__=pa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},jn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var i=Bo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},jn.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:r}),new Hn(t,this.__chain__)}return this.thru(ts)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return fr(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,st&&(jn.prototype[st]=function(){return this}),jn}();ot._=ln,(i=function(){return ln}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},54883:(e,t,n)=>{var i=n(25835);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},98253:(e,t,n)=>{var i=n(158);e.exports=function(){return i.Date.now()}},75892:(e,t,n)=>{var i=n(11241),r=n(39169)((function(e,t){return null==e?{}:i(e,t)}));e.exports=r},59174:e=>{e.exports=function(){return[]}},30647:e=>{e.exports=function(){return!1}},38172:(e,t,n)=>{var i=n(76897),r=n(23619);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),i(e,t,{leading:o,maxWait:t,trailing:s})}},95053:(e,t,n)=>{var i=n(12383),r=n(23619),o=n(81878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):s.test(e)?NaN:+e}},33270:(e,t,n)=>{var i=n(80430);e.exports=function(e){return null==e?"":i(e)}},42169:(e,t,n)=>{"use strict";const i=n(14561);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new i;let n=0;const r=async(e,i,...r)=>{n++;const o=(async()=>e(...r))();i(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(i,...o)=>new Promise((s=>{((i,o,...s)=>{t.enqueue(r.bind(null,i,o,...s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(i,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},88021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var i=n(33034);class r extends Error{constructor(e){super(e),this.name="TimeoutError"}}class o{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){var n;const i={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&(null===(n=this._queue[this.size-1])||void 0===n?void 0:n.priority)>=t.priority)return void this._queue.push(i);const r=function(e,t,n){let i=0,r=e.length;for(;r>0;){const n=Math.trunc(r/2);let s=i+n;o=e[s],t.priority-o.priority<=0?(i=++s,r-=n+1):r=n}var o;return i}(this._queue,i);this._queue.splice(r,0,i)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}const s=()=>{},a=new r;class u extends i{constructor(e){var t,n,i,r;if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:o,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(r=null===(i=e.interval)||void 0===i?void 0:i.toString())&&void 0!==r?r:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const r=void 0===this._timeout&&void 0===t.timeout?e():function(e,t,n,i){let r;const o=new Promise(((o,s)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");t!==Number.POSITIVE_INFINITY?(i={customTimers:{setTimeout,clearTimeout},...i},r=i.customTimers.setTimeout.call(void 0,(()=>{try{o(n())}catch(e){s(e)}}),t),(async()=>{try{o(await e)}catch(e){s(e)}finally{i.customTimers.clearTimeout.call(void 0,r)}})()):o(e)}));return o.clear=()=>{clearTimeout(r),r=void 0},o}(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&i(a)})),o=await r;n(o),this.emit("completed",o)}catch(e){i(e),this.emit("error",e)}this._next()}),t),this._tryToStartAnother(),this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onSizeLessThan(e){if(!(this._queue.size<e))return new Promise((t=>{const n=()=>{this._queue.size<e&&(this.removeListener("next",n),t())};this.on("next",n)}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}},50586:(e,t,n)=>{var i=n(36589),r=n(22708),o=r;o.v1=i,o.v4=r,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 i=n||0,r=t;return r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]}},76338:(e,t,n)=>{var i,r=n.g.crypto||n.g.msCrypto;if(r&&r.getRandomValues){var o=new Uint8Array(16);i=function(){return r.getRandomValues(o),o}}if(!i){var s=new Array(16);i=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=i},36589:(e,t,n)=>{var i=n(76338),r=n(98726),o=i(),s=[1|o[0],o[1],o[2],o[3],o[4],o[5]],a=16383&(o[6]<<8|o[7]),u=0,l=0;e.exports=function(e,t,n){var i=t&&n||0,o=t||[],c=void 0!==(e=e||{}).clockseq?e.clockseq:a,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,p=d-u+(f-l)/1e4;if(p<0&&void 0===e.clockseq&&(c=c+1&16383),(p<0||d>u)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,l=f,a=c;var h=(1e4*(268435455&(d+=122192928e5))+f)%4294967296;o[i++]=h>>>24&255,o[i++]=h>>>16&255,o[i++]=h>>>8&255,o[i++]=255&h;var m=d/4294967296*1e4&268435455;o[i++]=m>>>8&255,o[i++]=255&m,o[i++]=m>>>24&15|16,o[i++]=m>>>16&255,o[i++]=c>>>8|128,o[i++]=255&c;for(var w=e.node||s,g=0;g<6;++g)o[i+g]=w[g];return t||r(o)}},22708:(e,t,n)=>{var i=n(76338),r=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||i)();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||r(s)}},14561:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},34361:function(e,t,n){"use strict";var i,r,o,s,a,u,l,c,d,f,p,h,m,w=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},g=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},y=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const v=n(98832),b=y(n(72551)),S=n(6192),C=n(81298),_=n(81298),A=y(n(60306));class W{constructor(e){i.set(this,void 0),r.set(this,void 0),w(this,i,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};g(this,i,"f").transmit(C.HEARTBEAT_CHANNEL,t),w(this,r,setInterval((()=>{g(this,i,"f").transmit(C.HEARTBEAT_CHANNEL,t)}),C.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(g(this,r,"f")),w(this,r,void 0,"f")}}i=new WeakMap,r=new WeakMap;class E{constructor(e,t,n="app"){o.set(this,void 0),w(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){g(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return g(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return g(this,o,"f").channelAddContextListener(this.id,e,t)}}o=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){s.set(this,!1),a.set(this,void 0),u.set(this,!1),l.set(this,""),c.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),d.set(this,{}),f.set(this,{}),p.set(this,[]),h.set(this,void 0),m.set(this,void 0),w(this,h,e,"f"),w(this,a,new W(e),"f"),w(this,m,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:g(this,l,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(g(this,f,"f")[t?.type]??[]).concat(g(this,f,"f")["*"]??[]).forEach((({handler:n,channel:i})=>{e.meta.channel!==i&&(e.meta.channel||i)||n(t)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,i=g(this,d,"f")[t];n&&(i||[]).forEach((e=>e(n)))}handleIncoming(e){switch(b.default.log("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e)}}releaseQueue(){const e=e=>(void 0!==e?.meta?.uuid&&(e.meta.uuid=g(this,l,"f")),e);g(this,p,"f").forEach((async t=>{const{message:n,handler:i,resolve:r}=t,{err:o,response:s}=await g(this,h,"f").query(C.SERVER_CHANNEL,e(n),i);r({err:o,receiveMessage:s?.data})})),w(this,p,[],"f")}async connectWhenFSBLIsReady(){g(this,u,"f")||(w(this,u,!0,"f"),await g(this,m,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(g(this,s,"f")){const{err:i,response:r}=await g(this,h,"f").query(C.SERVER_CHANNEL,e,t);n({err:i,receiveMessage:r?.data})}else g(this,p,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=g(this,m,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;b.default.log(`fdc3.connect StartupData for ${t}`,e),w(this,l,t,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:g(this,c,"f"),windowName:t,authenticationToken:n}};g(this,h,"f").query(C.SERVER_CHANNEL,i,(e=>{e?b.default.error("connect error",e):(g(this,h,"f").addResponder(g(this,c,"f"),((e,t)=>{if(e||!t){const t=_.errorAsString(e??"No request received on responder");b.default.error(`FinsembleDesktopAgent can't listen on channel ${g(this,c,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),w(this,s,!0,"f"),this.releaseQueue())})),g(this,a,"f").start(g(this,l,"f"))}stop(){g(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{g(this,h,"f").removeResponder(g(this,c,"f")),w(this,s,!1,"f")}))}async getCurrentContext(e){const t={type:"currentContextRequest",meta:this.meta(),payload:{contextType:e}},{err:n,receiveMessage:i}=await this.exchange(t);return n?null:"currentContext"===i?.type&&i.payload.context?i.payload.context:null}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:i,receiveMessage:r}=await this.exchange(n);return i?null:"currentContext"===r?.type?r.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t}};this.exchange(n)}async getSystemChannels(){const e={type:"systemChannelRequest",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e);return t?[]:("systemChannels"===n?.type?n?.payload?.channels:[]).map((e=>new E(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw v.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:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw v.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),i=n;if(i.payload.error)throw i.payload.error;return i.payload.intents||[]}async raiseIntent(e,t,n){const i={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:r,receiveMessage:o}=await this.exchange(i),s=o;if(r)throw v.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:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw v.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){g(this,d,"f")[e]=_.mmAdd(g(this,d,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),g(this,d,"f")[e]=_.mmRemove(g(this,d,"f"),e,t)}}}channelAddContextListener(e,t,n){const i=n?t:"*";n||(n=t);const r={handler:n,channel:e};g(this,f,"f")[i]=_.mmAdd(g(this,d,"f"),i,r);let o={type:"subscribeContext",meta:this.meta(),payload:{contextType:i}};return e&&(o.meta.channel=e),this.exchange(o),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:i}};e&&(t.meta.channel=e),g(this,f,"f")[i]=_.mmRemove(g(this,d,"f"),i,r),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new E(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),i=n;if(t)throw t;if(i.payload.error)throw i.payload.error;if(!i.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return i.payload.data.map((e=>new E(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:A.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,m=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],i=e?n.concat(e):n;return Array.from(new Set(i))},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 i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const r=i(n(39319)),o=n(67580),s=n(51742),a=n(16925),u=n(50586),l=n(6192),c=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",i=t.name??document?.location?.href??`Unknown window-${u.v4()}`,d=o.getManifestFromStartupData(e)??{},f=o.getRouterConfig({windowName:i,systemManifest:d});await r.default.start(f);const p=a.Startup.getInstance();p.setStartupData({windowName:i,authenticationToken:{authenticationKeyType:"unauthenticated",meta:{name:n}}}),l.Globals.fdc3=new c.FinsembleDesktopAgent({routerClient:r.default,startup:p}),p.ready()}async stopApp(){r.default.stop()}}},67580:function(e,t,n){"use strict";var i=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 r=i(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 r.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,i=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&&i;return r.default.system.debug(`Transport crossDomain=${u} (${n}:${i}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=e?.finsemble,{sameDomainTransport:i="SharedWorker",crossDomainTransport:o="IPCBus"}=n??{},s=u(t)?o:i;return r.default.system.log(`Transport Info: Selected=${s} SameDomainDefault=${i} CrossDomainDefault=${o}`),console.log(`Transport Info: Selected=${s} SameDomainDefault=${i} CrossDomainDefault=${o}`),s},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:i})=>n?((e,n)=>{if(r.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const i=e.finsemble,r=i?.router?.transportSettings??i?.IAC??{},o=i?.notificationURL??`${i.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:i.moduleRoot,transportName:t.getRecommendedTransport(e),transportSettings:r,notificationURL:o}}return r.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...a,windowName:n}})(n,e):{...a,windowName:e,transportSettings:i??{}},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 i=n(81298),r=n(6192),o=n(50586),s=n(4971);class a{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:i.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()})),r.Globals.dispatchEvent&&r.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=a,a.instance=null},17348:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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)),l=s(n(72551)),c=window;t.default=class{constructor(e,t){this.values={},this.listeners=[],this.registeredDispatchListeners=[],this.mapping={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e&&l.default.system.error("DistributedStoreClient",e),!t.data.store)return;t.data.field||(t.data.field=null);const n=this.name+(t.data.field?`.${t.data.field}`:""),i=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(n,i)},this.routerClient=t,this.isGlobal=e.global,this.name=e.store?e.store:"finsemble",e.values&&(this.values=e.values),this.lst=this.listeners,u.initObject(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,this.handleDispatchedMessages.bind(this))}handleDispatchedMessages(e,t){for(let e=0;e<this.registeredDispatchListeners.length;e++)this.registeredDispatchListeners[e](t.data)}setValue(e,t){if(e.field||l.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||l.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};return c.distributedStoreClient.routerClient.query("storeService.setValue",n,(e=>{if(t)return t(e)}))}const n=u.checkForObjectChange(this.values,e.field,this.mapping);return u.setPath(this.values,e.field,e.value),u.mapField(this.values,e.field,this.mapping),n&&this.sendRemovals(n),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t?t(null):null}publishObjectUpdates(e,t){const n=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,u.byString(this.values,e)),e=n[e]}sendRemovals(e){for(let t=0;t<e.length;t++)this.triggerListeners(`${this.name}.${e[t]}`,u.byString(this.values,e[t]))}setValues(e,t){return e?Array.isArray(e)?void a.each(e,((e,t)=>{this.setValue(e,t)}),(e=>t?t(e):null)):l.default.system.error("DistributedStore.setValues:params must be an array"):l.default.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return t?t("no field provided"):"no field provided";if(this.isGlobal)return this.getGlobalValue(e,t);const n=u.byString(this.values,e.field);return void 0!==n?t?t(null,n):n:t?t("couldn't find a value"):null}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return this.getValue(e,t);if(this.isGlobal)return this.getGlobalValues(e,t);const n={};for(let t=0;t<e.length;t++){const i=e[t],r="string"==typeof i?i:i.field,o=u.byString(this.values,r);n[r]=o}return t?t(null,n):n}getGlobalValue(e,t){c.distributedStoreClient.routerClient.query("storeService.getValue",{store:this.name,field:e.field},((e,n)=>e?t(e):t(e,n.data)))}getGlobalValues(e,t){c.distributedStoreClient.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,n)=>e?t(e):t(e,n.data)))}removeValue(e,t){if(!e.field){if(void 0===e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");a.map(e,this.removeValue,((e,n)=>t(e,n)))}destroy(e){const t={store:this.name,global:this.isGlobal};c.distributedStoreClient.removeStore(t,(t=>t?e(t):e(null,!0)))}changeSub(e){this.subs||(this.subs=[]),this.subs[e]||(this.isGlobal&&c.distributedStoreClient.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,n){"function"==typeof e&&(t=e,e={});let{field:i}=e;const r=this.name+(i?`.${i}`:"");return this.listeners[r]?this.listeners[r].push(t):this.listeners[r]=[t],this.changeSub(r),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 r=null;const o=e[n];var i;"string"==typeof o?r=o:o.field&&(({field:r}=o),i=e[n].listener);const s=this.name+(r?`.${r}`:"");i||t&&"function"==typeof t&&(i=t),this.listeners[s]?this.listeners[s].push(i):this.listeners[s]=[i],this.changeSub(s)}return n?n():null}removeListener(e,t,n){"function"==typeof e&&(n=t,t=e,e={});let{field:i}=e;const r=this.name+(i?`.${i}`:"");if(this.listeners[r])for(let e=0;e<this.listeners[r].length;e++)if(this.listeners[r][e]===t)return this.listeners[r].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 i=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var r;"string"==typeof s?o=s:s.field&&(({field:o}=s),r=e[n].listener);const a=this.name+(o?`.${o}`:"");if(!r){if(!t||"function"!=typeof t)continue;r=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===r&&(this.listeners[a].splice(e,1),i++)}return i<e.length?n("All listeners could not be found",!1):n?n(null,!0):null}triggerListeners(e,t){if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?(l.default.system.debug("DistributedStore.triggerListeners",e,t),this.listeners[e][n](null,{field:e,value:t})):l.default.system.warn("DistributedStoreClient:triggerListeners: listener is not a function",e,n,this.listeners[e][n])}}},72669:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const r=i(n(39319)),o=i(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=r.default}}},70010:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(57664),o=i(n(13712)),s=n(72669),a=i(n(5020)),u=i(n(72551));class l extends s._BaseClient{constructor(e){super(e),this.listeners=[],this.changeSub=e=>{this.subs||(this.subs={}),this.subs[e]||(this.routerClient.query("configService.addListener",e,(t=>{t&&u.default.system.error("Error adding listener to config service",t),this.routerClient.subscribe(e,this.handleChanges)})),this.subs[e]=!0)},this.handleChanges=(e,t)=>{e&&u.default.system.error(e),t.data.field||(t.data.field=null);const n=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(t.data.field?t.data.field:"configService",n)},this.triggerListeners=(e,t)=>{if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?this.listeners[e][n](null,{field:e,value:t}):u.default.system.warn("ConfigClient:triggerListeners: listener is not a function",e)},this.set=(e,t)=>{u.default.system.debug("ConfigClient.Set",e),"function"==typeof e?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.set",e,((e,n)=>{t(e,n?n.data:null)}))},this.processAndSet=this.processAndSet.bind(this),this.getValue=this.getValue.bind(this),this.getValues=this.getValues.bind(this),this.setValue=this.setValue.bind(this),this.setValues=this.setValues.bind(this),this.removeValue=this.removeValue.bind(this),this.removeValues=this.removeValues.bind(this),this.addListener=this.addListener.bind(this),this.addListeners=this.addListeners.bind(this),this.removeListener=this.removeListener.bind(this),this.removeListeners=this.removeListeners.bind(this),this.setPreference=this.setPreference.bind(this),this.getPreferences=this.getPreferences.bind(this),this.unsetPreference=this.unsetPreference.bind(this)}getValue(e,t=Function.prototype){return"string"==typeof e&&(e={field:e}),new Promise(((n,i)=>{if(!e.field){const e="no field provided";return i(e),t(e)}this.routerClient.query("configService.getValue",{field:e.field},((e,r)=>e?(i(e),t(e)):(n({err:e,data:r.data}),t(e,r.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,i)=>e?t(e):(n({err:e,data:i.data}),t(e,i.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");r.map(e,this.removeValue,((e,n)=>t(e,n)))}addListener(e,t,n){let i=null;"function"==typeof e&&(t=e,e={field:i}),({field:i}=e);const r="configService"+(i?`.${i}`:"");return this.listeners[r]?this.listeners[r].push(t):this.listeners[r]=[t],this.changeSub(r),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 r=null;const o=e[n];var i;"string"==typeof o?r=o:o.field&&(({field:r}=o),i=o.listener);const s="configService"+(r?`.${r}`:"");i||t&&"function"==typeof t&&(i=t),this.listeners[s]?this.listeners[s].push(i):this.listeners[s]=[i],this.changeSub(s)}return n?n():null}removeListener(e,t,n){let i=null;"function"==typeof e&&(n=t,t=e,e={field:i}),({field:i}=e);const r=this.name+(i?`.${i}`:"");if(this.listeners[r])for(let e=0;e<this.listeners[r].length;e++)if(this.listeners[r][e]===t)return this.listeners[r].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 i=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var r;"string"==typeof s?o=s:s.field&&(({field:o}=s),r=e[n].listener);const a="configService"+(o?`.${o}`:"");if(!r){if(!t||"function"!=typeof t)continue;r=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===r&&(this.listeners[a].pop(n),i++)}return i<e.length?n?.("All listeners could not be found",!1):n?n(null,!0):null}get(e,t){u.default.system.debug("ConfigClient.Get",e),u.default.system.deprecated("This functionality has been deprecated. It will be removed in a future Finsemble release. Use getValue instead.",e),1===arguments.length?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.get",e,((e,n)=>{t(e,n?n.data:null)}))}processAndSet(e,t){if(u.default.system.debug("ConfigClient.processAndSet",e),o.default.args(e,"object",t,"function=")&&o.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";u.default.system.warn("ConfigClient.processAndSet:",e),t&&t(e,null)}else this.routerClient.query("config.processAndSet",e,((e,n)=>{t&&t(e,n?n.data:null)}))}setPreference(e,t){this.routerClient.query("PreferencesService.setPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}async getPreferences(e){await a.default.waitForStartup("preferencesService"),this.routerClient.query("PreferencesService.getPreferences",{},((t,n)=>{u.default.system.debug("ConfigClient.getPreferences response",n),e&&e(t,n?n.data:null)}))}async unsetPreference(e,t){u.default.system.debug("ConfigClient.unsetPreference",e),this.routerClient.query("PreferencesService.unsetPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}}const c=new l({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=c},43190:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(72669),o=i(n(17348));let s;const a=window;let u;const l={};function c(e,t){return u.routerClient.query("storeService.getStore",e,(function(e,n){return e?t(e):t(e,new s(n.data,u.routerClient))}))}function d(e,t){u.routerClient.query("storeService.removeStore",e,((e,n)=>t(e,!e&&n.data)))}class f extends r._BaseClient{constructor(e){super(e),this.load=function(e){e()},u=this,this.ls=l}getStore(e,t){return e.global?c(e,t):e.store&&l[e.store]?t(null,l[e.store]):c(e,t)}createStore(e,t=Function.prototype){let n=new Promise(((n,i)=>{if(e.global)return this.routerClient.query("storeService.createStore",e,((e,r)=>{if(e)return i(e),t(e);const o=new s(r.data,u.routerClient);return n({err:e,data:o}),t(e,o)}));if(l[e.store])return n({err:null,data:l[e.store]}),t(null,l[e.store]);const r=new s(e,u.routerClient);return l[r.name]=r,n({err:null,data:r}),t(null,r)}));return n.catch((e=>{console.log(e)})),n}removeStore(e,t){return e.global?d(e,t):l[e.store]?(delete l[e.store],t(null,!0)):void d(e,t)}}var p=new f({startupDependencies:{},onReady(e){s=o.default,p.load(e)},name:"distributedStoreClient"});a.distributedStoreClient=p,t.default=p},68718:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(5939),o=n(72669),s=i(n(39319)),a=i(n(72551)),u=n(87063).F,l=window,c=new r.EventEmitter;function d(e,t=u){const n=[];return e.keys.forEach((e=>{if("string"!=typeof e)return a.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const i=t[e];if(!i)return a.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);n.push(i)})),n}const f=function(e){this.cb=e,this.shift=!1,this.ctrl=!1,this.cmd=!1,this.capsLock=!1,this.initialize()};f.prototype.keyup=function(e){switch(e.key){case"Shift":return this.shift=!1,void this.cb({key:e.key,e,keystroke:this});case"Control":case"Alt":return this.ctrl=!1,void this.cb({key:e.key,e,keystroke:this});case"Meta":case"Win":return this.cmd=!1,void this.cb({key:e.key,e,keystroke:this})}this.key&&this.cb({key:this.key,e,keystroke:this})},f.prototype.keydown=function(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.cb({key:e.key,e,keystroke:this})}},f.prototype.keypress=function(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)},f.prototype.initialize=function(){const e=this;document.addEventListener("keyup",(t=>{e.keyup(t)})),document.addEventListener("keydown",(t=>{e.downValue=t.key,e.keydown(t)})),document.addEventListener("keypress",(t=>{e.keypress(t)})),window.addEventListener("blur",(t=>{e.ctrl=!1,e.cb({key:"Control",e:t,keystroke:e})}))};const p=[];class h extends o._BaseClient{constructor(e){super(e),this.onClose=e=>{this.removeAllHotkeys(e)},this.keyMap=u,this.listenForHotkeys=this.listenForHotkeys.bind(this),this.routerClient=s.default,this.localListeners={}}addLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addLocalHotkey"),a.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e);const i=d({keys:e}).sort().toString(),r=()=>{document.hasFocus()&&t()};this.localListeners[i]||(this.localListeners[i]={}),this.localListeners[i][t]=r,c.addListener(i,r),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:i,windowName:this.windowName},n)}addBrowserHotkey(e,t){this.KeyStroke||(this.KeyStroke=new f((e=>{const{key:t,keystroke:n}=e,i=[t];n.ctrl&&i.push("control"),n.shift&&i.push("shift"),n.alt&&i.push("alt"),n.cmd&&i.push("command");const r=i.sort().toString();p.forEach((e=>{const t=e.keyString.toUpperCase(),n=r.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))})));const n=d({keys:e}).sort().toString();p.push({keyString:n,handler:t})}removeLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeLocalHotkey"),a.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e);const i=d({keys:e}).sort().toString(),r=this.localListeners[i][t];c.removeListener(i,r),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:i,windowName:this.windowName},n)}addGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addGlobalHotkey"),a.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const i=d({keys:e}).sort().join("+");c.addListener(i,t),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:i,windowName:this.windowName},n)}removeGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeGlobalHotkey"),a.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const i=d({keys:e}).sort().join("+");c.removeListener(i,t),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:i,windowName:this.windowName},n)}listenForHotkeys(){const e=this;this.routerClient.addListener("HotkeyTriggered",((t,n)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):n.data.windows.includes(e.windowName)&&c.emit(n.data.keys)}))}removeAllHotkeys(e){c.removeAllListeners(),this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName},e)}}const m=new h({onReady(e){m.listenForHotkeys(),e&&e()},name:"hotkeyClient"});l.Keystroke=f,t.default=m},9562:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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(72669),u=s(n(95376)),l=o(n(76420)),c=s(n(13712)),d=n(51742),f=s(n(72551)),p=n(75688),h=window,m={};class w extends a._BaseClient{constructor(e){super(e),c.default.args(e,"object=")&&e&&c.default.args2("params.onReady",e.onReady,"function="),this.windowClient=e.clients.windowClient}getComponentList(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.componentList",{},((n,i)=>{e(n,i.data),t({err:n,data:i.data})}))}))}getComponentDefaultConfig(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.componentList",{},((i,r)=>{const o=r.data[e];t(i,o),n({err:i,data:o})}))}))}getMonitorInfo(e={},t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfo"),"all"===e.monitor?n.getMonitorInfoAll(t):new Promise((i=>{l.getMyWindowIdentifier((r=>{e.windowIdentifier||(e.windowIdentifier=r),n.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data),f.default.system.log("MONITOR: launcherClient.getMonitorInfo query response data",n.data),i({err:e,data:n.data})}))}))}))}getMonitorInfoAll(e=Function.prototype){return c.default.args(e,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfoAll"),new Promise(((t,n)=>{this.routerClient.query("Launcher.getMonitorInfoAll",{},((i,r)=>{i&&(n({err:i}),e(i)),t({err:i,data:r.data}),e(i,r.data)}))}))}registerComponent(e,t=Function.prototype){return new Promise((n=>{this.routerClient.query("LauncherService.registerComponent",e,((e,i)=>{t&&t(e,i.data),n({err:e,data:i.data})}))}))}unRegisterComponent(e,t=Function.prototype){return e.componentType?new Promise((n=>{this.routerClient.query("LauncherService.unRegisterComponent",e,((e,i)=>{t&&t(e,i.data),n({err:e,data:i.data})}))})):t("No componentType provided")}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,t,n){const i=this;let r=this.locatorToIdentifier(t),o=`${r.windowName}:${r.uuid}`;r.windowName||(o=r.componentType),!1!==m[o]?(n.position||(n.position="absolute"),this.showWindow(t,n,(function(t,n){if(!n)return;const{finWindow:r}=n;var s=function(){m[o]=!0,i.windowClient.isMouseOverDOMElement(e,(e=>{m[o]=!e})),r.removeEventListener("blurred",s)};r.addEventListener("blurred",s)}))):m[o]=!0}showWindow(e,t,n=Function.prototype){c.default.args(e,"object",t,"object=",n,"function=");const i=this;return t||(t={}),(t=l.clone(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e),new Promise((e=>{l.getMyWindowIdentifier((r=>{t.relativeWindow||(t.relativeWindow=r),i.routerClient.query("Launcher.showWindow",t,(async(t,i)=>{if(t)return e({err:t}),n(t);const r=i.data.windowIdentifier;i.data.windowIdentifier.name=i.data.windowIdentifier.windowName;const{wrap:o}=await p.FinsembleWindow.getInstance({name:r.windowName});i.data.finWindow=o,e({err:t,data:i.data}),n(t,i.data)}))}))}))}spawn(e,t,n=Function.prototype){const i=this;return c.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=l.clone(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),f.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`),new Promise((r=>{l.getMyWindowIdentifier((o=>{t.launchingWindow=o,i.callSpawn(t,((t,i)=>{f.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,t),r({err:t,response:i}),n(t,i)}))}))}))}callSpawn(e,t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.perf.debug("CallSpawn","start","from spawn to callback",e),new Promise((i=>{function r(e,n){t(e,n),i({err:e,data:n})}n.routerClient.query("Launcher.spawn",e,(async(e,t)=>{if(f.default.system.debug("CallSpawn","Initial launcher callback params",e,t),f.default.perf.debug("CallSpawn","Initial launcher callback",t),e)return r(e,t.data),f.default.system.error("LauncherClient.callSpawn",e);t.data.windowIdentifier.name=t.data.windowIdentifier.windowName;var i=t.data;if(i.windowDescriptor.native)return r(e,i);const o=i.windowIdentifier,{wrap:s}=await p.FinsembleWindow.getInstance({name:o.windowName});i.finWindow=s;const a=`Finsemble.${i.windowIdentifier.windowName}.componentReady`,u=n.routerClient.subscribe(a,((t,o)=>{if(t)return f.default.system.error(t);o&&0===Object.keys(o.data).length||(f.default.perf.debug("CallSpawn","stop"),r(e,i),n.routerClient.unsubscribe(u))}))}))}))}getMonitor(e,t=Function.prototype){return f.default.system.deprecated("This method is deprecated and will be removed in a future release. Method getMonitorInfo should be used instead."),c.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}getMyWindowIdentifier(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{l.getMyWindowIdentifier((n=>{e(n),t(n)}))}))}getActiveDescriptors(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.getActiveDescriptors",{},((n,i)=>{n&&f.default.system.error(n),e(n,i.data),t({err:n,data:i.data})}))}))}getActiveAndPendingWindowNames(e=Function.prototype){return new Promise((t=>{this.routerClient.query("Launcher.getActiveAndPendingWindowNames",{},((n,i)=>{n&&f.default.system.error(n),e(n,i.data),t({err:n,data:i.data})}))}))}async getPendingWindows(){const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return e&&f.default.system.error("Error retrieving pending windows:",e),{err:e,data:t.data}}addUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url},((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}removeUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url},((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}bringWindowsToFront(e={},t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}hyperFocus(e,t=Function.prototype){return f.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.windowList||e.groupName||e.componentType||(e.windowList=[this.myWindowIdentifier]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.hyperFocus",e),t(),Promise.resolve()}minimizeWindows(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.minimizeWindows",e),t(),Promise.resolve()}createWindowGroup(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),c.default.args(e.groupName,"string"),new Promise((n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}this.routerClient.query("LauncherService.createWindowGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}addWindowsToGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),c.default.args(e.groupName,"string"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}getGroupsForWindow(e,t=Function.prototype){return c.default.args(t,"function="),"function"==typeof e&&(t=e,e=null),new Promise((n=>{e&&e.windowIdentifier?this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,i)=>{n({err:e,data:i.data}),t(e,i.data)})):this.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,i)=>{n({err:e,data:i}),t(e,i)}))}))}addToGroups(e,t=Function.prototype){return c.default.args(t,"function="),c.default.args(e.groupNames,"array"),e.windowIdentifier||(e.windowIdentifier=this.myWindowIdentifier),new Promise((n=>{this.routerClient.query("LauncherService.addWindowToGroups",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){const t=this;if(void 0!==h.FSBL){function n(){t.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${t.windowName}`,((e,n)=>{Array.isArray(n.data)&&t.windowClient.setComponentState({field:"finsemble:windowGroups",value:n.data})}))}h.FSBL.addEventListener("onReady",(()=>{t.windowClient.onReady((()=>{t.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,i)=>{if(!e&&i)return t.addToGroups({groupNames:i},n);n()}))}))}))}setInterval((()=>{t.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName,componentType:"finsemble",isBrowserView:d.System.isBrowserView()})}),1e3),this.getMyWindowIdentifier((n=>{t.myWindowIdentifier=n,e&&e()}))}}let g;function y(e){return(e=e||{}).windowClient||(e.windowClient=u.default),new w({clients:e,onReady(e){f.default.system.debug("launcherClient ready",window.name),f.default.perf.debug("LauncherClientReadyTime","stop"),g.start(e)},name:"launcherClient"})}g=y(),g.constructInstance=y,t.default=g},75729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalLogger=void 0;const{debug:n,warn:i,log:r,error:o}=console,s=()=>{},a=s,u={warn:i,info:s,log:r,debug:n,error:o,verbose:a,deprecated:o},l={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},c={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:l,system:l,perf:l};function d(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=d,this.setting=()=>c,this.callStack=()=>function(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}(),this.unregisterClient=()=>{},this.setRouterClient=()=>{},this.warn=i,this.info=s,this.log=r,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 i=n(51742),r=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 r=this;let l;r.RouterClient=e&&e.RouterClient;let c=!1,d=!1;const f=r;let p,h,m=0,w=0;this.startupTime=0;let g=[];if("undefined"==typeof window)return;let y=i.System.Window.getCurrent().name;window.top!==window&&(y=`${y}.Frame`),this.onLogStateChangeCallback=[];let v={console:a,dev:s,system:s,perf:s};function b(e,t,n){this.category=e,!l&&i.System.isBrowserView()&&(l=i.System.getViewId()),this.logClientName=l?`${y}: view-${l}`:y,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+m}function S(e,t){e&&e.dev&&(v=e,r.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){f.system.debug("Logger updateQueueBasedOnState",e,m,"QUEUE LENGTH",g.length,v);const t=[];for(let n=0,{length:i}=g;n<i;n++)if(v[g[n].category][g[n].logType]&&!v[g[n].category].LocalOnly)e&&(g[n].logTimestamp=g[n].logTimestamp+m),t.push(g[n]);else if(v[g[n].category][g[n].logType]&&v[g[n].category].LocalOnly){const e=g[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}g=t}(t)}function C(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}this.onStateChanged=e=>{-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)},this.setClientName=function(e){console.error("logger.setClientName() is deprecated"),y=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),y},this.clearMessageList=function(){g=[]},this.callStack=function(){return C()},this.setting=function(){return v};const _=console.error,A=console.warn,W=console.info,E=console.log,T=console.debug;function L(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?L(t):t)),[])}function I(e,t){try{e.apply(console,L(t))}catch(e){(t=[]).push(C())}}let O=()=>{g.length>0&&(r.RouterClient.transmit("logger.service.logMessages",g),f.clearMessageList())};function k(e,n,i){let r,o=!1,s=!0;"forceObjectsToLogger"===i[0]&&(o=!0,s=!1,i.splice(0,1)),i=i.map((e=>s&&function(e){const t=[],n=[e];let i=0,r=0;for(;n.length&&r<1e3;){r++;const e=n.pop();if("boolean"==typeof e)i+=4;else if("string"==typeof e)i+=2*e.length;else if("number"==typeof e)i+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return i}(e)>5e4?(I(W,["Message too large to send to the logger.",i]),"Log argument greater than 50KB. Check local Console to see output of the object."):e));try{for(let e=0;e<i.length;e++)i[e]instanceof Error&&(i[e]=i[e].toString());r=new b(e,n,JSON.stringify(i))}catch(t){i.splice(0,i.length),i.push(C()),r=new b(e,n,`*** Logging Error: ${JSON.stringify(i)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(r)?function(e){if(g.length<2e4)g.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",g.length);let e,n=0;for(;e=g.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(r):++w<=5&&I(W,[`"Filtered Logger Message (${w} of first 5 shown)`,r]),d&&O()}function N(){const{windowName:e}=o.Startup.getInstance().getStartupData();y=e,window.top!==window&&(y=`${y}.Frame`);const t=`finsemble.logger.client.${y}`;!l&&i.System.isBrowserView()&&(l=i.System.getViewId()),f.system.debug("logger.service.registering",y),i.System.Window.getCurrent().getOptions((n=>{const i=n?.customData?.component?.centralLoggerNamePrefix;r.RouterClient.query("logger.service.register",{clientName:y,clientChannel:t,windowName:e,viewId:l,centralLoggerNamePrefix:i},((e,t)=>{if(e)setTimeout(N,750);else{for(const e of g)e.viewId=l;d=!0,f.system.debug("logger.service.registered"),p=t.data,"routerService"!==y?(m=h,S(p,!0)):S(p,!1),k("system","Debug",["Logger Registered"]),O()}}))})),r.RouterClient.addListener(t,((e,t)=>{f.system.debug("logger.client.setLogState",t.data),p=t.data,S(p,!1)}))}O=u(O,"routerService"===y?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),v.dev.Error&&!v.dev.LocalOnly&&k("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),I(_,e)},this.warn=function(){if(v.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),v.dev.Warn&&!v.dev.LocalOnly&&k("dev","Warn",e),v.dev.Warn&&v.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),I(A,e))}},this.info=function(){if(v.dev.Info){const e=Array.prototype.slice.call(arguments);v.dev.Info&&!v.dev.LocalOnly&&k("dev","Info",e),v.dev.Info&&v.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),I(W,e))}},this.log=function(){if(v.dev.Log){const e=Array.prototype.slice.call(arguments);v.dev.Log&&!v.dev.LocalOnly&&k("dev","Log",e),v.dev.Log&&v.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),I(E,e))}},this.debug=function(){if(v.dev.Debug){const e=Array.prototype.slice.call(arguments);v.dev.Debug&&!v.dev.LocalOnly&&k("dev","Debug",e),v.dev.Debug&&v.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),I(T,e))}},this.verbose=function(){if(v.dev.Verbose){const e=Array.prototype.slice.call(arguments);v.dev.Verbose&&!v.dev.LocalOnly&&k("dev","Verbose",e),v.dev.Verbose&&v.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),I(T,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),v.system.Error&&!v.system.LocalOnly&&k("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),I(_,e)},this.system.warn=function(){if(v.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),v.system.Warn&&!v.system.LocalOnly&&k("system","Warn",e),v.system.Warn&&v.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),I(A,e))}},this.system.info=function(){if(v.system.Info){const e=Array.prototype.slice.call(arguments);v.system.Info&&!v.system.LocalOnly&&k("system","Info",e),v.system.Info&&v.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),I(W,e))}},this.system.log=function(){if(v.system.Log){const e=Array.prototype.slice.call(arguments);v.system.Log&&!v.system.LocalOnly&&k("system","Log",e),v.system.Log&&v.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),I(E,e))}},this.system.debug=function(){if(v.system.Debug){const e=Array.prototype.slice.call(arguments);v.system.Debug&&!v.system.LocalOnly&&k("system","Debug",e),v.system.Debug&&v.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),I(T,e))}},this.system.verbose=function(){if(v.system.Verbose){var e=Array.prototype.slice.call(arguments);v.system.Verbose&&!v.system.LocalOnly&&k("system","Verbose",e),v.system.Verbose&&v.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),I(T,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),v.perf.Error&&!v.perf.LocalOnly&&k("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),I(_,e)},this.perf.warn=function(){if(v.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),v.perf.Warn&&!v.perf.LocalOnly&&k("perf","Warn",e),v.perf.Warn&&v.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),I(A,e))}},this.perf.info=function(){if(v.perf.Info){const e=Array.prototype.slice.call(arguments);v.perf.Info&&!v.perf.LocalOnly&&k("perf","Info",e),v.perf.Info&&v.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),I(W,e))}},this.perf.log=function(){if(v.perf.Log){const e=Array.prototype.slice.call(arguments);v.perf.Log&&!v.perf.LocalOnly&&k("perf","Log",e),v.perf.Log&&v.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),I(E,e))}},this.perf.debug=function(){if(v.perf.Debug){const e=Array.prototype.slice.call(arguments);v.perf.Debug&&!v.perf.LocalOnly&&k("perf","Debug",e),v.perf.Debug&&v.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),I(T,e))}},this.perf.verbose=function(){if(v.perf.Verbose){const e=Array.prototype.slice.call(arguments);v.perf.Verbose&&!v.perf.LocalOnly&&k("perf","Verbose",e),v.perf.Verbose&&v.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),I(T,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){f.system.debug("logger.service.unregister",y,e,l),O();const n=e||{clientName:y,viewId:l};r.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(),r.RouterClient||(console.log("No instance of the RouterClient found for this instance of the Logger. Dynamically requiring it."),r.RouterClient=n(39319).default);const t=()=>{e=r.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(r.status="online",f.system.debug("Logger onReady",y),r.RouterClient.calibrateTimeWithRouterService((e=>{h=e,c||(r.startupTime=performance.now()-r.startupTime,N(),c=!0)})),r.RouterClient.unsubscribe(e))}))};"routerService"===window.name?r.RouterClient.query("logger.service.register",{},(e=>{e?setTimeout(t,750):t()})):r.RouterClient.onReady(t),i.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{r.unregisterClient()}))}},t.Logger="undefined"!=typeof window?new t.LoggerConstructor:new r.LocalLogger,t.default=t.Logger},2807:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationClient=t.ActionTypes=t.ROUTER_NAMESPACE=void 0;const r=n(52283);Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return r.ActionTypes}});const o=i(n(95320)),s=i(n(12521)),a=i(n(50631)),u=i(n(55016)),l=n(24232),c=n(72669),d=i(n(70010)),f=i(n(95376)),p=i(n(9562)),h=i(n(73014)),m="notification.",w="unsubscribe";t.ROUTER_NAMESPACE={ACTION_PREFIX:"notification.action."};class g extends c._BaseClient{constructor(e){super(e),this.subscriptions=[],this.Notification=o.default,this.ActionTypes=r.ActionTypes,this.Subscription=s.default,this.Action=a.default,this.Filter=u.default,this.actionTypes=r.ActionTypes,this.publicEventManager=new h.default({name:"notificationClient",sourceType:"notification"})}async applyOverrides(){const{data:e}=await d.default.getValue("finsemble.servicesConfig.notifications.applyNotificationOverrides");if(!e)return;const t=f.default.getWindowIdentifier().windowName,{data:n}=await p.default.getActiveDescriptors(),i=Object.keys(n).filter((e=>e===t)).map((e=>n[e]));let r,o="Unknown Source";function s(e,t){const{componentType:n}=f.default.getWindowIdentifier();t.finsembleSource=o,y.notify(JSON.parse(JSON.stringify({title:e,options:t})))}1!==i.length?this.logger.warn("Unable to fetch component to extract type or display name"):(r=i[0],o=r.customData?.component?.displayName||r.componentType);const a=window.Notification;s.requestPermission=a.requestPermission.bind(a),Object.defineProperty(s,"permission",{get:function(){return a.permission}}),window.Notification=s}setup(){window&&window.addEventListener&&window.addEventListener("unload",(()=>{this.unsubscribeAll()}))}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}query(e,t,n,i){return new Promise((async(r,o)=>{try{null==n&&(n=m),this.logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.routerClient.query(n+e,t,(()=>{}));s.err?(this.logger.system.error("Error: ",s.err),o(s.err)):(this.logger.system.log(`${e} raw response: `,s),i&&i(null,s.response.data.data),r(s.response.data.data))}catch(e){this.logger.system.error("Error: ",e),i&&i(e),o(e)}}))}async fetchHistory(e,t){return this.logger.system.info("FetchHistory() called with params: ",e,t),await this.query("fetch_history",{options:e,filter:t})}async getLastIssuedAt(e){return this.logger.system.info("getLastIssued called with params: ",e),await this.query("last_issued",e)}async performAction(e,t){return this.logger.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await this.query("perform_action",{notifications:e,action:t})}async markRead(e){this.logger.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_read",{notifications:e,isRead:!0})}async markUnread(e){this.logger.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_unread",{notifications:e,isRead:!1})}deleteNotifications(e){return this.logger.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(this.query("delete",e))}catch(e){n(e)}}))}async notify(e){this.logger.system.info("notify() called with params: ",e);try{await this.query("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await l.sleep(500),await this.notify(e)}}async subscribe(e,t){this.logger.system.info("subscribe() called with params: ",e,t);const n=await this.query("subscribe",JSON.parse(JSON.stringify(e)));return this.logger.system.info("Got a return value containing a channel",n),await this.monitorChannel(n.channel,t),this.subscriptions.push(n),n}async unsubscribe(e){this.logger.system.info("unsubscribe() called with params: ",e),await this.query(w,e),this.cleanupSubscription(e)}removeResponder(e,t){null==t&&(t=m),this.routerClient.removeResponder(t+e)}unsubscribeAll(){this.logger.system.info("unsubscribeAll() called"),this.subscriptions.forEach((e=>{this.query(w,e.id).then(),this.removeResponder(e.id)})),this.subscriptions=[]}async mute(e){return this.logger.system.info("mute() called with params: ",e),await this.query("mute",{filter:e})}async unmute(e){return this.logger.system.info("unmute() called with params: ",e),await this.query("unmute",{filter:e})}async getSources(){return this.logger.system.info("getSources() called"),await this.query("sources",{})}async getMuteFilters(){return this.logger.system.info("getSources() called"),await this.query("mute_filters",{})}async getPreferences(){return this.logger.system.info("getPreferences() called"),await this.query("preferences",{})}cleanupSubscription(e){const t=this.subscriptions.findIndex((t=>t.id===e));t>-1&&(this.removeResponder(this.subscriptions[t].channel),this.subscriptions.splice(t,1))}addResponder(e,t,n){null==n&&(n=m),this.logger.system.info(`Adding responder for endpoint: ${n+e}`),this.routerClient.addResponder(n+e,((n,i)=>{if(this.logger.system.info(`Message received on ${e}: `,i),n)this.logger.system.error(`Failed to setup ${e} responder`,n);else try{this.logger.system.info(`Processing message on channel ${e}: `,i);const n=t(i.data);this.logger.system.info(`Message response on ${e}: `,n),i.sendQueryResponse(null,{status:"success",data:n})}catch(n){this.logger.system.error("Failed to process query",n),i.sendQueryResponse(n)}}))}monitorChannel(e,t){return new Promise((n=>{this.logger.system.info("Listening for messages on channel",e),this.addResponder(e,(e=>{this.logger.system.info("Notification received: ",e.id);try{t(e)}catch(e){this.logger.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})),n()}))}}t.NotificationClient=g;const y=new g({onReady:function(e){y.applyOverrides(),y.setup(),this.logger.system.log("notificationClient Online"),e()},name:"notificationClient"});t.default=y},40568:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClientConstructor=void 0;const r=i(n(82369)),o=i(n(13712)),s=i(n(73699)),a=n(51742),u=n(72551),l=n(6192),c=n(75729),d=n(50586),f=[];let p=u.Logger;function h(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?h(e[n],null):t[n];return t}t.RouterClientConstructor=function(){let e,t;const n={},i={},u={},m={},w={},g={},y={},v={},b={},S={};let C,_=null,A=!1;const W=[];function E(){this.header={origin:C,type:"initialHandshake"}}function T(e,t){this.header={origin:C,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function L(e){this.header={origin:C,type:"addListener",channel:e}}function I(e,t,n){this.header={origin:C,type:"transmit",channel:e},this.data=t,this.options=n}function O(e){this.header={origin:C,type:"removeListener",channel:e}}function k(e){this.header={origin:C,type:"addResponder",channel:e}}function N(e,t,n){this.header={origin:C,type:"query",queryID:e,channel:t},this.data=n}function R(e,t,n){this.header={origin:C,type:"queryResponse",queryID:e,error:t},this.data=n}function P(e){this.header={origin:C,type:"removeResponder",channel:e}}function M(e,t){this.header={origin:C,type:"subscribe",subscribeID:e,topic:t}}function F(e,t){this.header={origin:C,type:"unsubscribe",subscribeID:e,topic:t}}function D(e,t){this.header={origin:C,type:"publish",topic:e},this.data=t}function x(e,t,n,i){this.header={origin:C,type:"notify",subscribeID:e,topic:t,error:n},this.data=i}function j(e,t,n){this.header={origin:C,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:C,type:"removePubSubResponder",topic:e}}function $(e){_?_.send(e):(p.system.info("RouterClient: Queuing message since router initialization not complete",e),f.push(e))}function H(){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 R(this.header.queryID,e,t))}function q(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=H,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 V(e,t){if(e)p.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{m[this.header.topic]=t;const n=g[this.header.topic];if(void 0!==n)for(let i=0;i<n.length;i++)p.system.info("RouterClient: sending pubsub notify","TOPIC",this.header.topic,"NOTIFY DATA",t),$(new x(n[i],this.header.topic,e,t))}}function z(e,t){var n,i,r;(function(e){let t=!1;return void 0===e&&(t=!0),t})(t)||$(new x(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=g,i=this.header.topic,r=this.header.subscribeID,i in n?n[i].push(r):n[i]=[r],p.system.info("RouterClient: incoming subscription added","TOPIC",this.header.topic,"MESSAGE",this))}function G(){!function(e,t,n){let i=!1;if(t in e){const r=g[t];for(let o=0;o<r.length;o++)if(n===r[o]){r.splice(o,1),0===r.length&&delete e[t],i=!0,p.system.info("RouterClient: PubSub removeListener","TOPIC",t,"FROM",n);break}}i||p.system.warn(`RouterClient: tried to remove non-existent listener on ${t} from ${JSON.stringify(n)}`)}(g,this.header.topic,this.header.subscribeID)}function Y(r){switch(p.system.verbose("Incoming Message Type",r.header.type,r),r.header.type){case"transmit":!function(e,t){const n=e[t.header.channel]||[],i=[];if(Array.isArray(n)&&0!==n.length){t.originatedHere=H,n.forEach((e=>{i.push(e)}));for(let e=0;e<i.length;e++)p.isLogMessage(t.header.channel)||p.system.info("RouterClient: incoming transmit","CHANNEL",t.header.channel,"FROM",t.header.origin,"MESSAGE",t),i[e](null,t)}else p.system.warn(`RouterClient: no listener for incoming transmit on channel ${t.header.channel} from ${t.header.origin}`,t)}(n,r);break;case"query":q(i,r);break;case"queryResponse":!function(e,t){const n=e[t.header.queryID];void 0===n?p.system.warn("RouterClient: no handler for incoming query response","QUERY ID",t.header.queryID):(function(e,t){const n=e[t];void 0!==n&&clearTimeout(n)}(S,t.header.queryID),t.header.error?(p.system.debug("RouterClient: incoming queryResponse error",t.header,"QUERY ID",t.header.queryID),n(t.header.error,t)):(p.system.info("RouterClient: incoming query response","RESPONSE MESSAGE",t,"QUERY ID",t.header.queryID),n(null,t)),delete e[t.header.queryID])}(b,r);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=H,p.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(y,r);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in w)if(w[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=V,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)))}(r);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 w)if(w[n].test(e.header.topic)){t=u[n];let i=m[e.header.topic];void 0===i&&(i=m[n]),m[e.header.topic]=i;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=m[e.header.topic],t.subscribeCallback(null,e)):e.sendNotifyToSubscriber(null,m[e.header.topic]))}(r);break;case"unsubscribe":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in w)if(w[n].test(e.header.topic)){t=u[n];break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e):(e.removeSubscriber=G,t.unsubscribeCallback?(p.system.info("RouterClient: incoming unsubscribe callback","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),t.unsubscribeCallback(null,e)):(p.system.info("RouterClient: incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),e.removeSubscriber()))}(r);break;case"timeCalibration":const o=()=>{t?t(r):setTimeout((()=>{o()}),10)};o();break;case"initialHandshakeResponse":e()}}function K(e,t){t.header.lastClient=C,t.header.incomingTransportInfo=e,Y(t)}this.startupTime=0,this.notificationURL="";const J=(t,n,i)=>{let o,a;p.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,l,c,d,h=!1,m=0;const w=t=>{a=0,p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),_=t,e=d,c(),o=setInterval(c,200)};u=e=>{p.system.error("RouterClientError",e)};const g=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),r.default.getTransport(t,n,K,C,"RouterService").then(w).catch(u)};l=()=>{if(clearInterval(o),m++,m<=3)p.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",m,t),g();else{const e="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";p.system.error(e,t),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",e,{url:this.notificationURL})}},c=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),$(new E),a++>50&&l()},d=()=>{if(!h){if(p.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${C} with transport ${_.identifier()}`),h=!0,clearInterval(o),f)for(let e=0;e<f.length;e++){p.system.debug("RouterClient: firing queued msg");const t=f[e];_.send(t)}i&&i()}},g()};function Q(){return`${C}.${d.v4()}`}function X(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}this.calibrateTimeWithRouterService=function(e){let n,i=0,r=1/0;t=function(t){i++,i>5?function(t){let i=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<r&&(r=s,n=a),i+=a,p.system.debug("calibrationCalculation Intermediate Values","lastRRT",s,"lastOffset",a,"fastestOffset",n,"fastestRRT",r)}i/=4,p.system.debug("RouterClient calibrationCalculation","Average Offset",i,"Chosen FastestOffset",n,t),e(n)}(t):(t.clientBaseTime.push(l.Globals.performance.timing.navigationStart+l.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()};A?n():W.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 i=!1;const r=e[t];return void 0===r||0===r.length?(e[t]=[n],i=!0):r.push(n),i}(n,e,t)&&$(new L(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 I(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 i=!1;const r=e[t];if(void 0!==r){const e=r.indexOf(n);e>-1?(r.splice(e,1),0===r.length&&(i=!0)):p.system.warn(`no listener defined for channel: ${t}`)}return i}(n,e,t)&&$(new O(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 i=!1;return void 0===e[t]&&(e[t]=n,i=!0),i}(i,e,t))$(new k(e));else{const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;p.system.warn(n),t(n,null)}},this.query=(e,t,n,i)=>{const r=`${Q()}.${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",r,{timestamp:s,navstart:a,timenow:u}),i||(i=n,n={timeout:2e4}),o.default.args(e,"string",t,"any=",n,"object=",i,"function"),n=n||{},o.default.args2("params.timeout",n.timeout,"number"),new Promise((function(o){b[r]=(l,c)=>{o({err:l,response:c}),"function"==typeof i?i(l,c):p.system.warn("No response event handler passed to RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",r,{timestamp:s,navstart:a,timenow:u})},l.Globals.runningInFSBLUnitTest||function(e,t,n,i){i>0&&(e[t]=setTimeout((()=>{p.system.warn(`RouterClient: timeout waiting on query response on channel ${n} for queryID ${t} on timer ${e[t]} timeout=${i}`)}),i))}(S,r,e,n.timeout),$(new N(r,e,t))}))},this.removeResponder=e=>{p.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),X(i,e)&&$(new P(e))},this.addPubSubResponder=(e,t,n,i)=>{let r,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 j(e.toString(),t,!0)),s="success"):!function(e,t,n,i){let r=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(w[e.toString()]=e,p.system.info(`RouterClient: PubSub RegEx added for topic ${e.toString()}`)),u[e.toString()]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:i},r=!0),r}(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)?(r=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,p.system.error(r)):(t=t||{},m[e.toString()]=h(t),$(new j(e.toString(),t,!1)),s="success"),i&&i(r,s)},this.removePubSubResponder=e=>{p.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any"),X(u,e)?(delete m[e.toString()],delete w[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=Q();return function(e,t,n,i){e[t]=n,v[t]=i}(y,n,t,e),$(new M(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 D(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}(y,e.subscribeID)?p.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):$(new F(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 O(e)),delete n[e];for(const e in i)p.system.debug(`RouterClient.disconnectAll is removing responder on ${e}`),$(new P(e)),delete i[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 m[e.toString()],delete w[e.toString()];for(const e in y){const t=v[e];p.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),$(new F(e,t)),delete y[e],delete v[e]}},this.start=e=>new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return p.warn(e),t(e)}this.started=!0,p=new c.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(p=new c.LocalLogger),C=`RouterClient.${e.windowName}.${d.v4()}`;const n=`"RouterClient Check: connecting new client for ${C}`;p.system.debug(n),console.debug(n),J(e,e.transportName,(()=>{!function(){for(p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),A=!0;W.length>0;)p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked"),W.shift()()}(),t(null)}))})),this.stop=()=>{this.disconnectAll(),r.default.close(),this.started=!1}}},39319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const i=n(40568),r=n(72551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",i.RouterClientConstructor),r.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(40568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},63862:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const r=i(n(42169)),o=i(n(13712)),s=i(n(72551)),a=n(72669),u=n(24232),l=r.default(1);class c extends a._BaseClient{constructor(){super(...arguments),this.clientReady=!1,this.delete=this.remove}setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function="),this.routerClient.query("Storage.setUser",{user:e.user},((n,i)=>{(n?s.default.system.error:s.default.system.info)("APPLICATION LIFECYCLE:StorageClient.setUser",e,n,i),t&&t(n,i.data)}))}setStore(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t),this.routerClient.query("Storage.setStore",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.setStore",e,n),t&&t(e,n.data)}))}save(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,i)=>{o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function="),this.routerClient.query("Storage.save",e,((e,r)=>{(e?s.default.system.error:s.default.system.info)("Storage.save",e,r),t&&t(e,r.data),e?i({err:e,data:null}):n({err:e,data:r.data})}))}))}save1(e){return l((()=>this.save(e)))}get(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,i)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.get",e,((e,r)=>{if(e)return s.default.system.error("Storage.get",e,r),t&&t(e,r?r.data:null),i(e,r?r.data:null);s.default.system.info("Storage.get",e,r),t&&t(e,r.data),n(r.data)}))}))}get1(e,t){return l((()=>this.get(e,t)))}async updateStorage(e){const{topic:t,key:n,updateFn:i}=e,r=await this.get({topic:t,key:n});return await this.save({topic:t,key:n,value:i(r)})}updateStorage1(e){return l((()=>this.updateStorage(e)))}keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t),this.routerClient.query("Storage.keys",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.keys",e,n),t&&t(e,n.data)}))}keys1(e){return l((()=>u.promisify(this.keys.bind(this))(e)))}getMultiple(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t),this.routerClient.query("Storage.getMultiple",e,((n,i)=>{(n?s.default.system.error:s.default.system.info)("StorageClient.getMultiple:",e,i),t&&t(n,i)}))}remove(e,t){return this.clientReady||s.default.system.error("storageClient invoked before ready"),new Promise(((n,i)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.delete",e,((e,r)=>{(e?s.default.system.error:s.default.system.info)("StorageClient.delete",e,r),t&&t(e,r.data),e?i({err:e,data:null}):n({err:e,data:r.data})}))}))}remove1(e){return l((()=>this.remove(e)))}clearCache(e){s.default.system.log("StorageClient.clearCache",e),this.routerClient.query("Storage.clearCache",null,((t,n)=>{(t?s.default.system.error:s.default.system.info)("StorageClient.clearCache",t,n),e&&e(t,n.data)}))}}t.StorageClient=c;var d=new c({onReady(e){e&&e(),d.clientReady=!0},name:"storageClient"});t.default=d},95376:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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=s(n(63862)),l=s(n(68718)),c=o(n(76420)),d=n(51742),f=n(72669),p=s(n(72551)),h=s(n(13712)),m=n(75688),w=n(33998),g=s(n(39319)),y=n(78379),v=s(n(70010)),b=n(24232),S=n(80089);let C;function _(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}class A extends f._BaseClient{constructor(e){super(e),this.showAtMousePosition=function(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())},h.default.args(e,"object=")&&e&&h.default.args2("params.onReady",e.onReady,"function="),this.options={},this.windowHash="",this.title=null,this.toolbarBottom=40,this.containers=[],this.componentState={},this.windowState="normal",this.hasHeader=!1,this.enableWindowsAeroSnap=!1,this.bindFunctions(),this.minimizeWithDockedWindows=this.minimize}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this),this.cacheInitialBounds=this.cacheInitialBounds.bind(this),this._setHeaderHeight=this._setHeaderHeight.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){this.setActive(!1)}onWindowFocused(){this.setActive(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",C.name),C.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:C.name}),C.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?FSBL.Clients.Logger.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes(this.getWindowNameForDocking()))))}close(e,t=(()=>{})){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=C;if(e.userInitiated&&n)return n.close(e,t);C.close(e,t)}getWindowHash(){return this.windowHash}getWindowTitle(){return this.title}retrieveMonitorDimensions(e=Function.prototype){c.getMonitor(null,(t=>{C.updateOptions({options:{monitorDimensions:t.monitorRect}}),e&&e(t.monitorRect)}))}listenForHashChanges(){d.System.hasBrowserView()||(C.updateOptions({url:window.top.location.href},(()=>{})),function(e){const{pushState:t}=e;e.pushState=function(n){"function"==typeof e.onpushstate&&e.onpushstate({state:n}),t.apply(e,arguments),C.updateOptions({url:window.top.location.href},(()=>{}))};const{replaceState:n}=e;e.replaceState=function(t){"function"==typeof e.onreplacestate&&e.onreplacestate({state:t}),n.apply(e,arguments),C.updateOptions({url:window.top.location.toString()})}}(window.history),window.addEventListener("hashchange",(()=>{C.updateOptions({url:window.top.location.toString()},(()=>{}))})))}getInitialOptions(e){this.isInAService?(this.options={},p.default.system.debug("WindowClient:getting options empty",this.options),e()):C.getOptions(((t,n)=>{t&&(n={}),C.windowOptions=n,this.options=n,p.default.system.debug("WindowClient:getting options",this.options),e()}))}cacheInitialBounds(e){if(d.System.hasBrowserView())return e();this.cacheBounds((()=>{try{if(!C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState)return e();C.updateOptions({options:{url:window.top.location.toString()}})}catch(e){p.default.system.warn('customData.foreign.components["Window Manager" is undefined')}e()}))}setInitialWindowBounds(e){p.default.system.warn("`FSBL.Clients.WindowClient.setInitialWindowBounds is deprecated and will be removed in a future version of finsemble. Use 'getInitialOptions' and 'cacheInitialBounds' instead."),a.parallel([this.getInitialOptions,this.cacheInitialBounds],e)}getWindowBounds(){return{top:C.windowOptions.defaultTop,left:C.windowOptions.defaultLeft,width:C.windowOptions.defaultWidth,height:C.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(p.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),h.default.args(e,"object")&&h.default.args2("bounds.top",e.top,"number"),e){C.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}minimize(e){this.cacheBounds((()=>{C.minimize(null,(t=>{t&&p.default.system.error("WindowClient:minimize",t),e&&e(t)}))}))}setAlwaysOnTop(e,t){C.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e=(()=>{})){C.restore(null,(t=>{t&&p.default.system.error("WindowClient:restore",t),e(t)}))}cacheBounds(e){this.getBounds(((t,n)=>{if(t)return e(),console.warn("Get bounds error.",t,"Window may not be registered with the window service");C.updateOptions({options:{cachedLeft:n.left,defaultLeft:n.left,cachedTop:n.top,defaultTop:n.top,cachedWidth:n.width,defaultWidth:n.width,cachedHeight:n.height,defaultHeight:n.height}}),e&&e(n)}))}maximize(e){C.maximize(),e()}removeFinWindowEventListeners(){C.removeEventListener("maximized",this.onWindowMaximized),C.removeEventListener("restored",this.onWindowRestored),C.removeEventListener("blurred",this.onWindowBlurred),C.removeEventListener("focused",this.onWindowFocused),C.removeEventListener("close-requested",this.close),C.removeEventListener("minimized",this.onWindowMinimized)}injectDOM(e){if(p.default.system.debug("injectDOM",e),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div");t.innerHTML=`<div id="FSBLHeader"${e?` style=height:${e}`:""}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){if(e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),h.default.args(e,"object",t,"function"),C)return C.getComponentState(e,t);p.default.system.warn("Attempt to use getComponentState before component is ready or in a service"),e.windowName||(e.windowName=window.name);const n=this.getContainerHash(e.windowName);u.default.get({topic:y.WORKSPACE.CACHE_STORAGE_TOPIC,key:n},((n,i)=>{if(n)return p.default.system.error("Error retrieving window client's component state."),void t(n);const r=i;if(i&&e.field)this.componentState=r||{},t(n,r[e.field]);else{if(e.fields){const n={};for(let t=0;t<e.fields.length;t++)r[e.fields[t]]&&(n[e.fields[t]]=r[e.fields[t]]);return t(null,n)}if(i)return t(null,r);p.default.system.info("WindowClient:getComponentState:error, response, params",n,i,e),t("Not found",i)}}))}async setComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),C?C.setComponentState(e,t):this.isInAService?(t("Cannot call setComponentState in a service."),Promise.resolve()):(t("Cannot call setComponentState. The window may not be ready"),Promise.reject("The window is not yet ready to save state."))}async removeComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),(C||await m.FinsembleWindow.getInstance({name:e.windowName||window.name})).removeComponentState(e,t)}getWindowNameForDocking(){const e=C.parentWindow;return e?e.name:C.name}getContainerHash(e){return c.camelCase(this.windowHash,e)}formGroup(){C.formGroup()}registerWithDockingManager(e,t){C.parentWindow&&(p.default.system.debug("registerWithDockingManager ignore registration request if has a parent"),t&&t());const n=C.name,{uuid:i}=C;this.startedRegistrationWithDocking=!0,this.routerClient.query("DockingService.registerWindow",{name:n,uuid:i,options:e||{},windowType:"WebWindow"},(()=>{this.startedRegistrationWithDocking=!1,this.deregisterPlease&&(this.deregisterWithDockingManager(),this.deregisterPlease=!1),p.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete."),t&&t()}))}deregisterWithDockingManager(e){this.startedRegistrationWithDocking&&(this.deregisterPlease=!0);const t=C.name;this.routerClient.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})}bumpFixedElements(e){if("complete"!==document.readyState)return setTimeout((()=>{this.bumpFixedElements(e)}),100);if(!e)return;let{absolute:t,fixed:n,bumpBy:i}=e;if(!t&&!n)return;const r=document.getElementById("FSBLHeader");if(!r||0===r.children.length||!r.children[0].clientHeight)return setTimeout((()=>{this.bumpFixedElements(e)}),100);"auto"===i?i="0px":-1===new String(i).indexOf("px")&&(i=`${i}px`);const o=document.body.getElementsByTagName("*"),s=o.length;for(let e=0;e<s;e++){if("FSBLHeader"===o[e].id||o[e].classList.contains("fsbl-header"))continue;const r=window.getComputedStyle(o[e],null),s=["0","0px",0],a=r.getPropertyValue("top");t&&o[e].parentNode===document.body&&"absolute"==r.getPropertyValue("position")&&("all"==t?o[e].style.top=`calc(${a} + ${i})`:"0Positioned"==t&&s.includes(a)&&(o[e].style.top=i)),n&&"fixed"==r.getPropertyValue("position")&&("all"==n?o[e].style.top=`calc(${a} + ${i})`:"0Positioned"==n&&s.includes(a)&&(o[e].style.top=i))}}bringWindowToFront(){C.bringToFront({forceFocus:!0},(e=>{e?p.default.system.error(`WindowClient.bringWindowToFront: failure:${e}`):p.default.system.info("WindowClient.bringWindowToFront: success")}))}injectStylesheetOverride(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(C.windowOptions.customData.cssOverride)),document.body.appendChild(e)}checkIfChildApp(){if(C.windowOptions&&C.windowOptions.customData&&C.windowOptions.customData.parentUUID&&C.windowOptions.customData.parentUUID!==d.System.Application.getCurrent().uuid){const e=d.System.Application.wrap(C.windowOptions.customData.parentUUID);e.addEventListener("crashed",this.close.bind(null,!1)),e.addEventListener("initialized",this.close.bind(null,!1)),e.addEventListener("out-of-memory",this.close.bind(null,!1))}}preventUnintendedDropEvents(){function e(e){e.preventDefault()}window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&g.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,d.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&g.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,d.System.Window.getCurrent().updateOptions({resizable:!1}))};FSBL&&l.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){FSBL&&l.default.onReady((()=>{l.default.addBrowserHotkey(["ctrl","r"],C.reload)}))}addListeners(e=Function.prototype){this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),C.addListener("setParent",(()=>{p.default.system.info("WindowClient.setParent deregisterWithDockingManager"),this.deregisterWithDockingManager()})),C.addEventListener("maximized",this.onWindowMaximized),C.addEventListener("minimized",this.onWindowMinimized),C.addEventListener("restored",this.onWindowRestored),C.addEventListener("blurred",this.onWindowBlurred),C.addEventListener("focused",this.onWindowFocused),e()}updateHeaderState(e,t){this.commandChannel&&this.commandChannel(e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){C.ejectFromGroup()}setWindowTitle(e){p.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){h.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),C.setTitle(e)}getSpawnData(){if(!this.options.customData)return{};const{spawnData:e}=this.options.customData;return void 0===e?{}:e}getCurrentWindow(){return d.System.Window.getCurrent()}async getDesktopBoundingBox(e){let t=e;"string"==typeof e&&(t=document.querySelector(e));const n=t.getBoundingClientRect(),i=await C.getBounds(),r=i.data;let o,s;i.err?(o=this.options.defaultTop,s=this.options.defaultLeft):(o=r.top,s=r.left);const a={top:o+n.top,left:s+n.left,width:n.width,height:n.height,right:0,bottom:0};return a.right=a.left+a.width,a.bottom=a.top+a.height,a}isPointInBox(e,t){return t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top}isMouseOverDOMElement(e,t){this.getDesktopBoundingBox(e).then((e=>{d.System.getMousePosition(((n,i)=>{t(this.isPointInBox(i,e))}))}))}getWindowIdentifier(){var e=null;return this.options&&this.options.customData&&this.options.customData.component&&(e=this.options.customData.component.type),{windowName:C?C.name:window.name,uuid:C?C.uuid:null,componentType:e}}setActive(e){var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):_(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(_(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")}getBounds(e){C.getBounds(((t,n)=>{e(t,n)}))}setShape(e,t=Function.prototype){C.setShape(e,t)}startTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.startTilingOrTabbing",e),t()}startMovingWindow(e){d.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){d.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t=Function.prototype){console.debug("CancelTilingOrTabbing"),g.default.transmit("DockingService.cancelTilingOrTabbing",e),t()}sendIdentifierForTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.identifierForTilingOrTabbing",e),t()}stopTilingOrTabbing(e,t=Function.prototype){const n=()=>{g.default.query("DockingService.stopTilingOrTabbing",e,(()=>{t()})),g.default.transmit("DockingService.stopTilingOrTabbing",e)};return e.mousePosition?(n(),e.allowDropOnSelf?void 0:t()):d.System.getMousePosition(((i,r)=>{if(e.mousePosition=r,n(),!e.allowDropOnSelf)return t()}))}getStackedWindow(e,t){if(p.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!C.parentWindow&&e.create){const n=e=>{const{parentName:i}=e.data;C.setParent({windowName:i},((e,n)=>{t?.(e,n)})),C.removeListener("parent-set",n)};C.addListener("parent-set",n),FSBL.Clients.LauncherClient.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{p.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&t?.(e,null)}))}else C.getParent(t)}getMonitorInfo(e,t){c.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data)}))}))}fitToDOM(e,t){let n=document.documentElement.offsetHeight,i=this.options.width;"function"==typeof e&&(t=e,e=null),e&&e.padding&&(e.padding.height&&(n+=e.padding.height),e.padding.width&&(i+=e.padding.width)),e&&e.maxHeight&&n>e.maxHeight&&(n=e.maxHeight),p.default.system.debug("WindowClient.FitToDOM:newHeight",n,e),this.getMonitorInfo({},((e,r)=>{r&&(n>=r.availableRect.height&&(n=r.availableRect.height),i>=r.availableRect.width&&(i=r.availableRect.width)),p.default.system.debug("WindowClient.FitToDOM:fixBounds",n,i),C.getBounds(((e,r)=>{r.width!=i||r.height!=n?(r.width=i,r.height=n,C.setBounds({bounds:r},t)):"function"==typeof t&&t()}))}))}_setHeaderHeight(e){let t=document.getElementsByClassName("fsbl-header")[0];if(!t)return setTimeout((()=>{this._setHeaderHeight(e)}),100);let n=window.getComputedStyle(t,null).getPropertyValue("height");document.body.style.marginTop=n,e.bumpElements&&"auto"===e.bumpElements.bumpBy&&(e.bumpElements.bumpBy=n),this.bumpFixedElements(e.bumpElements)}async start(e=Function.prototype){if(h.default.args(e,"function"),b.iAmAServiceWindow())return this.isInAService=!0,e();setInterval((()=>{C&&document?.title&&this.title!==document.title&&(!FSBL.System.isBrowserView&&FSBL.System.hasBrowserView||this.setWindowTitlePrivate(document.title))}),200);const t=this;await v.default.getValue("finsemble");let n=null,i=!1,r=!1,o=!1;this.componentState={},(e=>{m.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{if(p.default.system.debug(`FinsembleWindow.getInstance ${this.finWindow?.name}`),"Cannot Wrap Service Manager or Services"==t)return this.isInAService=!0,this.windowHash=c.camelCase("activeWorkspace",window.name),e();!t&&n||p.default.system.error("wrap failure",t),this.finsembleWindow=n,({finsembleWindow:C}=this),this.windowHash=c.camelCase("activeWorkspace",C.name),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),e()}))})((()=>{this.retrieveMonitorDimensions(),this.getInitialOptions((()=>{if(!C||!C.windowOptions)return this.isInAService||p.default.system.error("Something went wrong attempting to get the current window."),e();({customData:n}=C.windowOptions),p.default.system.debug("getInitialOptions",n),n&&(i=S(n,"window.compound",!1),n.cssOverride&&(p.default.system.debug("Window has cssOverride. See local window to inspect object"),r=!0),o=!i&&S(n,["foreign","components","Window Manager","FSBLHeader"],!1)),a.parallel([function(e){r&&t.injectStylesheetOverride(),e()},function(e){v.default.getValue("finsemble",((n,i)=>{n&&p.default.system.error("Error reading windowService config from finsemble");const r=i.services.windowService.config.enableWindowsAeroSnap;t.enableWindowsAeroSnap=w.ConfigUtilInstance.getDefault(i,"config.servicesConfig.docking.enableWindowsAeroSnap",r),e()}))},function(e){if(d.System.isBrowserView())e();else{if(!n||!n.component||b.iAmAServiceWindow())return e();{let i=w.ConfigUtilInstance.getDefault(n,"customData.foreign.services.windowService.manageWindowMovement",!1);i||(i=w.ConfigUtilInstance.getDefault(n,"customData.foreign.services.dockingService.manageWindowMovement",!1));const r=w.ConfigUtilInstance.getDefault(n,"customData.foreign.components.Window Manager.FSBLHeader",!1),o=w.ConfigUtilInstance.getDefault(n,"customData.window.dockable",!1);i=i||r||o;let s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangable"},null);if(null===s&&(s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangeable"},i)),!i&&!s)return e();if(n.window.allowAutoArrange=s,n.window.snapping=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowSnapping",oldValue:"ignoreSnappingRequests"},i),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreSnappingRequests&&(n.window.snapping=!n.foreign.services[e].ignoreSnappingRequests)}if(w.ConfigUtilInstance.getDefault(n,"customData.window.ephemeral",!1)&&!n.window.snapping&&(n.window.snapping=!1),n.window.tiling=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTiling",oldValue:"ignoreTilingAndTabbingRequests"},i),n.window.tabbing=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTabbing",oldValue:"ignoreTilingAndTabbingRequests"},i),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreTilingAndTabbingRequests&&(n.window.tiling=!n.window.tiling,n.window.tabbing=!n.window.tabbing)}n.window.canGroup=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowGrouping",oldValue:"canGroup"},i),n.window.canMinimize=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowMinimize",oldValue:"canMinimize"},void 0),void 0===n.window.canMinimize&&(n.window.canMinimize=n.component.canMinimize,void 0===n.window.canMinimize&&(n.window.canMinimize=i)),void 0===n.window.canMaximize&&(n.window.canMaximize=n.component.canMaximize,void 0===n.window.canMaximize&&(n.window.canMaximize=i)),n.window.overwriteStartDocked=w.ConfigUtilInstance.getDefault(n,"customData.foreign.services.workspaceService.global",!1),t.registerWithDockingManager(n.window,(()=>{t.cacheInitialBounds(e)}))}}}],((t,n)=>e(t,n)))}))}))}}var W=new A({startupDependencies:{clients:["storageClient"]},onReady(e){W.start(e)},name:"windowClient"});t.default=W},6008:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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(72669),u=o(n(76420)),l=s(n(13712)),c=s(n(72551)),d=n(78379),f=n(33998),p=s(n(73014));class h extends a._BaseClient{constructor(e){super(e),this.workspaces=[],this.setWorkspaces=this.setWorkspaceOrder,this.createNewWorkspace=this.createWorkspace,this.getWorkspaceDefinition=this.export,this.addWorkspaceDefinition=this.import,this.saveWorkspaceTemplateToConfigFile=this.exportToFile,l.default.args(e,"object=")&&e&&l.default.args2("params.onReady",e.onReady,"function="),this.publicEventManager=new p.default({name:"workspaceClient",sourceType:"workspace"})}_serviceResponseHandler(e,t,n,i,r=Function.prototype){if(e)return i(new Error(e)),r(e);t||(t={data:null}),n(t.data),r(null,t.data)}saveGlobalData(e,t){return c.default.system.debug("WorkspaceClient.saveGlobalData",e),new Promise(((n,i)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_GLOBAL_DATA,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}saveViewData(e,t){return c.default.system.debug("WorkspaceClient.saveViewData",e),new Promise(((n,i)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_VIEW_DATA,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}async addWindow(e,t=null){l.default.args(e,"object",t,"function=")&&e&&l.default.args2("params.name",e.name,"string");const{err:n,response:i}=await this.routerClient.query("WorkspaceService.addWindow",e,(()=>{}));if(c.default.system.log(`WORKSPACE LIFECYCLE: Window added:WorkspaceClient.addWindow: Name (${e.name})`),t&&t(n,i),!t&&n)throw n;return i}removeWindow(e,t=Function.prototype){l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),this.routerClient.query("WorkspaceService.removeWindow",e,((n,i)=>{if(n)return c.default.system.error(n);c.default.system.log(`WORKSPACE LIFECYCLE:WorkspaceClient.removeWindow:Window removed: Name (${e.name})`),t(n,i?i.data:null)}))}autoArrange(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{},u.getMyWindowIdentifier((e=>{this.routerClient.query("DockingService.autoArrange",{windowIdentifier:e},t)}))}minimizeAll(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.minimizeAll",e,t)}))}bringWindowsToFront(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.bringWindowsToFront",e,t)}))}async getActiveWorkspace(e){c.default.system.debug("WorkspaceClient.getActiveWorkspace");const t=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE,{})).response;if(this.activeWorkspace=t.data,t.data.err)throw e&&e(t.data.err),new Error(t.data.err);return e&&e(null,t),t}getWorkspaces(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaces"),new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}getWorkspaceActions(e){return e(null,d.WORKSPACE.API_CHANNELS)}getWorkspaceNames(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaceNames"),new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACE_NAMES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}setWorkspaceOrder(e,t){const{workspaces:n}=e;return l.default.args(t,"function"),c.default.system.debug("WorkspaceClient.setWorkspaceOrder",e),new Promise(((i,r)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WORKSPACE_ORDER,n||e,((e,n)=>{this._serviceResponseHandler(e,n,i,r,t)}))}))}remove(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&!e.name&&!e.workspace&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.remove",e),new Promise((async(n,i)=>{e.name||(e.name=e.workspace?.name,delete e.workspace);const r=(await this.getActiveWorkspace()).data;if(e.name===r.name){c.default.system.error(`APPLICATION LIFECYCLE: Cannot remove active workspace: WorkspaceClient.remove:attempt to remove active workspace name:${r.name}`);const e="Cannot remove active workspace";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.REMOVE,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}rename(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.oldName",e.oldName,"string","params.newName",e.newName,"string"),c.default.system.debug("WorkspaceClient.rename",e),new Promise(((n,i)=>{if(!e.overwriteExisting&&this.workspaceExists(e.newName)){const e="Workspace Already Exists";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.RENAME,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}clone(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),delete e.name,e.newName||(e.newName=`${e.name}_clone`),e.removeOldWorkspace=!1,this.rename({removeOldWorkspace:!1,newName:e.newName,oldName:e.name},t)}save(e=Function.prototype){return c.default.system.debug("WorkspaceClient.save"),new Promise(((t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}workspaceExists(e){l.default.args(e,"string");for(let t=0;t<this.workspaces.length;t++)if(e===this.workspaces[t])return!0;return!1}saveAs(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.saveAs",e),new Promise(((n,i)=>{if(!e.force&&this.workspaceExists(e.name))return this._serviceResponseHandler("Workspace Already Exists",null,n,i,t);this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_AS,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}async switchTo(e,t=Function.prototype){l.default.args(e,"object",t,"function")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.switchTo",e);const n=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.SWITCH_TO,e);if(n.err)throw t(n.err,null),new Error(n.err);return t(n),n}async _setWindowState(e){if(!this.activeWorkspace)throw"Workspace is not yet ready";if(!this.activeWorkspace.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";return c.default.system.debug("WorkspaceClient.setWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WINDOW_STATE,e)}async _getWindowState(e){return c.default.system.debug("WorkspaceClient.getWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WINDOW_STATE,e)}async isWorkspaceDirty(e=Function.prototype){l.default.args(e,"function"),c.default.system.debug("WorkspaceClient.isWorkspaceDirty");const{err:t,response:n}=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE_DIRTY,{},(()=>{}));return e(t,n),n.data}async createWorkspace(e,t,n=((e,t)=>{e&&(c.default.system.error(`Error creating workspace: ${e}`),c.default.system.info(`Result from create workspace: ${t}`))})){c.default.system.log(`WorkspaceClient: Creating Workspace Request for name "${e}"`);const i=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.NEW_WORKSPACE,{workspaceName:e})).response.data;!1!==t.switchAfterCreation&&await this.switchTo({name:i});const r={workspaceName:i};return n(null,r),r}export(e,t){return l.default.args(e,"object",t,"function")&&l.default.args2("params.workspaceName",e.workspaceName,"string"),c.default.system.debug("WorkspaceClient.export",e),new Promise(((n,i)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.EXPORT,e,((r,o)=>{const s={};s[e.workspaceName]=o.data,this._serviceResponseHandler(r,{data:s},n,i,t)}))}))}async import(e,t){l.default.args(e,"object",t,"function=")&&l.default.args2("params.workspaceJSONDefinition",e.workspaceJSONDefinition,"object"),c.default.system.debug("WorkspaceClient.import",e);const n=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.IMPORT,e)).response.data;if(n&&n.err)throw t(n.err),new Error(n.err);return t&&t(null,n),n}exportToFile(e){c.default.system.info("workspaceClient.saveWorkspaceTemplateToConfigFile",e),l.default.args(e,"object")&&l.default.args2("params.workspaceTemplateDefinition",e.workspaceTemplateDefinition,"object");const{workspaceTemplateDefinition:t}=e;if("object"==typeof t){const e=Object.keys(t)[0];if(e&&t[e].templateDefinitionFlag){const n={workspaceTemplates:t};f.ConfigUtilInstance.promptAndSaveJSONToLocalFile(`workspaceConfig-${e}`,n)}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile. Input is not a legal template")}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile: Input is not a legal object")}async start(e){this.routerClient.subscribe("Finsemble.WorkspaceService.update",((t,n)=>{c.default.system.debug("workspaceClient init subscribe response",t,n),t?c.default.system.error(t):(this.activeWorkspace=n.data.activeWorkspace,this.workspaces=n.data.workspaces,e&&e())}))}}var m=new h({onReady:e=>{m.start(e)},name:"workspaceClient"});t.default=m},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 i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(i)>-1||(n.g[i]=new t),n.g[i]}},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 i=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 r=n(5939),o=i(n(39319)),s=n(78379),a=i(n(5020)),u=i(n(72551));class l extends r.EventEmitter{constructor(e){super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),delete this.startupTimer}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout")}),1e4)}}function c(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class d{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=c();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new l({dependencies:e,callback:t});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[n]=i,this.checkDependencies(),i}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:i}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),i&&i())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=c();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(u.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class p extends r.EventEmitter{constructor(){super(),this.startup=new d,this.shutdown=new f,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=p,t.FSBLDependencyManagerSingleton=new p,t.default=t.FSBLDependencyManagerSingleton},24232:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.removeKeys=t.toRecord=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.getProp=t.composeRL=t.instrumentPromise=t.promisify=t.identity=t.isNumber=t.chunkArray=t.Timeout=t.mockLogger=t.capitalizeFirst=t.clone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const r=n(50586),o=i(n(80089)),s=i(n(75892)),a=i(n(47184)),u=i(n(65162)),l=n(33998),c=i(n(72551)),d=window;function f(e,t){if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return t("clone error",e),e}}function p(e,t){return new Promise(((n,i)=>{const r=setTimeout((()=>{clearTimeout(r),i(t)}),e)}))}function h(e,t,n){return`${e}.${t}.${n}`}function m(e,t,n){const i=`${h(e.baseString,e.newPath,e.newValue)}`;c.default.system.deprecated(`${h(e.baseString,t,n)} has been deprecated in favor of ${i}`)}t.guuid=function(){return r.v4()},t.iAmAServiceWindow=function(){return!(!d.finsembleServices||!d.finsembleServices.length)},t.isServiceInWindow=function(e){return d.finsembleServices&&d.finsembleServices.find((t=>t.name===e))},t.clone=f,t.capitalizeFirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.mockLogger=new class{constructor({debug:e}={debug:!0}){e?(this.system=console,this.system.debug=console.log):this.system={warn:Function.prototype,debug:Function.prototype,log:Function.prototype,info:Function.prototype,error:console.error}}isLogMessage(){return!0}start(){}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.chunkArray=function(e,t){if(e<=0)throw new Error("Can't chunk array by number less than 0");return t.reduce(((n,i,r)=>{if(r%e==0){const i=[];for(let n=r;n<r+e;n++)n<t.length&&i.push(t[n]);n.push(i)}return n}),[])},t.isNumber=function(e){return!(!e||Number.isNaN(Number(e)))&&Number(e)},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((i,r)=>{n.push(((e,t)=>e?r(e):i(t))),e.apply(t,n)}))}},t.instrumentPromise=async(e,t,n)=>{const i=`${t} end`;return e(`${t} start`),n.then((()=>e(i)))},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getProp=function e(t,n,i){const r=Array.isArray(n)?n:n.split(".").filter((e=>e.length));return r.length?e(t[r.shift()],r,i):void 0===t?i:t},t.getRandomWindowName=function(e="RouterClient"){return`${e}-${r.v4()}`},t.timeoutPromise=p,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,p(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===(o.default(e,"windowIdentifier.windowType")||e.windowType)},t.toRecord=function(e,t){const n="string"==typeof e?t=>t[e]:e;return t.reduce(((e,t)=>(e[n(t)]=t,e)),{})},t.removeKeys=function(e,t){if(!e)return e;const n=Object.keys(e).filter((e=>!t.includes(e)));return s.default(e,n)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],i=s.default(e,n),r=s.default(t,n);return!!a.default(i,r)},t.sleep=function(e,t=!1){return new Promise(((n,i)=>{t?setTimeout((()=>{try{i("timeout expired")}catch{}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=function(e,t){const n=f(e,Function.prototype),i=f(t,Function.prototype);return u.default(n,i,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return u.default(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:i,oldPath:r,newPath:o,oldValue:s,newValue:a}=t;let u=l.ConfigUtilInstance.getDefault(e,h(i,o,a),null);return null===u&&(u=l.ConfigUtilInstance.getDefault(e,h(i,o,s),null),u?m(t,o,s):(u=l.ConfigUtilInstance.getDefault(e,h(i,r,a),null),u?m(t,r,a):(u=l.ConfigUtilInstance.getDefault(e,h(i,r,s),null),u?m(t,r,s):u=n))),u}},59459:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(39319)),u=o(n(78379));t.default=class{constructor(e,t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=t.data.guid,this.internalHandler()}async internalHandler(){this.data=this.queryMessage.data.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?(this.delayed=!0,this.queryMessage.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){this.completed=!0,this.delayed?a.default.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):this.queryMessage.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},73014:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(39319)),o=i(n(72551)),s=i(n(57815)),a=i(n(73601)),u=n(24232);class l extends s.default{constructor(e){super(e),this.eventList=[],this.eventHandlerMap={},this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.waitList={},r.default.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerListener(t?.data.event,t?.data.listenerGuid)})),r.default.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterListener(t?.data.event,t?.data.listenerGuid)}))}registerListener(e,t){this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t)}unregisterListener(e,t){this.remoteListenerEventMap[e]||o.default.system.warn("not found"),this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t))}awaitRemoteDelayer(e,t){return new Promise(((n,i)=>{const o=(s,a)=>{r.default.removeListener(`Finsemble.Listener.Done.${e}.${t}`,o),!0===a.data.canceled?i("canceled"):n(a.data.data)};this.waitList[e]=o,r.default.addListener(`Finsemble.Listener.Done.${e}.${t}`,o)}))}async queryRemoteListener(e,t,n,i){const o=`${window.name}_private_${Date.now()}_${Math.random()}`,s={event:e,guid:o,data:n},a=this.awaitRemoteDelayer(o,t);let{response:l}=await Promise.race([r.default.query(`Finsemble.Interrupt.${t}`,s,(()=>{})),u.sleep(i.initialQueryTimeout,!0)]).catch((()=>{throw r.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),"eventHandler failed initial response"}));if(l.header.error)return;let c=!0;if(!0===l.data.delayed)try{return c=!1,await Promise.race([a,u.sleep(i.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";c=!0}if(c&&r.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),!0===l.data.canceled)throw"event was canceled";return l.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){o.default.verbose(`Triggering ${e} for ${this.name}`,t);const i=[];if(this.remoteListenerEventMap[e])for(let r of this.remoteListenerEventMap[e])i.push(this.queryRemoteListener(e,r,t,n));if(this.eventHandlerMap[e]){const r=[...this.eventHandlerMap[e]],o=[...this.eventGuidMap[e]];for(let s=0;s<r.length;s++){const u=r[s],l=o[s],c=new a.default({source:this.name,sourceType:this.sourceType,handler:u,event:e,data:t,options:n,guid:l});i.push(c.complete)}}try{return await Promise.all(i)}catch(e){if("eventHandler failed initial response"!==e)throw"event was canceled";console.error(e)}}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_private_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n)}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("Trying to remove non-existent listener");let n=this.eventHandlerMap[e].indexOf(t);-1!==n&&(this.eventGuidMap[e][n],this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1))}cleanup(){}}t.default=l},73601:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(78379));t.default=class{constructor(e){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.data=e.data,this.guid=e.guid,s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled():this.eventComplete(e)}}},57815:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(39319)),o=i(n(72551)),s=i(n(59459));t.default=class{constructor(e){this.eventList=[],this.eventHandlerMap={},this.eventGuidMap={},this.name=e.name,this.sourceType=e.sourceType,window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_public_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n),r.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n}),r.default.addResponder(`Finsemble.Interrupt.${n}`,((i,r)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},r)}))}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("not found");let n=this.eventHandlerMap[e].indexOf(t);if(-1!==n){const t=this.eventGuidMap[e][n];this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1),r.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${window.name}`,{event:e,guid:t}),r.default.removeResponder(`Finsemble.Interrupt.${t}`)}}cleanup(){for(var e of Object.keys(this.eventHandlerMap))for(var t of this.eventHandlerMap[e])this.removeEventListener(e,t)}}},50631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},52283:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(i=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",i.SNOOZE="SNOOZE",i.SPAWN="SPAWN",i.QUERY="QUERY",i.PUBLISH="PUBLISH",i.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},55016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.include=[],this.exclude=[]}}},31376:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},95320:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(31376));t.default=class{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new r.default,this.stateHistory=[]}}},12521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.id=e||null,this.filter=t}}},82369:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(72551)),o=n(51742),s={activeTransports:{},liveTransport:null,addTransport(e,t){this.activeTransports[e]=t,r.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),r.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,i,r)=>new Promise(((o,a)=>{const u=s.activeTransports[t];u?s.liveTransport=new u(e,n,i,r,(e=>{o(e)})):a(`unknown router transport name: ${t}`)})),close(){s.liveTransport&&(s.liveTransport.close(),s.liveTransport=null)}},a=function(e,t,n,i,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]),r.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){r.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`;r.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],i=e.data[1],o={transportID:a.identifier(),port:n};r.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",i),t(o,i)},s.onerror=function(e){r.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,i,s){const{uuid:a}=o.System.Application.getCurrent(),u=this;this.send=function(e,t){let n;1===arguments.length?(n=i,t=arguments[0]):(n=e.name,t=arguments[1]),r.default.system.verbose("IPCTransport Outgoing Transport",a,n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=function(){return"IPCBus"},r.default.system.log(`IPCBus Transport Initializing for ${n}`),console.log(`IPCBus Transport Initializing for ${n}`);const l=o.System.InterApplicationBus.subscribe("*",n,(function(e,n){const i={transportID:u.identifier(),senderUuid:n,name:e.header.origin};r.default.system.verbose("IPCTransport Incoming Transport",i,"Message",e),t(i,e)}),(()=>{}),(function(e){r.default.system.error(`IPCBus Subscribe Failure: ${e}`)}));this.close=()=>{o.System.InterApplicationBus.unsubscribe(l)},s(this)},l=function(e,t,n,i,o){const s=`${e?.transportSettings?.FinsembleTransport?.serverAddress??e?.transportSettings?.serverAddress??"ws://127.0.0.1:3376"}/router`,a=this;let u;function l(){r.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function c(){r.default.system.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),console.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),s.startsWith("ws:")||s.startsWith("wss:")||console.error(`Illegal WebSocket address "${s}" (Missing ws:// or wss:// ?)`),u=new WebSocket(s);const e=setTimeout(l,3e3);u.addEventListener("open",(()=>{clearTimeout(e),r.default.system.log("FinsembleTransport Connected to Server"),console.log("FinsembleTransport Connected to Server"),u.addEventListener("message",(e=>{const i=JSON.parse(e.data);("RouterService"===n&&"ROUTER_SERVICE"==i.dest||n===i.message.client)&&function(e){const n={transportID:a.identifier(),client:e.clientMessage.header.origin};r.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}(i.message)})),o(a)}))}this.send=function(e,t){let n,i;1===arguments.length?(n="ROUTER_SERVICE",i={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],i={client:e.client,clientMessage:t}),r.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",i),u.readyState===WebSocket.OPEN&&u.send(JSON.stringify({dest:n,message:i})),u.readyState===WebSocket.CONNECTING&&u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:i}))})),u.readyState===WebSocket.CLOSED&&(c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:i}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:i}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},c()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",l),t.default=s},51742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const i=n(16925);class r{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}=i.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{e&&e({})},addEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return{}}}class s{constructor(e,t,n){return new fin.desktop.Application(e,t)}static get getCurrent(){return fin.desktop.Application.getCurrent}static get wrap(){return fin.desktop.Application.wrap}}class a{constructor(e){new fin.desktop.Notification(e)}}class u{constructor(){return new fin.desktop.System.Clipboard}static get writeText(){return fin.desktop.System.Clipboard.writeText}static get writeHTML(){return fin.desktop.System.Clipboard.writeHTML}static get writeRTF(){return fin.desktop.System.Clipboard.writeRTF}static get readText(){return fin.desktop.System.Clipboard.readText}static get readHTML(){return fin.desktop.System.Clipboard.readHTML}static get readRTF(){return fin.desktop.System.Clipboard.readRTF}}class l{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return l.isFreestanding()?o:r}static get Notification(){return a}static get Clipboard(){return u}static async getMousePosition(e=Function.prototype){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),e(null,n),t(n)}),(t=>{e(t,null),n(t)}))}))}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e(n)}))}))}static container(){return"undefined"==typeof fin?"freestanding":fin.container?fin.container:"FEA"}static isBrowserView(){return!l.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!l.isFreestanding()&&fin.hasBrowserView()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get getAllApplications(){return fin.desktop.System.getAllApplications}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get getRuntimeInfo(){return fin.desktop.System.getRuntimeInfo}static get addEventListener(){return l.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getAllWindows(){return fin.desktop.System.getAllWindows}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static closeApplication(e,t=Function.prototype){return new Promise((n=>{let i,r=!1;const o=()=>{r||(console.log("Attempting to terminate",e.uuid),e.terminate((()=>{t(),n()}),(()=>{r||(r=!0,clearInterval(i),console.log("force closing ",e.uuid),e.terminate())})))};i=setInterval(o,2e3),console.log("closing ",e.uuid),e.close(!1,(()=>{console.log("app.close: successfully closed",e.uuid),r=!0,clearInterval(i),t(),n()}),o)}))}}t.System=l},5020:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(39319)),o=i(n(72551)),s=n(56188),a=n(33509),u=n(95269),l=new class{publishBootStatus(e,t,n){console.log("publishStartingStatus",e,n),o.default.system.debug("publishBootStatus",e,t,n),r.default.publish(u.statusChannel(e),{name:e,type:t,state:n})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((i,u)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const l=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const c=r.default.subscribe(a.STAGE_CHANNEL,((a,d)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data.stage,c),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===l)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),u(a);else{const a=s.ALL_BOOT_STAGES.indexOf(d.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data,c),"stageEntered"===t&&a+1>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,c,n.name),n(),i(),r.default.unsubscribe(c)):"stageCompleted"===t&&a>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,c),n(),i(),r.default.unsubscribe(c)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${l} `,a,l,e,c)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,i)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=r.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),i()):u.data.name===e&&"completed"===u.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),r.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)),r.default.publish(u.checkpointChannel(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),r.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),r.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=l},76420:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.adjustBoundsToBeOnMonitor=t.isOnAMonitor=t.getNewBoundsWhenMovedToMonitor=t.openSharedData=t.injectJS=t.guuid=t.camelCase=t.getMyWindowIdentifier=t.getMonitorByDescriptor=t.windowOnMonitor=t.getMonitorFromCommand=t.getMonitor=t.getWhichMonitor=t.findMonitor=t.getWindowDescriptor=t.getFinWindow=t.getMonitorFromWindow=t.getMonitorFromXY=t.getAllMonitors=t.crossDomain=t.isPercentage=t.castToPromise=t.getContainerVersion=t.clone=t.Monitors=void 0;const r=i(n(36589)),o=n(51742),s=i(n(93802)),a=i(n(72551));function u(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?u(e[n],null):t[n];return t}function l(e,n){const i=Number.isFinite(e.x)?e.x:e.defaultLeft,r=Number.isFinite(e.y)?e.y:e.defaultTop,o=i+e.defaultWidth,s=r+e.defaultHeight;return new Promise(((e,l)=>{t.Monitors.getMonitorFromScaledXY(i,r,(c=>{if(!c)return a.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right"),void t.Monitors.getMonitorFromScaledXY(o,s,(o=>{if(!o)return a.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary"),void t.Monitors.getAllMonitors((t=>{t[0]?(n&&n(t[0]),e(t[0])):(l(new Error("Cannot find monitor for window.")),n&&n(null))}));o=u(o);const{monitorRect:s}=o;(s.left<i||s.right<r)&&(o.straddling=!0),n&&n(o),e(o)}));c=u(c);const{monitorRect:d}=c;(d.right>o||d.bottom>s)&&(c.straddling=!0),n&&n(c),e(c)}))}))}function c(e,t){return new Promise(((n,i)=>{const r=o.System.Window.getCurrent();r.getOptions((s=>{if(e&&e.windowName){e.uuid||(e.uuid=s.uuid);const r=o.System.Window.wrap(e.uuid,e.windowName);r.getInfo((()=>{t&&t(r),n(r)}),(()=>{t&&t(null),i(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}))}else if(e&&e.componentType)if(void 0!==window.LauncherService){const r=window.LauncherService.componentFinder(e);r?(n(r),t&&t(r)):(i(`util.getFinWindow: Component ${e.componentType} not found.`),t&&t(null))}else i("getFinWindow by componentType is currently only operable within LaunchService"),t&&t(null);else t&&t(r),n(r)}))}))}function d(e,t){return new Promise(((n,i)=>{c(e).then((e=>{e.getOptions((e=>{t&&t(e),n(e)}))})).catch((e=>{console.warn(e),t&&t(null),i(e)}))}))}function f(e,t,n){for(let i=0;i<e.length;i++){const r=e[i];if(r[t]===n)return r}return null}function p(e,n){let i;arguments.length>2&&(e={commandMonitor:arguments[0],monitors:arguments[1],launchingMonitorPosition:arguments[2]},n=null);let{commandMonitor:r,monitors:o,launchingMonitorPosition:s}=e;const a=r&&""!==r||0===r;if("primary"===r)i=f(o,"whichMonitor","primary");else if("next"===r){let e=s+1;e>=o.length&&(e=0),i=o[e]}else if("previous"===r){let e=s-1;e<0&&(e=o.length-1),i=o[e]}else if("mine"===r){var u=!0;activeWindows.getWindow(e.windowIdentifier.windowName)._getBounds(((e,r)=>{e?(i=o[0],n(i)):t.Monitors.getMonitorFromScaledXY(r.left,r.top,(e=>{n(e)}))}))}else a?(r>=o.length&&(r=o.length-1),i=o.filter((e=>e.position===r))[0]):s&&(i=o[s]);if(i||(i=o[0]),!u){if(!n)return i;n(i)}}function h(e,t){return new Promise(((n,i)=>{d(e,(e=>{e?l(e,(e=>{t&&t(e),n(e)})):i("util.getMonitor: Can't locate windowDescriptor.")}))}))}t.Monitors=new s.default(Function.prototype,Function.prototype,{System:o.System}),t.clone=u,t.getContainerVersion=function(e=Function.prototype){return new Promise((t=>{o.System.getVersion((n=>{const i=n.split(".").map(Number),r={major:i[0],chromium:i[1],minor:i[2],patch:i[3]};e(r),t({versionObject:r})}))}))},t.castToPromise=function(e){return function(...t){return new Promise(((n,i)=>{const r=e.apply(null,Array.from(t));try{return r.then(n,i)}catch(e){e instanceof TypeError?n(r):i(e)}}))}},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,i=window.location.protocol===t.protocol,r=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=!(n&&r&&i);return a.default.system.debug(`Launcher crossDomain=${o} (${n}:${i}:${r})`),o},t.getAllMonitors=t.Monitors.getAllMonitors,t.getMonitorFromXY=t.Monitors.getMonitorFromScaledXY,t.getMonitorFromWindow=l,t.getFinWindow=c,t.getWindowDescriptor=d,t.findMonitor=f,t.getWhichMonitor=p,t.getMonitor=h,t.getMonitorFromCommand=function(e,n,i){return new Promise((r=>{h(n,(n=>{t.Monitors.getAllMonitors((t=>{p({commandMonitor:e,monitors:t,launchingMonitorPosition:n.position},(e=>{i&&i(e),r(e)}))}))}))}))},t.windowOnMonitor=function(e,t){return e.left>=t.left&&e.left<t.right||e.right<=t.right&&e.right>t.left},t.getMonitorByDescriptor=function(e,t){return new Promise((n=>{l(e,(e=>{t&&t(e),n(e)}))}))},t.getMyWindowIdentifier=function(e){const t=o.System.Window.getCurrent();return new Promise((n=>{t.getOptions((i=>{let r=null;const{customData:o}=i;o&&o.component&&(r=o.component.type);const s={windowName:t.name,uuid:t.uuid,componentType:r};e&&e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.guuid=function(){return r.default()},t.injectJS=function(e,t){const n=document.createElement("script");n.onload=t,n.type="text/javascript",n.async=!0,n.src=e;const i=document.getElementsByTagName("head")[0],r=i.getElementsByTagName("script")[0];i.insertBefore(n,r)},t.openSharedData=function(e,t){const n=FSBL.Clients.LauncherClient,i=FSBL.Clients.LinkerClient;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const i of Object.keys(e))e[i].length>n&&(t=i,n=e[i].length);return[t]});const r=[],o={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((s,u)=>{for(const e of Object.keys(u))if(u[e].componentTypes.length)for(const t of u[e].componentTypes)o[t]?o[t].push(e):o[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;r.push(t),a.default.system.error(t)}let l=Object.keys(o);if(l.length){l.length>1&&(l=e.multipleOpenerHandler(o));const s=Object.keys(i.channels);if(s.length)if(i.getLinkedComponents({componentTypes:l,windowIdentifier:i.windowIdentifier()}).length||e.publishOnly)i.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(r.length?r:null,"Data published");else{for(const t of l)n.spawn(t,{data:{sharedData:e.data,linker:{channels:s}},addToWorkspace:!0});t&&t(r.length?r:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of l)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(r.length?r:null,"New Window(s) spawned with data")}}else t&&t(r.length?r:null,null)}))},t.getNewBoundsWhenMovedToMonitor=function(e,t,n="availableRect"){const i=e[n]||e.availableRect||e.monitorRect,r=u(t);return t.top<i.top?r.top=i.top:t.top>i.bottom-t.height&&(r.top=i.bottom-t.height),t.left<i.left?r.left=i.left:t.left>i.right-t.width&&(r.left=i.right-t.width),r.bottom=r.top+r.height,r.right=r.left+r.width,r.right>i.right&&(r.right=i.right),r.top<i.top&&(r.top=i.top),r.left<i.left&&(r.left=i.left),r.bottom>i.bottom&&(r.bottom=i.bottom),r.height=r.bottom-r.top,r.width=r.right-r.left,{newBounds:r,distanceMoved:Math.sqrt((t.left-r.left)**2+(t.top-r.top)**2),monitor:e}},t.isOnAMonitor=function(e){return this.Monitors.allMonitors.some((t=>{const{monitorRect:n}=t;return e.left>=n.left&&e.left<=n.right&&e.right>=n.left&&e.right<=n.right&&e.top>=n.top&&e.top<=n.bottom&&e.bottom>=n.top&&e.bottom<=n.bottom}))},t.adjustBoundsToBeOnMonitor=function(e,t="availableRect"){if(this.isOnAMonitor(e))return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),e;const n=this.Monitors.allMonitors.map((n=>{let i=n.rawMonitor?n.rawMonitor:n;return this.getNewBoundsWhenMovedToMonitor(i,e,t)})).sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",e,"monitor name",n.monitor.name,"newBounds",n.newBounds),n.newBounds},t.isWindows=async function(e=Function.prototype){const t=(await o.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return a.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},10428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},75688:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=s(n(39319)),u=s(n(72551)),l=o(n(76420)),c=s(n(57815)),d=o(n(78379)),f=n(24232),p=n(51742),h=s(n(99748)),m=n(10428);window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class w extends c.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=w.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=d.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=l.camelCase("activeWorkspace",this.name,this.name),this.windowKey=l.camelCase("activeWorkspace",this.name),w.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t){if("closed"!==e||!window.finsembleWindow||this.name!==finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new w(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=w;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static getInstance(e,t=Function.prototype){const n=p.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),(e=h.default(e))&&e.name?(e.windowName=e.name,new Promise((async function(i,r){if(window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return i({wrap:n}),t(null,n)}if(e.uuid&&e.name){if(e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),!1!==e.waitForReady)try{await w._windowReady(e.windowName),e.wrapState="ready"}catch(e){return r(e),t(e,null)}if(u.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally"),window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return i({wrap:n}),t(null,n)}const{wrap:n}=await w._createWrap(e);return i({wrap:n}),t(null,n)}if(!1!==e.waitForReady)try{await w._windowReady(e.windowName),e.wrapState="ready"}catch(e){return r(e),t(e,null)}a.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async(n,o)=>{if(n)return u.default.system.error(n),r(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),i({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await w._createWrap(e);o.data.descriptor&&(a.descriptor=o.data.descriptor),i({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let i=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let r={...n};r=Object.assign(r,e),r.setWindowType=r.windowType,delete r.windowType,u.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=w;window._FSBLCache.windows[n.windowName]=new o(r),i=window._FSBLCache.windows[n.windowName],i.windowType=n.windowType,i.identifier=n,i.addEventListener("closed",i.handleWrapRemoveRequest),i.addEventListener("maximized",(()=>{i.windowState=w.WINDOWSTATE.MAXIMIZED})),i.addEventListener("minimized",(()=>{i.windowState=w.WINDOWSTATE.MINIMIZED})),i.addEventListener("restored",(()=>{i.windowState=w.WINDOWSTATE.NORMAL}));const s=a.default.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)u.default.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,a.default.unsubscribe(s)}}));i.parentSubscribeID=a.default.subscribe(`Finsemble.parentChange.${n.windowName}`,((e,n)=>{if(e)u.default.system.error("FinsembleWindow parent change notification error",e),t({wrap:i});else{const e=n.data||{};"Added"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",e),i.setParent(e.stackedWindowIdentifier,(()=>{t({wrap:i})}))):"Exists"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",e),i.setParentOnWrap(e.stackedWindowIdentifier,(()=>{t({wrap:i})}))):"Removed"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",e),i.clearParent(),t({wrap:i})):e.type?(u.default.system.error("FinsembleWindow Parent Notification: unknown type",e),t({wrap:i})):t({wrap:i})}}))}))}static _getRemoveWrapChannel(e){return`${p.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.default.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==window.name&&this.name&&(delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name]),e&&e.done()}cleanupRouter(){const e=w._getRemoveWrapChannel(this.name);a.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.default.unsubscribe(this.parentSubscribeID)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){if("close"===e||"setParent"===e||"ready"===this.wrapState)return new Promise((async(i,r)=>{"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,u.default.setting().system.Debug&&(t.callstack=u.default.callStack()),u.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);let o=null;a.default.query(this.windowServiceChannelName(e),t,((t,s)=>{t?(u.default.system.debug(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t),"getComponentState"!==e&&"Not found"!==t&&r(t)):(o=s.data,u.default.system.debug(`${this.windowServiceChannelName(e)} successful`,o),console.debug(`${this.windowServiceChannelName(e)} successful`,o)),i(o),n(t,o)}))}));this.onReady((()=>{this.wrapState="ready",this.queryWindowService(e,t,n)}))}minimize(e=null,t=Function.prototype){this.queryWindowService("minimize",e,t)}maximize(e=null,t=Function.prototype){this.getBounds(((n,i)=>{n?u.default.system.warn("Error getting bounds, cached bounds will not be set"):this.updateOptions({options:{cachedLeft:i.left,defaultLeft:i.left,cachedTop:i.top,defaultTop:i.top,cachedWidth:i.width,defaultWidth:i.width,cachedHeight:i.height,defaultHeight:i.height}}),this.queryWindowService("maximize",e,t)}))}restore(e=null,t=Function.prototype){this.queryWindowService("restore",e,t)}blur(e=null,t=Function.prototype){this.queryWindowService("blur",e,t)}focus(e=null,t=Function.prototype){this.queryWindowService("focus",e,t)}bringToFront(e=null,t=Function.prototype){this.queryWindowService("bringToFront",e,t)}setAlwaysOnTop(e={alwaysOnTop:!0},t=Function.prototype){this.queryWindowService("setAlwaysOnTop",e,t)}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",{},t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const i={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",i,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new m.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t=Function.prototype){"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,t)}getBounds(e={},t=Function.prototype){return new Promise((n=>{this.queryWindowService("getBounds",e,((e,i)=>{n({err:e,data:i}),t(e,i)}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t=Function.prototype){this.queryWindowService("hide",e,t)}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t=Function.prototype){this.queryWindowService("show",e,t)}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t=Function.prototype){u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(()=>{u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name),t()}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const i=()=>{a.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,i):i()}wrapReady(){a.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.default.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?u.default.system.warn("TabTile.stopTabTile: query failed",e):u.default.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(u.default.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){u.default.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.default.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.default.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?w.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}setParent(e,t){if(this.settingParent)return this.getParent(t);this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParent",e),w.getInstance(e,((n,i)=>{n?u.default.system.error("FinsembleWindow.setParent error",n):(u.default.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=i,this.parentWindow.windowType.includes("StackedWindow")||u.default.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.default.transmit(d.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const r=()=>{this.removeEventListener("parent-set",r),t(n,i)};this.addEventListener("parent-set",r)}))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParentOnWrap",e),w.getInstance(e,((n,i)=>{n?u.default.system.error("FinsembleWindow.setParentOnWrap error",n):(u.default.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=i,!1===this.parentWindow.windowType.includes("StackedWindow")&&u.default.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,i)}))}))}clearParent(){u.default.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.default.system.debug("Title change",e),a.default.publish(this.TITLE_CHANGED_CHANNEL,e)}getOptions(e=Function.prototype){this.queryWindowService("getOptions",{},e)}_privateManagementPreface(e,t){return"function"==typeof t&&u.default.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:this.identifier?.windowName,windowType:this.identifier?.windowType},u.default.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.default.query("StackedWindow.addWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.addWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.default.query("StackedWindow.removeWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.removeWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.default.query("StackedWindow.deleteWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.deleteWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.default.query("StackedWindow.setVisibleWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.setVisibleWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.default.query("StackedWindow.reorder",e,((e,i)=>{u.default.system.debug("StackedWindow.reorder callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=w,w.WINDOWSTATE={NORMAL:0,MINIMIZED:1,MAXIMIZED:2,HIDDEN:3},w.wrap=w.getInstance,w.isStartupApplication=async function(e){let t;const n=await new Promise(((e,t)=>{p.System.Application.getCurrent().getManifest(e,t)})).catch((()=>{t=!1}));return n&&(t=n&&n.startup_app&&n.startup_app.name===e),t},w._windowReady=function(e){let t;u.default.system.debug(`windowServiceReady: ${e} starting`);const n=`Finsemble.Component.State.${e}`;return new Promise((async(i,r)=>{await w.isStartupApplication(e)||f.isServiceInWindow(e)?r("Cannot Wrap Service Manager or Services"):(u.default.system.debug(`windowServiceReady: ${e} waiting`),t=a.default.subscribe(n,((n,r)=>{const{state:o}=r.data;switch(u.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.default.system.debug(`windowServiceReady: ${e} ${o}`),a.default.unsubscribe(t),i()}})))}))}},96755:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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),l=s(n(39319)),c=s(n(72551)),d=s(n(5020)),f=n(51742),p=o(n(78379)),h=n(6192),m=n(10589),{SERVICE_INITIALIZING_CHANNEL:w,SERVICE_READY_CHANNEL:g,SERVICE_QUERY_READY_CHANNEL:y,SERVICE_CLOSING_CHANNEL:v,SERVICE_CLOSED_CHANNEL:b,SERVICE_STOP_CHANNEL:S}=p,C={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},addOFWrapper:!1,name:window.name};t.BaseService=class{constructor(e=C){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=C.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=C.startupDependencies.clients)):e.startupDependencies=C.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=C.shutdownDependencies.services):e.shutdownDependencies=C.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=c.default,this.RouterClient=l.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){c.default.system.debug("BaseService.start.setParentUUID"),f.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,t.parentUuid=n.customData.parentUuid,e()}))}async function i(){await(new m.FSBLService).startApp(),l.default.addResponder(y(e.name),((t,n)=>{(e.status="ready")?n?.sendQueryResponse(null):n?.sendQueryResponse("service not ready")})),l.default.transmit(w,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),c.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function r(e){const n=t.customData.debugServiceDelay||0;if(c.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&c.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.`;c.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),d.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){c.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),c.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),l.default.transmit(`${f.System.Window.getCurrent().name}.onSpawned`,{name:f.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e).on("err",(e=>{c.default.system.error(e)}))}function s(e){const n=f.System.Window.getCurrent();n.isShowing((i=>{i&&!1!==t.customData.showDevConsoleOnVisible?f.System.showDeveloperTools(n.uuid,n.name,null,e):(c.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return c.default.system.debug(`${this.name} starting`),new Promise((e=>{a.series([i,n,s,r,o],(()=>{e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",l.default.transmit(g,{serviceName:this.name},{suppressWarnings:!0}),c.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),d.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){c.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"),c.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(){c.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(l.default.transmit(v,{waitForMe:!0,name:this.name}),a.each(this.listeners.onShutdown,(function(e,t){a.asyncify(e)(null,t)}),(function(t){t&&c.default.system.error(t),e.shutdownComplete()}))):(l.default.transmit(v,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){c.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),l.default.transmit(b,{name:this.name,uuid:f.System.Application.getCurrent().uuid})}},window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return c.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?c.default.warn("A service tried To wrap itself. This is a side effect of using Clients in services."):c.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 i=n(51742),r=n(33509);t.killOldApplications=function(e){return new Promise((async t=>{i.System.getAllApplications((async n=>{if(n)for(let t=0;t<n.length;t++){const r=n[t];if(r.uuid?.endsWith(`-${e}`)){const e=i.System.Application.wrap(r.uuid);await i.System.closeApplication(e)}}console.log("killOldApplications: finished closing old apps"),t()}))}))},t.statusChannel=function(e){return`${r.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${r.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},76163:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWindow=void 0;const a=s(n(74602)),u=s(n(39319)),l=s(n(70010)),c=s(n(72551)),d=n(24232),f=o(n(76420)),p=s(n(73014)),h=o(n(78379)),m=n(51742),w=n(78379),g=s(n(43190)),y=s(n(63862)),v=s(n(6008)),b=s(n(99748));g.default.initialize(),y.default.initialize(),l.default.initialize(),v.default.initialize(),window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class S{constructor(e){this.eventlistenerHandlerMap={},this.handleWrapStateChange=(e,t)=>{const{state:n}=t.data;n&&n!==this.wrapState&&"closed"!==n&&(this.wrapState=n,this.eventManager.trigger(n),this.eventManager.trigger("wrap-state-changed",{state:n}))},this.types={},this.guid=f.guuid(),this.wrapState="initializing",this.componentState={},this.windowState=S.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.windowOptions={},this.bounds={},this.name,this.enableWindowsAeroSnap=!1,this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=f.camelCase("activeWorkspace",this.name,this.name),this.windowKey=f.camelCase("activeWorkspace",this.name),S.bindFunctions(this),this.wrapStateChangeSubscription=u.default.subscribe(`Finsemble.Component.State.${this.name}`,this.handleWrapStateChange),this.eventManager=new p.default({name:this.name,sourceType:"Window"}),this.finishedMove=!0,this.oldState={}}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}_startMove(e=0){window.aeroMode=!1,0===e&&(this.finishedMove=!1)}_stopMove(){this.finishedMove=!0}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new S.types[e.setWindowType](e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=S;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.setupListeners=e.setupListeners.bind(e),e.onTitleChanged=e.onTitleChanged.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e)}setupListeners(e){c.default.system.debug("BaseWindow parent change notification setup",e),this.parentSubscribeID=u.default.subscribe(`Finsemble.parentChange.${e}`,((e,t)=>{if(e)c.default.system.error("BaseWindow parent change notification error",e);else{const e=t.data||{};"Added"==e.type?(c.default.system.debug("BaseWindow Parent Notification: window.addedToStack listener",e),this.setParent(e.stackedWindowIdentifier)):"Removed"==e.type?(c.default.system.debug("BaseWindow Parent Notification: window.removedFromStack listener",e),this.clearParent()):"Exists"===e.type||e.type&&c.default.system.error("BaseWindow Parent Notification: unknown type",e)}})),this.TITLE_CHANGED_SUBSCRIPTION=u.default.subscribe(this.TITLE_CHANGED_CHANNEL,this.onTitleChanged)}onTitleChanged(e,t){t&&t.data&&("string"==typeof t.data||"number"==typeof t.data)&&(this._updateOptions&&this._updateOptions({title:t.data}),this.eventManager.trigger("title-changed",{name:this.name,title:t.data}))}static getInstance(e,t=Function.prototype){const n=m.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),e&&e.name?(e.windowName=e.name,new Promise((async function(i,r){if(!1!==e.waitForReady&&(c.default.system.debug("WRAP LIFECYCLE:WAIT FOR READY",e.name),await S._windowReady(e.windowName),c.default.system.debug("WRAP LIFECYCLE:WAIT DONE -- READY",e.name)),window._FSBLCache.windows[e.name]){c.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return i({wrap:n}),t(null,n)}if(e.uuid&&e.name){e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),c.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally");const{wrap:n}=await S._createWrap(e);return i({wrap:n}),t(null,n)}u.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async function(n,o){if(n)return c.default.system.error(n),r(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return c.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),i({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),c.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await S._createWrap(e);i({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let i=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let r={...n};r=Object.assign(r,e),r=Object.assign(r,n),r.setWindowType=r.windowType,delete r.windowType,c.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=S;window._FSBLCache.windows.hasOwnProperty(n.windowName)?c.default.system.error("DUPLICATE WRAPPER for",n.windowName):window._FSBLCache.windows[n.windowName]=new o.types[r.setWindowType](r),i=window._FSBLCache.windows[n.windowName],i.windowType=n.windowType,i.identifier=n,i.setupListeners(n.windowName),t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${m.System.Window.getCurrent().name}.removeWrap.${e}`}handleWrapRemoveRequest(){this.removeListeners&&this.removeListeners(),this.eventManager.cleanup();for(const e in this.eventlistenerHandlerMap)for(let t=0;t<this.eventlistenerHandlerMap[e].length;t++)this.eventlistenerHandlerMap[e][t].interceptor.removeAllListeners();this.eventManager.cleanup(),c.default.system.debug("WRAP CLOSE. Deleting cached wrap."),delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name],this.cleanupRouter()}cleanupRouter(){const e=S._getRemoveWrapChannel(this.name);u.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&u.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),u.default.unsubscribe(this.wrapStateChangeSubscription)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,c.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t),console.debug("FinsembleWindow.queryWindowService",this,this.windowServiceChannelName(e),t);let i=null;u.default.query(this.windowServiceChannelName(e),t,((t,r)=>{t?(c.default.system.warn(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t)):(i=r.data,c.default.system.debug(`${this.windowServiceChannelName(e)} successful`,i),console.debug(`${this.windowServiceChannelName(e)} successful`,i)),n&&n(t,i)}))}addEventListener(e,t){return this.eventManager.addEventListener(e,t)}removeEventListener(e,t){return this.eventManager.removeEventListener(e,t)}registerWithDocking(e,t){u.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}unRegisterWithDocking(){u.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow(e){this.registerWithDocking(e,(()=>{u.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName})}))}wrapReady(){u.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}_minimize(e,t=Function.prototype){c.default.system.debug("BaseWindow._minimize",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._minimize(e,((e,n)=>{c.default.system.debug("BaseWindow._minimize parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_maximize(e,t=Function.prototype){c.default.system.debug("BaseWindow._maximize",e),t(null,{shouldContinue:!0})}_restore(e,t=Function.prototype){c.default.system.debug("BaseWindow._restore",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._restore(e,((e,n)=>{c.default.system.debug("BaseWindow._restore parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_blur(e,t=Function.prototype){c.default.system.debug("BaseWindow._blur",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._blur(e,((e,n)=>{c.default.system.debug("BaseWindow._blur parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_focus(e,t=Function.prototype){c.default.system.debug("BaseWindow._focus",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._focus(e,((e,n)=>{c.default.system.debug("BaseWindow._focus parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_bringToFront(e,t=Function.prototype){c.default.system.debug("BaseWindow._bringToFront",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._bringToFront(e,((e,n)=>{c.default.system.debug("BaseWindow._bringToFront parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isShowing(e,t=Function.prototype){c.default.system.debug("BaseWindow._isShowing",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._isShowing(e,((e,n)=>{c.default.system.debug("BaseWindow._isShowing parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_setBounds(e,t=Function.prototype){c.default.system.verbose("BaseWindow._setBounds",e),e=e||{};const{bounds:n}=e;this.mergeBounds(n),!e.invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setBounds(e,((e,n)=>{c.default.system.verbose("BaseWindow._setBounds parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_getBounds(e,t){c.default.system.verbose("BaseWindow._getBounds",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBounds(e,((e,n)=>{c.default.system.verbose("BaseWindow._getBounds parent",n),t(e,n)}))):t(null,{shouldContinue:!0})}_getBoundsFromSystem(e,t){c.default.system.debug("BaseWindow._getBoundsFromSystem",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBoundsFromSystem(e,((e,n)=>{c.default.system.verbose("BaseWindow._getBoundsFromSystem parent",n),t(e,n)}))):t(null,{shouldContinue:!0})}_updateOptions(e,t=Function.prototype){c.default.system.debug("BaseWindow._updateOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._updateOptions(e,((e,n)=>{c.default.system.debug("BaseWindow._updateOptions parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_hide(e,t=Function.prototype){c.default.system.debug("BaseWindow._hide",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._hide(e,((e,n)=>{c.default.system.debug("BaseWindow._hide parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_show(e,t=Function.prototype){c.default.system.debug("BaseWindow._show",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._show(e,((e,n)=>{c.default.system.debug("BaseWindow._show parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_showAt(e,t=Function.prototype){c.default.system.debug("BaseWindow._showAt",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._showAt(e,((e,n)=>{c.default.system.debug("BaseWindow._showAt parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_close(e,t=Function.prototype){c.default.system.debug("WRAP CLOSE. BaseWindow._close",this.name,e),e=e||{};const{parentWindow:n}=this;e.fromSystem?n&&"stackedwindow"===n.componentType.toLowerCase()?((e={}).removeFromWorkspace=!0,e.fromSystem=!0,e.stackedWindowIdentifier=n.identifier,n.close(e,((e,n)=>{c.default.system.debug("BaseWindow.close stacked window",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0}):e.invokedByParent||e.ignoreParent||!n?t(null,{shouldContinue:!0}):(e.windowIdentifier=this.identifier,e.noDocking=!0,n._removeWindow(e,((e,n)=>{c.default.system.debug("BaseWindow._close parent",n),t(e,{shouldContinue:!0})})))}_alwaysOnTop(e,t=Function.prototype){c.default.system.debug("BaseWindow._alwaysOnTop",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._alwaysOnTop(e,((e,n)=>{c.default.system.debug("BaseWindow._alwaysOnTop parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isAlwaysOnTop(e={},t=Function.prototype){return t(null,Boolean(this.windowOptions.alwaysOnTop)),Boolean(this.windowOptions.alwaysOnTop)}_setOpacity(e,t=Function.prototype){c.default.system.debug("BaseWindow._setOpacity",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setOpacity(e,((e,n)=>{c.default.system.debug("BaseWindow._setOpacity parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_saveWindowOptions(e,t=Function.prototype){c.default.system.debug("BaseWindow._saveWindowOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._saveWindowOptions(e,((e,n)=>{c.default.system.debug("BaseWindow._saveWindowOptions parent",n),t(e,{shouldContinue:!0})}))):t(null,{shouldContinue:!0})}_getOptions(e,t=Function.prototype){return t(null,{})}_setResizable(){throw new Error("Not Implemented")}startTabTileMonitoring(e){c.default.system.debug("BaseWindow.startTabTileMonitoring",e),u.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e,t){c.default.system.debug("BaseWindow.stopTabTileMonitoring",e),u.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?c.default.system.warn("TabTile.stopTabTile: query failed",e):c.default.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(c.default.system.debug("BaseWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:c.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){if(!e||!Number.isInteger(e.top))return console.error("Invalid bounds",e),void c.default.system.warn("BaseWindow.mergeBounds Invalid bounds","bounds=",e);const t={top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)};t.bottom=t.top+t.height,t.right=t.left+t.width;const n={defaultLeft:t.left,defaultWidth:t.width,defaultTop:t.top,defaultHeight:t.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e){c.default.system.debug("BaseWindow.startMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-start",{...this.windowOptions.bounds})}stopMove(e){c.default.system.debug("BaseWindow.stopMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-end",{name:this.name,eventName:"bounds-change-end",dockedPosition:this.dockedPosition,...this.windowOptions.bounds})}async getFSBLState(e,t){c.default.system.debug("BaseWindow.getState",e),y.default.get({topic:w.WORKSPACE.CACHE_STORAGE_TOPIC,key:e.key},((n,i)=>{"componentState"===e.stateVar&&(this.componentState=i);const{field:r,fields:o}=e;if(i){if(!r){if(o){const e={};for(let t=0;t<o.length;t++)i[o[t]]&&(e[o[t]]=i[o[t]]);return t(null,e)}return t(null,i)}t(n,i[r])}else c.default.system.info("WindowClient:getComponentState:error, response, params",n,i,e),t("Not found",i)}))}getComponentState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.getFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}getWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),e.key=this.windowKey,e.stateVar="windowData",this.getFSBLState(e,t)}setComponentState(e,t=Function.prototype){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}removeComponentState(e,t=(()=>{})){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.removeFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}setWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.windowKey,stateVar:"windowData"},t)}saveWindowState(e){this.windowState=e}static async cleanupState(e){const t={componentType:e.componentType,name:e.name};if(!S.additionalWorkspaceFields)try{const e=await l.default.getValue("finsemble.servicesConfig.window.additionalWorkspaceFields");S.additionalWorkspaceFields=e.data||[]}catch{S.additionalWorkspaceFields=[]}let n;n=w.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]?w.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]:w.WORKSPACE.ADDITIONAL_WINDOW_PROPS.WebWindow,"WebApplication"===e.windowType&&(e.windowType="WebWindow");const i=[...w.WORKSPACE.DEFAULT_WINDOW_PROPS,...n,...S.additionalWorkspaceFields];for(const n of i)void 0!==e[n]&&(t[n]=e[n]);return t}async saveCompleteWindowState(e,t=Function.prototype){if(c.default.system.debug("COMPONENT LIFECYCLE:SAVING STATE:",e.name),e){"StackedWindow"===e.windowType&&(e.componentType="StackedWindow",this.mergeBounds(e.bounds));const n=await S.cleanupState(e);if(d.isEqualIgnoringArrayOrder(this.oldState,n))c.default.system.debug("saveCompleteWindowState -- deep equal"),t();else{c.default.system.debug("saveCompleteWindowState -- not deep equal",this.oldState,n),this.oldState=b.default(n);try{await v.default._setWindowState({windowName:this.windowName,state:{windowData:n}})}catch{}t()}}else t("No State Provided")}setFSBLState(e,t){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const i="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState(n,(async()=>{c.default.system.debug("BaseWindow.getState",e);let n=a.default(this[i],{}),{fields:r}=e;e.field&&(r=[{field:e.field,value:e.value}]);for(let e=0;e<r.length;e++){const t=r[e];t.field&&void 0!==t.value&&(n[t.field]=t.value)}e.value=n,c.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,n),"windowData"===e.stateVar&&(n=await S.cleanupState(n));try{await v.default._setWindowState({windowName:this.windowName,state:{[e.stateVar]:n}})}catch{}this[i]=n,t&&t()}))}removeFSBLState(e,t=(()=>{})){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const i="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState(n,(async()=>{c.default.system.debug("BaseWindow.getState",e);let n=a.default(this[i],{}),{fields:r}=e;e.field&&(r=[{field:e.field}]);for(let e=0;e<r.length;e++){const t=r[e];t.field&&delete n[t.field]}e.value=n,c.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,n),"windowData"===e.stateVar&&(n=await S.cleanupState(n));try{await v.default._setWindowState({windowName:this.windowName,state:{[e.stateVar]:n}})}catch{}this[i]=n,t(null)}))}cancelTabTileMonitoring(e){c.default.system.debug("BaseWindow.cancelTabTileMonitoring",e),u.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(){return this.parentWindow}setParent(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(c.default.system.debug("BaseWindow.setParent already set",e),t(null,e)):(c.default.system.debug("BaseWindow.setParent",e),S.getInstance(e,((n,i)=>{n?c.default.system.error("BaseWindow.setParent error",n):(c.default.system.debug("BaseWindow.setParent wrap success",e),console.debug("BaseWindow.setParent wrap success",this,i),this.parentWindow=i,this.eventManager.trigger("parent-set",{parentName:this.parentWindow.name})),t(n,e)})))}clearParent(){c.default.system.debug("BaseWindow.clearParent"),this.parentWindow=null,this.eventManager.trigger("parent-unset",this.parentWindow)}setTitle(e){this.windowOptions&&(this.windowOptions.title=e),c.default.system.debug("Title change",e),u.default.publish(this.TITLE_CHANGED_CHANNEL,e)}close(e={},t){this.queryWindowService("close",e,t)}_animate(e,t){"function"==typeof e&&(t=e,e=null),t("Method not implemented for window",{shouldContinue:!0})}}t.BaseWindow=S,S.WINDOWSTATE=h.WINDOWSTATE,S.wrap=S.getInstance,S._windowReady=e=>new Promise((async t=>{c.default.system.debug(`windowServiceReady: ${e} waiting`);const n=u.default.subscribe(`Finsemble.Component.State.${e}`,((i,r)=>{const{state:o}=r.data;switch(c.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":c.default.system.debug(`windowServiceReady: ${e} ${o}`),u.default.unsubscribe(n),t();break;default:c.default.system.debug(`windowServiceReady default: ${e} ${o}`)}}))}))},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,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(r=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",r.ErrorOnLaunch="ErrorOnLaunch",r.AppTimeout="AppTimeout",r.ResolverUnavailable="ResolverUnavailable",(i=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",i.ResolverUnavailable="ResolverUnavailable",i.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`."),i=new Error("Timed out waiting for `fdc3Ready` event."),r=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(i)),e);window.addEventListener("fdc3Ready",(()=>{clearTimeout(o),window.fdc3?t():n(r)}),{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),i=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,i.length);e++){if(e===n.length||n[e]<i[e])return-1;if(e===i.length||n[e]>i[e])return 1}return 0}catch(e){return console.error("Failed to compare version strings",e),null}},t.versionIsAtLeast=(e,n)=>{let i=t.compareVersionNumbers(e.fdc3Version,n);return null===i?null:i>=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 i(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 r(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,i,r=""){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 r=e.length;for(let n=0;n<r;n++){const r=e[n];try{return o(t,r,i)}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,i))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,r){if(null===r||"object"!=typeof r||Array.isArray(r))return n("object",r);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0;s[n.key]=o(a,n.typ,i,n.key)})),Object.getOwnPropertyNames(r).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(r[n],t,i,n))})),s}(i(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,r)}(t,e)}function s(e,t){return o(e,t,i)}function a(e,t){return o(e,t,r)}function u(e){return{arrayItems:e}}function l(...e){return{unionMembers:e}}function c(e,t){return{props:e,additional:t}}function d(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const p={Context:c([{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:c([{json:"contacts",js:"contacts",typ:u(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Contact:c([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),ContactID:c([{json:"email",js:"email",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")}],""),InstrumentList:c([{json:"instruments",js:"instruments",typ:u(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Instrument:c([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),InstrumentID:c([{json:"BBG",js:"BBG",typ:l(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"FIGI",js:"FIGI",typ:l(void 0,"")},{json:"ISIN",js:"ISIN",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")},{json:"RIC",js:"RIC",typ:l(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:l(void 0,"")},{json:"ticker",js:"ticker",typ:l(void 0,"")}],""),Country:c([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),CountryID:c([{json:"ISOALPHA2",js:"ISOALPHA2",typ:l(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:l(void 0,"")}],""),Organization:c([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),OrganizationID:c([{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"LEI",js:"LEI",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")}],""),Portfolio:c([{json:"positions",js:"positions",typ:u(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Position:c([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any")}},98832:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(88801),t),r(n(77661),t),r(n(80498),t),r(n(55972),t),r(n(74215),t),r(n(19600),t),r(n(89520),t),r(n(35644),t),r(n(66129),t),r(n(51854),t),r(n(55182),t),r(n(36611),t),r(n(91767),t),r(n(91966),t),r(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"}}')},87063:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}(i(57664)),t=v(i(80089)),n=i(96755),r=v(i(39319)),o=v(i(2807)),s=v(i(70010)),a=v(i(9562)),u=v(i(93802)),l=i(33998),c=v(i(73699)),d=i(75688),f=v(i(72551)),p=v(i(43190)),h=i(51742),m=v(i(5020)),w=v(i(32790)),g=v(i(44791)),y=v(i(15828));function v(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}p.default.initialize(),a.default.initialize(),s.default.initialize(),o.default.initialize(),f.default.start(),window.external={};class S extends n.BaseService{constructor(e){super({name:e,startupDependencies:{clients:["configClient"]},shutdownDependencies:{services:["windowService"]}}),this.assimilationWindowManager=null,this.port=8392,this.routerClient=r.default,this.readyFunction=null,this.appAssets=null,this.assimilationManifest=null,this.fullManifest=null,this.configCache={},this.uuidByName={},this.load=this.load.bind(this),this.getApplicationList=this.getApplicationList.bind(this),this.onBaseServiceReady((e=>{f.default.system.debug("assimilation.onBaseServiceReady"),h.System.getVersion((e=>{this.version=e})),r.default.addPubSubResponder(/.*humanInterface.*/,{}),this.load((()=>{this.Monitors=new u.default((()=>{e()}),Function.prototype,{System:h.System})})),m.default.waitForBootStage("earlyuser","stageEnter",this.getApplicationList)})),this.start()}convertHandle(e){let t=e.replace("native@0x","").toUpperCase();return t=`00000000${t}`,t=t.substr(t.length-8),t}createRouterEndpoints(){r.default.addResponder("Assimilation.setMonitorInfo",((e,t)=>{let n;if(this.ws)try{this.ws.setMonitorInfo(t.data)}catch(e){n={code:"assimilation_setMonitorInfo_failed",errorMessage:e.message}}else n={code:"assimilation_missing_socket_connection",errorMessage:"Assimilation socket connection does not exist, cannot set Monitor Info"};n?t.sendQueryResponse(n,null):t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.alwaysOnTop",((e,t)=>{this.assimilationWindowManager.alwaysOnTop(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.moveWindow",((e,t)=>{this.assimilationWindowManager.moveWindow(t.data,this.ws),t.sendQueryResponse(null,null)})),r.default.addListener("Assimilation.saveWindow",((e,t)=>{this.assimilationWindowManager.saveWindow(t)})),r.default.addResponder("Assimilation.showWindow",((e,t)=>{this.assimilationWindowManager.showWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.maximizeWindow",((e,t)=>{this.assimilationWindowManager.maximizeWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.restoreWindow",((e,t)=>{this.assimilationWindowManager.restoreWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.minimizeWindow",((e,t)=>{this.assimilationWindowManager.minimizeWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.hideWindow",((e,t)=>{this.assimilationWindowManager.hideWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.dockWindow",((e,t)=>{this.assimilationWindowManager.dockWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.undockWindow",((e,t)=>{this.assimilationWindowManager.undockWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.bringToFront",((e,t)=>{this.assimilationWindowManager.bringToFront(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.closeWindow",((e,t)=>{this.assimilationWindowManager.closeWindow(t)})),r.default.addListener("Assimilation.hookWindowByHandle",((e,t)=>{this.assimilationWindowManager.updateSpawningWindowFromWindowObject(t)})),r.default.addResponder("Assimilation.getWindowLocation",((e,t)=>{if(!t.data.windowName)return t.sendQueryResponse(null,null);const n=this.assimilationWindowManager.getWindowByName(t.data.windowName);if(!n)return t.sendQueryResponse("no window found");if(n.outsideOfFinsemble||t.data.force){const e=`${Date.now()}_${Math.random()}`;r.default.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{t.sendQueryResponse(null,{location:n.data})})),this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:n.uuid,topic:"getBounds"}))}else t.sendQueryResponse(null,{location:n.location})})),r.default.addResponder("Assimilation.spawnNative",((e,t)=>{this.spawnAsset(this.constructNativeWindowParams(t),(()=>{t.sendQueryResponse(e,!0)}))})),r.default.addListener("Assimilation.windowClosed",((e,t)=>{console.log("Window closed!!!",t),f.default.system.debug("APPLICATION LIFECYCLE:Assmilation:windowClosed",t)})),r.default.addListener("Finsemble.Assimilation.register",((e,t)=>{const n=t.data,i=this.assimilationWindowManager.awaitingAssimilationSpawn;let o=!0;for(const e in i)if(i[e].name==n.windowName){if(o=!1,n.windowHandle){const t=this.convertHandle(n.windowHandle),i=this.assimilationWindowManager.updateSpawningWindow(e,t),r={left:i.descriptor.left,top:i.descriptor.top,right:i.descriptor.right,bottom:i.descriptor.bottom,width:i.descriptor.width,height:i.descriptor.height};this.assimilationWindowManager.handleSpawnComplete(i,r)}else{const t=this.assimilationWindowManager.updateSpawningWindow(e,null);this.assimilationWindowManager.handleSpawnComplete(t,null)}break}if(o){const e=`${Date.now()}_${Math.random()}`;n.windowHandle&&r.default.query("Finsemble.NewNativeWindow",{appUUID:e,name:n.windowName,windowType:"NativeWindow"},(async()=>{const{wrap:t}=await d.FinsembleWindow.getInstance({name:n.windowName}),i=this.convertHandle(n.windowHandle);t.uuid=i,t.outsideOfFinsemble=!0,this.assimilationWindowManager.activeWindows[i]=t,r.default.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{this.assimilationWindowManager.handleSpawnComplete(t,n.data)}));const{bounds:o}=n;o?this.assimilationWindowManager.handleSpawnComplete(t,o):this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:t.uuid,topic:"getBounds"}))}))}}))}shouldHideTitleBar(e,n){return!!e||(0,t.default)(n,"customData.foreign.services.assimilationService.hideTitleBar",this.assimilationHelper.manifest.hideTitleBars)}constructNativeWindowParams(e){let n=e.data;const i=n.isWPF||(0,t.default)(n,"customData.window.argumentsAsQueryString");return n.hideTitleBar=this.shouldHideTitleBar(i,n),i&&(n={params:n,...this.getArgumentsWPF(e)},n.spawnDefaultViewer=!0),this.constructPath(n),n}getArgumentsWPF(e){const t={...e.data};t.generatedArguments=t.arguments||"",this.uuidByName[t.name]||(this.uuidByName[t.name]=`uuid${Date.now()}_${Math.round(1e4*Math.random())}`);const n=new Map([["finsembleWindowName",t.name],["componentType",t.customData.component.type],["uuid",this.uuidByName[t.name]],["left",t.defaultLeft],["top",t.defaultTop],["width",t.defaultWidth],["height",t.defaultHeight],["iac",!0],["serverAddress",this.serverAddress]]);return t.path&&t.customData.window.argumentsAsQueryString?n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments}&${n}=${e}`})):n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments} "${n}=${e}"`})),t.alias||t.path||(t.path=t.customData.window.path,t.alias=t.customData.window.alias),t.componentType=t.customData.component.type,this.configCache[t.name]=t,t}constructPath(e){if(void 0===e.path||e.customData&&e.customData.window&&!1===Boolean(e.customData.window.argumentsAsQueryString))return;const t=new URL(e.path),n=new URLSearchParams(e.generatedArguments),i=new URLSearchParams("");[...t.searchParams.entries(),...n.entries()].forEach((function(e){i.append(e[0],e[1])})),t.search=i.toString(),e.generatedPath=t.toString(),e.generatedArguments=""}launchAssimilationExe(){h.System.launchExternalProcess({alias:"assimilation",lifetime:"window",arguments:`PORT=${this.port}`,listener:e=>{"exited"===e.topic?(f.default.system.log("APPLICATION LIFECYCLE:Exited Assimilation Process",e),f.default.system.debug("APPLICATION LIFECYCLE:Exited Assimilation Process")):(f.default.system.log("APPLICATION LIFECYCLE:Running Assimilation Process",e),f.default.system.debug("APPLICATION LIFECYCLE:Running Assimilation Process"))}},(e=>{f.default.system.log("APPLICATION LIFECYCLE:Assimilation process successfully launched"),f.default.system.debug("APPLICATION LIFECYCLE:Assimilation process successfully launched",e.uuid),this.connectSockets()}),(e=>{f.default.system.error("Assimilation.launchAssimilationExe Error:",e),o.default.onReady((()=>{const e=new o.default.Notification,t=new o.default.Action;t.buttonText="Dismiss",t.type=o.default.ActionTypes.DISMISS,e.title="Critical Failure in Assimilation Service",e.details="Assimilation failed To launch. Native applications will not work.",e.actions=[t],o.default.notify(e)})),this.readyFunction()}))}getAllConfigs(t){const n=this;e.series([function(e){s.default.getValues(null,((t,i)=>{n.fullManifest=i;const r=i.finsemble.services.assimilationService.config,o=i.finsemble.servicesConfig.assimilation,s=i.finsemble.betaFeatures.assimilation;return s&&f.default.system.error("Assimilation is no longer a beta feature. Move assimilation under serviceConfigs."),n.assimilationManifest=Object.assign(r,o||s),n.appAssets=i.appAssets,n.assimilationHelper=new g.default({appAssets:i.appAssets,manifest:n.assimilationManifest}),n.assimilationWindowManager=new w.default(n.assimilationHelper),n.serverAddress=l.ConfigUtilInstance.getDefault(i,"fullManifest.finsemble.router.transportSettings.FinsembleTransport.serverAddress","ws://127.0.0.1:3376"),e(t)}))}],(e=>t(e)))}load(e){f.default.system.debug("APPLICATION LIFECYCLE:Assimilation:load");const n=this;this.getAllConfigs((()=>{if(!this.assimilationManifest.enabled)return f.default.system.log("APPLICATION LIFECYCLE:Assimilation Not Enabled"),e();if(-1==navigator.platform.indexOf("Win"))return f.default.system.warn("APPLICATION LIFECYCLE:Assimilation disabled due to incompatible platform",navigator.platform),e();f.default.system.debug("APPLICATION LIFECYCLE:Assimilation: Is Enabled");const i=(e,t)=>{const i=l.ConfigUtilInstance.getDefault(n.fullManifest,"manifest.finsemble.notificationURL",`${n.fullManifest.finsemble.moduleRoot}/components/system/notification/notification.html`);c.default.alert("dev","ONCE-SINCE-STARTUP",e,t,{url:i}),f.default.system.error("APPLICATION LIFECYCLE:Assimilation Error:",e,t)},r=this.assimilationHelper.findAssetByAlias("assimilation");return r?this.compareVersion("3.6.0",r.version)<0?(i("assimilationService-bad-version","This version of Finsemble requires assimilation version >= 3.6.0. Check your manifest."),e()):(this.assimilationWindowManager.setFloatingTitlebar((0,t.default)(n.fullManifest,"finsemble.Window Manager.floatingTitlebarComponent","floatingTitlebar")),this.createRouterEndpoints(),this.readyFunction=e,f.default.system.log("APPLICATION LIFECYCLE:Assimilation Enabled"),this.launchAssimilationExe()):i("assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest.")}))}onLoggerStateChanged(e){let t={topic:"onLogLevel"};["Error","Warn","Info","Log","Debug"].forEach((n=>{t[n.toLowerCase()]=e.system[n]})),this.ws.send(this.assimilationHelper.prepareAction(t))}onSocketConnected(){this.assimilationWindowManager.setWebsocket(this.ws),this.ws.setThrottle(this.assimilationManifest.throttle>=0?this.assimilationManifest.throttle:20),this.onLoggerStateChanged(f.default.setting()),this.readyFunction&&this.readyFunction()}connectSockets(){this.assimilationManifest.port&&(this.port=this.assimilationManifest.port),this.ws=new y.default(this.assimilationManifest,this.assimilationWindowManager),this.ws.connect(this.onSocketConnected.bind(this)),f.default.onStateChanged((e=>{this.onLoggerStateChanged(e)}))}compareVersion(e,t){if(!e)return 1;if(!t)return-1;const n=e.split("."),i=t.split(".");for(let e=0;e<Math.max(n.length,i.length);e++){if(e==n.length&&e==i.length)return 0;if(e>=i.length)return-1;if(e>=n.length)return 1;const t=parseInt(n[e]),r=parseInt(i[e]);if(t>r)return-1;if(r>t)return 1}return 0}spawnAsset(e,t){const n={name:e.name,uuid:e.uuid,componentType:e.componentType,windowType:"NativeWindow",waitForReady:!1};return d.FinsembleWindow.getInstance(n,((n,i)=>(e.minWidth=e.minWidth&&e.minWidth>100?e.minWidth:100,e.minHeight=e.minHeight&&e.minHeight>25?e.minHeight:25,e.maxWidth=e.maxWidth&&e.maxWidth>100?e.maxWidth:1/0,e.maxHeight=e.maxHeight&&e.maxHeight>25?e.maxHeight:1/0,e.maxWidth<e.defaultWidth&&(e.defaultWidth=e.maxWidth),e.minWidth>e.defaultWidth&&(e.defaultWidth=e.minWidth),e.maxHeight<e.defaultHeight&&(e.defaultHeight=e.maxHeight),e.minHeight>e.defaultHeight&&(e.defaultHeight=e.minHeight),i.descriptor=e,this.assimilationWindowManager.spawnWindow(i,this.ws),t())))}getApplicationList(){this.ws&&this.ws.getApplicationList()}}const C=new S("assimilationService");window.RouterClient=r.default,window.AssimilationService=C})()})();
2
+ (()=>{var e={57664:(e,t,n)=>{"use strict";function i(e,...t){return(...n)=>e(...t,...n)}function r(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>ht,apply:()=>i,applyEach:()=>I,applyEachSeries:()=>N,asyncify:()=>c,auto:()=>M,autoInject:()=>$,cargo:()=>V,cargoQueue:()=>z,compose:()=>K,concat:()=>X,concatLimit:()=>Q,concatSeries:()=>Z,constant:()=>ee,detect:()=>ne,detectLimit:()=>ie,detectSeries:()=>re,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>ce,eachLimit:()=>de,eachOf:()=>T,eachOfLimit:()=>A,eachOfSeries:()=>O,eachSeries:()=>fe,ensureAsync:()=>pe,every:()=>he,everyLimit:()=>me,everySeries:()=>we,filter:()=>be,filterLimit:()=>Se,filterSeries:()=>Ce,forever:()=>_e,groupBy:()=>We,groupByLimit:()=>Ae,groupBySeries:()=>Ee,log:()=>Te,map:()=>L,mapLimit:()=>J,mapSeries:()=>k,mapValues:()=>Ie,mapValuesLimit:()=>Le,mapValuesSeries:()=>Oe,memoize:()=>ke,nextTick:()=>Ne,parallel:()=>Pe,parallelLimit:()=>Me,priorityQueue:()=>Be,queue:()=>Fe,race:()=>$e,reduce:()=>G,reduceRight:()=>He,reflect:()=>Ue,reflectAll:()=>qe,reject:()=>ze,rejectLimit:()=>Ge,rejectSeries:()=>Ye,retry:()=>Je,retryable:()=>Xe,seq:()=>Y,series:()=>Ze,setImmediate:()=>l,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>it,timeout:()=>rt,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>lt,unmemoize:()=>ct,until:()=>ft,waterfall:()=>pt,whilst:()=>dt,all:()=>he,allLimit:()=>me,allSeries:()=>we,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>ie,findSeries:()=>re,flatMap:()=>X,flatMapLimit:()=>Q,flatMapSeries:()=>Z,forEach:()=>ce,forEachSeries:()=>fe,forEachLimit:()=>de,forEachOf:()=>T,forEachOfSeries:()=>O,forEachOfLimit:()=>A,inject:()=>G,foldl:()=>G,foldr:()=>He,select:()=>be,selectLimit:()=>Se,selectSeries:()=>Ce,wrapSync:()=>c,during:()=>dt,doDuring:()=>ae});var o="function"==typeof setImmediate&&setImmediate,s="object"==typeof process&&"function"==typeof process.nextTick;function a(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var l=u(o?setImmediate:s?process.nextTick:a);function c(e){return p(e)?function(...t){const n=t.pop();return d(e.apply(this,t),n)}:r((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return d(i,n);n(null,i)}))}function d(e,t){return e.then((e=>{f(t,null,e)}),(e=>{f(t,e&&e.message?e:new Error(e))}))}function f(e,t,n){try{e(t,n)}catch(e){l((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function h(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?c(e):e}function m(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(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}}function w(e){return function(t,...n){return m((function(i){var r=this;return e(t,((e,t)=>{h(e).apply(r,n.concat(t))}),i)}))}}function g(e,t,n,i){t=t||[];var r=[],o=0,s=h(n);return e(t,((e,t,n)=>{var i=o++;s(e,((e,t)=>{r[i]=t,n(e)}))}),(e=>{i(e,r)}))}function y(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const v={};function b(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function S(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function C(e,t,n,i){let r=!1,o=!1,s=!1,a=0,u=0;function l(){a>=t||s||r||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!r){if(s=!1,t)return r=!0,void(a<=0&&i(null));a++,n(e,u,c),u++,l()}})).catch(d))}function c(e,t){if(a-=1,!o)return e?d(e):!1===e?(r=!0,void(o=!0)):t===v||r&&a<=0?(r=!0,i(null)):void l()}function d(e){o||(s=!1,r=!0,i(e))}l()}var _=e=>(t,n,i)=>{if(i=b(i),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return i(null);if("AsyncGenerator"===t[Symbol.toStringTag])return C(t,e,n,i);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return C(t[Symbol.asyncIterator](),e,n,i);var r=function(e){if(y(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,i,r,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):[],i=-1,r=n.length,function(){var e=n[++i];return i<r?{value:t[e],key:e}:null})}(t),o=!1,s=!1,a=0,u=!1;function l(e,t){if(!s)if(a-=1,e)o=!0,i(e);else if(!1===e)o=!0,s=!0;else{if(t===v||o&&a<=0)return o=!0,i(null);u||c()}}function c(){for(u=!0;a<e&&!o;){var t=r();if(null===t)return o=!0,void(a<=0&&i(null));a+=1,n(t.value,t.key,S(l))}u=!1}c()},A=m((function(e,t,n,i){return _(t)(e,h(n),i)}),4);function W(e,t,n){n=b(n);var i=0,r=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++r!==o&&t!==v||n(null))}for(0===o&&n(null);i<o;i++)t(e[i],i,S(a))}function E(e,t,n){return A(e,1/0,t,n)}var T=m((function(e,t,n){return(y(e)?W:E)(e,h(t),n)}),3),L=m((function(e,t,n){return g(T,e,t,n)}),3),I=w(L),O=m((function(e,t,n){return A(e,1,t,n)}),3),k=m((function(e,t,n){return g(O,e,t,n)}),3),N=w(k);const R=Symbol("promiseCallback");function P(){let e,t;function n(n,...i){if(n)return t(n);e(i.length>1?i:i[0])}return n[R]=new Promise(((n,i)=>{e=n,t=i})),n}function M(e,t,n){"number"!=typeof t&&(n=t,t=null),n=b(n||P());var i=Object.keys(e).length;if(!i)return n(null);t||(t=i);var r={},o=0,s=!1,a=!1,u=Object.create(null),l=[],c=[],d={};function f(e,t){l.push((()=>function(e,t){if(!a){var i=S(((t,...i)=>{if(o--,!1!==t)if(i.length<2&&([i]=i),t){var l={};if(Object.keys(r).forEach((e=>{l[e]=r[e]})),l[e]=i,a=!0,u=Object.create(null),s)return;n(t,l)}else r[e]=i,(u[e]||[]).forEach((e=>e())),p();else s=!0}));o++;var l=h(t[t.length-1]);t.length>1?l(r,i):l(i)}}(e,t)))}function p(){if(!s){if(0===l.length&&0===o)return n(null,r);for(;l.length&&o<t;)l.shift()()}}function m(t){var n=[];return Object.keys(e).forEach((i=>{const r=e[i];Array.isArray(r)&&r.indexOf(t)>=0&&n.push(i)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return f(t,[n]),void c.push(t);var i=n.slice(0,n.length-1),r=i.length;if(0===r)return f(t,n),void c.push(t);d[t]=r,i.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+i.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--r&&f(t,n)}))}))})),function(){for(var e=0;c.length;)e++,m(c.pop()).forEach((e=>{0==--d[e]&&c.push(e)}));if(e!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),p(),n[R]}var F=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,D=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,x=/,/,j=/(=.+)?(\s*)$/,B=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function $(e,t){var n={};return Object.keys(e).forEach((t=>{var i,r=e[t],o=p(r),s=!o&&1===r.length||o&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(i.length>0?a:r);else if(s)n[t]=r;else{if(i=function(e){const t=e.toString().replace(B,"");let n=t.match(F);if(n||(n=t.match(D)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,i]=n;return i.replace(/\s/g,"").split(x).map((e=>e.replace(j,"").trim()))}(r),0===r.length&&!o&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");o||i.pop(),n[t]=i.concat(a)}function a(e,t){var n=i.map((t=>e[t]));n.push(t),h(r)(...n)}})),M(n,t)}class H{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 q(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var i=h(e),r=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var c=!1;function d(e,t,n,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var r,o;function s(e,...t){return e?n?o(e):r():t.length<=1?r(t[0]):void r(t)}g.started=!0;var a={data:e,callback:n?s:i||s};if(t?g._tasks.unshift(a):g._tasks.push(a),c||(c=!0,l((()=>{c=!1,g.process()}))),n||!i)return new Promise(((e,t)=>{r=e,o=t}))}function f(e){return function(t,...n){r-=1;for(var i=0,s=e.length;i<s;i++){var a=e[i],l=o.indexOf(a);0===l?o.shift():l>0&&o.splice(l,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}r<=g.concurrency-g.buffer&&u("unsaturated"),g.idle()&&u("drain"),g.process()}}function p(e){return!(0!==e.length||!g.idle()||(l((()=>u("drain"))),0))}const m=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,i){const r=(...i)=>{a(e,r),((e,i)=>{if(e)return n(e);t(i)})(...i)};s[e].push(r)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var w=!1,g={_tasks:new H,*[Symbol.iterator](){yield*g._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!1,t)))}return d(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!1,!0,t)))}return d(e,!1,!0,t)},kill(){a(),g._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!1,t)))}return d(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(p(e))return;return e.map((e=>d(e,!0,!0,t)))}return d(e,!0,!0,t)},remove(e){g._tasks.remove(e)},process(){if(!w){for(w=!0;!g.paused&&r<g.concurrency&&g._tasks.length;){var e=[],t=[],n=g._tasks.length;g.payload&&(n=Math.min(n,g.payload));for(var s=0;s<n;s++){var a=g._tasks.shift();e.push(a),o.push(a),t.push(a.data)}r+=1,0===g._tasks.length&&u("empty"),r===g.concurrency&&u("saturated");var l=S(f(e));i(t,l)}w=!1}},length:()=>g._tasks.length,running:()=>r,workersList:()=>o,idle:()=>g._tasks.length+r===0,pause(){g.paused=!0},resume(){!1!==g.paused&&(g.paused=!1,l(g.process))}};return Object.defineProperties(g,{saturated:{writable:!1,value:m("saturated")},unsaturated:{writable:!1,value:m("unsaturated")},empty:{writable:!1,value:m("empty")},drain:{writable:!1,value:m("drain")},error:{writable:!1,value:m("error")}}),g}function V(e,t){return q(e,1,t)}function z(e,t,n){return q(e,t,n)}var G=m((function(e,t,n,i){i=b(i);var r=h(n);return O(e,((e,n,i)=>{r(t,e,((e,n)=>{t=n,i(e)}))}),(e=>i(e,t)))}),4);function Y(...e){var t=e.map(h);return function(...e){var n=this,i=e[e.length-1];return"function"==typeof i?e.pop():i=P(),G(t,e,((e,t,i)=>{t.apply(n,e.concat(((e,...t)=>{i(e,t)})))}),((e,t)=>i(e,...t))),i[R]}}function K(...e){return Y(...e.reverse())}var J=m((function(e,t,n,i){return g(_(t),e,n,i)}),4),Q=m((function(e,t,n,i){var r=h(n);return J(e,t,((e,t)=>{r(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],r=0;r<t.length;r++)t[r]&&(n=n.concat(...t[r]));return i(e,n)}))}),4),X=m((function(e,t,n){return Q(e,1/0,t,n)}),3),Z=m((function(e,t,n){return Q(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,i,r,o)=>{var s,a=!1;const u=h(r);n(i,((n,i,r)=>{u(n,((i,o)=>i||!1===i?r(i):e(o)&&!s?(a=!0,s=t(!0,n),r(null,v)):void r()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=m((function(e,t,n){return te((e=>e),((e,t)=>t))(T,e,t,n)}),3),ie=m((function(e,t,n,i){return te((e=>e),((e,t)=>t))(_(t),e,n,i)}),4),re=m((function(e,t,n){return te((e=>e),((e,t)=>t))(_(1),e,t,n)}),3);function oe(e){return(t,...n)=>h(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=m((function(e,t,n){n=S(n);var i,r=h(e),o=h(t);function s(e,...t){if(e)return n(e);!1!==e&&(i=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...i):void 0}return a(null,!0)}),3);function ue(e,t,n){const i=h(t);return ae(e,((...e)=>{const t=e.pop();i(...e,((e,n)=>t(e,!n)))}),n)}function le(e){return(t,n,i)=>e(t,i)}var ce=m((function(e,t,n){return T(e,le(h(t)),n)}),3),de=m((function(e,t,n,i){return _(t)(e,le(h(n)),i)}),4),fe=m((function(e,t,n){return de(e,1,t,n)}),3);function pe(e){return p(e)?e:function(...t){var n=t.pop(),i=!0;t.push(((...e)=>{i?l((()=>n(...e))):n(...e)})),e.apply(this,t),i=!1}}var he=m((function(e,t,n){return te((e=>!e),(e=>!e))(T,e,t,n)}),3),me=m((function(e,t,n,i){return te((e=>!e),(e=>!e))(_(t),e,n,i)}),4),we=m((function(e,t,n){return te((e=>!e),(e=>!e))(O,e,t,n)}),3);function ge(e,t,n,i){var r=new Array(t.length);e(t,((e,t,i)=>{n(e,((e,n)=>{r[t]=!!n,i(e)}))}),(e=>{if(e)return i(e);for(var n=[],o=0;o<t.length;o++)r[o]&&n.push(t[o]);i(null,n)}))}function ye(e,t,n,i){var r=[];e(t,((e,t,i)=>{n(e,((n,o)=>{if(n)return i(n);o&&r.push({index:t,value:e}),i(n)}))}),(e=>{if(e)return i(e);i(null,r.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function ve(e,t,n,i){return(y(t)?ge:ye)(e,t,h(n),i)}var be=m((function(e,t,n){return ve(T,e,t,n)}),3),Se=m((function(e,t,n,i){return ve(_(t),e,n,i)}),4),Ce=m((function(e,t,n){return ve(O,e,t,n)}),3),_e=m((function(e,t){var n=S(t),i=h(pe(e));return function e(t){if(t)return n(t);!1!==t&&i(e)}()}),2),Ae=m((function(e,t,n,i){var r=h(n);return J(e,t,((e,t)=>{r(e,((n,i)=>n?t(n):t(n,{key:i,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:r}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];r.call(n,s)?n[s].push(a):n[s]=[a]}return i(e,n)}))}),4);function We(e,t,n){return Ae(e,1/0,t,n)}function Ee(e,t,n){return Ae(e,1,t,n)}var Te=oe("log"),Le=m((function(e,t,n,i){i=b(i);var r={},o=h(n);return _(t)(e,((e,t,n)=>{o(e,t,((e,i)=>{if(e)return n(e);r[t]=i,n(e)}))}),(e=>i(e,r)))}),4);function Ie(e,t,n){return Le(e,1/0,t,n)}function Oe(e,t,n){return Le(e,1,t,n)}function ke(e,t=(e=>e)){var n=Object.create(null),i=Object.create(null),o=h(e),s=r(((e,r)=>{var s=t(...e);s in n?l((()=>r(null,...n[s]))):s in i?i[s].push(r):(i[s]=[r],o(...e,((e,...t)=>{e||(n[s]=t);var r=i[s];delete i[s];for(var o=0,a=r.length;o<a;o++)r[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Ne=u(s?process.nextTick:o?setImmediate:a),Re=m(((e,t,n)=>{var i=y(t)?[]:{};e(t,((e,t,n)=>{h(e)(((e,...r)=>{r.length<2&&([r]=r),i[t]=r,n(e)}))}),(e=>n(e,i)))}),3);function Pe(e,t){return Re(T,e,t)}function Me(e,t,n){return Re(_(t),e,n)}function Fe(e,t){var n=h(e);return q(((e,t)=>{n(e[0],t)}),t,1)}class De{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&&je(this.heap[e],this.heap[t=xe(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&&je(this.heap[t+1],this.heap[t])&&(t+=1),!je(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=xe(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function xe(e){return(e+1>>1)-1}function je(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=Fe(e,t);return n._tasks=new De,n.push=function(e,t=0,i=(()=>{})){if("function"!=typeof i)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return l((()=>n.drain()));for(var r=0,o=e.length;r<o;r++){var s={data:e[r],priority:t,callback:i};n._tasks.push(s)}l(n.process)},delete n.unshift,n}var $e=m((function(e,t){if(t=b(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,i=e.length;n<i;n++)h(e[n])(t)}),2);function He(e,t,n,i){var r=[...e].reverse();return G(r,t,n,i)}function Ue(e){var t=h(e);return r((function(e,n){return e.push(((e,...t)=>{let i={};if(e&&(i.error=e),t.length>0){var r=t;t.length<=1&&([r]=t),i.value=r}n(null,i)})),t.apply(this,e)}))}function qe(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 Ve(e,t,n,i){const r=h(n);return ve(e,t,((e,t)=>{r(e,((e,n)=>{t(e,!n)}))}),i)}var ze=m((function(e,t,n){return Ve(T,e,t,n)}),3),Ge=m((function(e,t,n,i){return Ve(_(t),e,n,i)}),4),Ye=m((function(e,t,n){return Ve(O,e,t,n)}),3);function Ke(e){return function(){return e}}function Je(e,t,n){var i={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(n=t||P(),t=e):(Qe(i,e),n=n||P()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=h(t),o=1;function s(){r(((e,...t)=>{!1!==e&&(e&&o++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(s,i.intervalFunc(o-1)):n(e,...t))}))}return s(),n[R]}function Qe(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+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 Xe(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;p(t)&&(n+=1);var i=h(t);return r(((t,r)=>{function o(e){i(...t,e)}return(t.length<n-1||null==r)&&(t.push(r),r=P()),e?Je(e,o,r):Je(o,r),r[R]}))}function Ze(e,t){return Re(O,e,t)}var et=m((function(e,t,n){return te(Boolean,(e=>e))(T,e,t,n)}),3),tt=m((function(e,t,n,i){return te(Boolean,(e=>e))(_(t),e,n,i)}),4),nt=m((function(e,t,n){return te(Boolean,(e=>e))(O,e,t,n)}),3),it=m((function(e,t,n){var i=h(t);return L(e,((e,t)=>{i(e,((n,i)=>{if(n)return t(n);t(n,{value:e,criteria:i})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(r).map((e=>e.value)))}));function r(e,t){var n=e.criteria,i=t.criteria;return n<i?-1:n>i?1:0}}),3);function rt(e,t,n){var i=h(e);return r(((r,o)=>{var s,a=!1;r.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",i=new Error('Callback function "'+t+'" timed out.');i.code="ETIMEDOUT",n&&(i.info=n),a=!0,o(i)}),t),i(...r)}))}function ot(e,t,n,i){var r=h(n);return J(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,r,i)}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,i){arguments.length<=3&&"function"==typeof t&&(i=n,n=t,t=Array.isArray(e)?[]:{}),i=b(i||P());var r=h(n);return T(e,((e,n,i)=>{r(t,e,n,i)}),(e=>i(e,t))),i[R]}var lt=m((function(e,t){var n,i=null;return fe(e,((e,t)=>{h(e)(((e,...r)=>{if(!1===e)return t(e);r.length<2?[n]=r:n=r,i=e,t(e?null:{})}))}),(()=>t(i,n)))}));function ct(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=m((function(e,t,n){n=S(n);var i=h(t),r=h(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&r(a)}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...o):void 0}return r(a)}),3);function ft(e,t,n){const i=h(e);return dt((e=>i(((t,n)=>e(t,!n)))),t,n)}var pt=m((function(e,t){if(t=b(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function i(t){h(e[n++])(...t,S(r))}function r(r,...o){if(!1!==r)return r||n===e.length?t(r,...o):void i(o)}i([])}));const ht={apply:i,applyEach:I,applyEachSeries:N,asyncify:c,auto:M,autoInject:$,cargo:V,cargoQueue:z,compose:K,concat:X,concatLimit:Q,concatSeries:Z,constant:ee,detect:ne,detectLimit:ie,detectSeries:re,dir:se,doUntil:ue,doWhilst:ae,each:ce,eachLimit:de,eachOf:T,eachOfLimit:A,eachOfSeries:O,eachSeries:fe,ensureAsync:pe,every:he,everyLimit:me,everySeries:we,filter:be,filterLimit:Se,filterSeries:Ce,forever:_e,groupBy:We,groupByLimit:Ae,groupBySeries:Ee,log:Te,map:L,mapLimit:J,mapSeries:k,mapValues:Ie,mapValuesLimit:Le,mapValuesSeries:Oe,memoize:ke,nextTick:Ne,parallel:Pe,parallelLimit:Me,priorityQueue:Be,queue:Fe,race:$e,reduce:G,reduceRight:He,reflect:Ue,reflectAll:qe,reject:ze,rejectLimit:Ge,rejectSeries:Ye,retry:Je,retryable:Xe,seq:Y,series:Ze,setImmediate:l,some:et,someLimit:tt,someSeries:nt,sortBy:it,timeout:rt,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:lt,unmemoize:ct,until:ft,waterfall:pt,whilst:dt,all:he,allLimit:me,allSeries:we,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:ie,findSeries:re,flatMap:X,flatMapLimit:Q,flatMapSeries:Z,forEach:ce,forEachSeries:fe,forEachLimit:de,forEachOf:T,forEachOfSeries:O,forEachOfLimit:A,inject:G,foldl:G,foldr:He,select:be,selectLimit:Se,selectSeries:Ce,wrapSync:c,during:dt,doDuring:ae}},33998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var i=s(n(72551)),r=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,r=0,o=!0;function s(e){const t=e.split(/[/\\:?=&\s]/);for(let n=0;n<t.length;n++)if("$"===t[n][0]){const r=t[n].substring(1);let s=a(r);if(void 0!==s){const a=e.replace(t[n],s);i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveString configString",t[n],r,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&&i.default.system.warn("ConfigUtil.resolveString",`Missing [${t}] variable from finsemble.custom configuration object`)):i.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){i.default.system.verbose("forceObjectsToLogger","resolveArray","pass",t,"recursionLevel",n,"configArray:",e);for(let i=0;i<e.length;i++){const r=e[i];"string"==typeof r&&r.indexOf("$")>-1?e[i]=s(r):r instanceof Array?u(r,t,n+1):"object"==typeof r&&l(r,t,n+1)}}function l(e,t,n){e=e||{},i.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveObject","pass",t,"recursionLevel",n,"configObject:",e),Object.keys(e).forEach((i=>{const r=e[i];"string"==typeof r&&r.indexOf("$")>-1?e[i]=s(r):r instanceof Array?u(r,t,n+1):"object"==typeof r&&l(r,t,n+1)}))}for(;o&&r++<100;)o=!1,l(t,++n,1);r>=100&&i.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){i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getRawManifest",s,a),s.getManifest((n=>{i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",n),e.resolveConfigVariables(n.finsemble,n.finsemble),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",n),t(n)}),(e=>{e&&(i.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e),n&&n()),s.getParentUuid((e=>{const n=r.System.Application.wrap(e);i.default.system.debug("forceObjectsToLogger","uuid",e,"parentApplication",n),a<10?o(t,n,++a):t("could not find manifest in parent applications")}))}))}i.default.system.debug("ConfigUtil.getExpandedRawManifest starting"),r.System.ready((()=>{const e=r.System.Application.getCurrent();o(t,e,1)}))},this.readConfigFile=function(e,t){i.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){r.System.ready((()=>{r.System.Application.getCurrent().getManifest((n=>{n.finsemble=n.finsemble||{},e.resolveConfigVariables(n.finsemble,n.finsemble),n.finsemble.applicationRoot||i.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const r=`${n.finsemble.moduleRoot}/configs/core/config.json`;e.readConfigFile(r,((o,s)=>{o?i.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${n.finsemble.moduleRoot}; Full Path=${r}`,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),i.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",n)),t(n)}))}))}))},this.promptAndSaveJSONToLocalFile=function(e,t){i.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),r=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",r),s.setAttribute("download",o),s.click()},this.configFormatForExport=function(e,t){i.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 i=n;if(e){try{const n=t.split(".");let r=e;for(let e=1;e<n.length;e++)r=r[n[e]];i=r}catch(e){i=n}void 0===i&&(i=n)}return i},this.getFile=async function(e,t=Function.prototype){i.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},93802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(5939),r=u(n(72551)),o=u(n(88021)),s=u(n(71879)),a=n(24232);function u(e){return e&&e.__esModule?e:{default:e}}let l;class c extends i.EventEmitter{constructor(e,t,n){if(super(),!n||!n.System)throw new Error("Monitors class requires dependency injection. Ensure that System is being passed in.");({System:l}=n),this.cachedMonitorInfo=null,this.limitedMonitorRefreshQueue=new o.default({concurrency:1}),this.bindAllFunctions(),this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(e))),l.addEventListener("monitor-info-changed",(()=>{this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))})),l.addEventListener("session-changed",(e=>{e&&("object"!=typeof e||!e.hasOwnProperty("reason")||"unlock"!==e.reason&&"remote-connect"!==e.reason&&"unknown"!==e.reason)||this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))}))}bindAllFunctions(){let e=this;for(let t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){let n=e[t];n instanceof Function&&n!==c&&(e[t]=e[t].bind(e))}}asyncIt(e,t){return t(e),e}rationalizeMonitor(e){e.monitorRect.width=e.monitorRect.right-e.monitorRect.left,e.monitorRect.height=e.monitorRect.bottom-e.monitorRect.top,e.availableRect.width=e.availableRect.right-e.availableRect.left,e.availableRect.height=e.availableRect.bottom-e.availableRect.top}calculateMonitorScale(e,t){return(t.right-t.left)/(e.right-e.left)}monitorInfoIsChanged(e,t){if(!e||!t)return!0;if(e.nonPrimaryMonitors.length!==t.nonPrimaryMonitors.length)return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.availableRect,t.primaryMonitor.availableRect))return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.monitorRect,t.primaryMonitor.monitorRect))return!0;e.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0)),t.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0));let n=!1;return e.nonPrimaryMonitors.forEach(((e,i)=>{const r=t.nonPrimaryMonitors[i];(0,a.checkIfBoundsAreEqual)(e.availableRect,r.availableRect)&&(0,a.checkIfBoundsAreEqual)(e.monitorRect,r.monitorRect)||(n=!0)})),n}async refreshMonitors(e=Function.prototype){this.limitedMonitorRefreshQueue.clear();const t=await l.getMonitorInfo();if(!this.monitorInfoIsChanged(this.cachedMonitorInfo,t))return r.default.system.info("Skipped refreshMonitors because monitors do not change."),e(this.allMonitors);this.allMonitors=[];let{primaryMonitor:n}=t;if(Object.entries(n).length){n.whichMonitor="primary",n.position=0,this.allMonitors.push(Object.assign({},n));for(let e=0;e<t.nonPrimaryMonitors.length;e++){let n=t.nonPrimaryMonitors[e];n.whichMonitor=e,n.position=e+1,this.allMonitors.push(n)}for(let e=0;e<this.allMonitors.length;e++){let t=this.allMonitors[e];this.rationalizeMonitor(t)}this.cachedMonitorInfo=(0,s.default)(t),e(this.allMonitors),this.ready=!0,1===this.limitedMonitorRefreshQueue.pending&&this.emit("monitors-changed",{monitors:this.allMonitors})}else r.default.system.info("There is no primary monitor in 'monitorInfo' - the system is still in the process of updating the monitor information. Returning from monitorsAndScaling -> refreshMonitors")}getAllMonitors(e=Function.prototype){return this.ready?this.asyncIt(JSON.parse(JSON.stringify(this.allMonitors)),e):e?void this.refreshMonitors(e):"not ready"}getMonitorFromScaledXY(e,t,n=Function.prototype){return new Promise((i=>{if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromScaledXY(e,t,n)})),"not ready";let r=null;for(var o=this.allMonitors,s=0;s<o.length;s++){var a=o[s],{monitorRect:u}=a;if(e>=u.left&&e<u.right&&t>=u.top&&t<u.bottom){r=a;break}}i(r),n(r)}))}getMonitorFromUnscaledXY(e,t,n=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromUnscaledXY(e,t,n)})),"not ready";for(var i=this.allMonitors,r=0;r<i.length;r++){var o=i[r],s=o.monitor.scaledRect;if(e>=s.left&&e<s.right&&t>=s.top&&t<s.bottom)return this.asyncIt(o,n)}return this.asyncIt(null,n)}async translatePointFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointFromScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var{monitor:i}=e;i||(i=(await this.getMonitorFromScaledXY(n.x,n.y)).data);let r=null;if(i){var o=n.x-i.monitorRect.left,s=n.y-i.monitorRect.top,a=o*i.deviceScaleFactor,u=s*i.deviceScaleFactor;r={x:a+i.monitor.scaledRect.left,y:u+i.monitor.scaledRect.top}}return t(r),Promise.resolve(r)}translatePointToScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointToScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var i=e.monitor||this.getMonitorFromUnscaledXY(n.x,n.y);if(!i)return this.asyncIt(null,t);var r=n.x-i.monitor.scaledRect.left,o=n.y-i.monitor.scaledRect.top,s=r/i.deviceScaleFactor,a=o/i.deviceScaleFactor,u={x:s+i.monitorRect.left,y:a+i.monitorRect.top};return this.asyncIt(u,t)}async translateRectToScaled(e,t=Function.prototype){let n;if(!this.ready)return this.refreshMonitors((()=>{this.translateRectToScaled(e,t)})),"not ready";var i=this.translatePointToScaled({x:e.left,y:e.top}),r=this.translatePointToScaled({x:e.right,y:e.bottom});return!i&&r&&(n=await this.getMonitorFromScaledXY(r),i=this.translatePointToScaled({monitor:n,point:{x:e.left,y:e.top}})),!r&&i&&(n=await this.getMonitorFromScaledXY(r),r=this.translatePointToScaled({monitor:n,point:{x:e.right,y:e.bottom}})),this.asyncIt({top:i?i.y:null,left:i?i.x:null,bottom:r?r.y:null,right:r?r.x:null,height:i&&r?r.y-i.y:null,width:i&&r?r.x-i.x:null},t)}translateRectFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translateRectFromScaled(e,t)})),"not ready";var n=this.translatePointFromScaled({x:e.left,y:e.top}),i=this.translatePointFromScaled({x:e.right,y:e.bottom});return!n&&i&&(n=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(i),point:{x:e.left,y:e.top}})),!i&&n&&(i=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(n),point:{x:e.right,y:e.bottom}})),this.asyncIt({top:n?n.y:null,left:n?n.x:null,bottom:i?i.y:null,right:i?i.x:null,height:n&&i?i.y-n.y:null,width:n&&i?i.x-n.x:null},t)}}var d=c;t.default=d},19886:(e,t)=>{"use strict";function i(e,t){const n=(t=t.replace(/^\./,"")).split(/\.(?![^[]*])/g);for(let t=0;t<n.length;++t){const i=n[t].replace(/[["\]]/g,"");if(!e)return null;if("string"==typeof e)return null;if(!(i in e))return null;e=e[i]}return e}function r(e,t){const n=[];for(const i in e){const r=`${t}.`;i.includes(r)&&(n.push(i),delete e[i])}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.byString=i,t.initObject=function e(t,i,r){let o;if(i||(i=null),"object"!=typeof t)return o=i?`${i}.${n}`:n,void(r[o]=i);for(const n in t)"object"==typeof t[n]&&"undefined"!==t[n]?(o=i?`${i}.${n}`:n,r[o]=i,e(t[n],o,r)):(o=i?`${i}.${n}`:n,r[o]=i)},t.mapField=function e(t,n,r){if(r[n])return;const o=(n=(n=n.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),s=n;if(!r.hasOwnProperty(s)){let e=null;o.length>1&&(o.pop(),e=o.join(".")),r[s]=e}const a=i(t,s);if("undefined"!==a&&"object"==typeof a)for(const n in a)e(t,`${s}.${n}`,r)},t.checkForObjectChange=function(e,t,n){const o=i(e,t);return null!==o&&("object"==typeof o||"object"!=typeof o&&"object"==typeof t?r(n,t):null)},t.setPath=void 0,t.setPath=(e,t,n)=>t.split(".").reduce(((e,i)=>e[i]=t.split(".").pop()===i?n:e[i]||{}),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 i=a(n(72551)),r=n(33998),o=n(51742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var l=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(70010).default),u.getValue({field:"finsemble"},((t,n)=>{a=r.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(a)})))},this.alert=function(e,t,n,i,r){const o=this;r&&r.url?this.alertInternal(e,t,n,i,r,r.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,i,r,s)}))},this.alertInternal=function(n,r,a,u,l,c){let d=!1;const f=`UserNotification.alert.${a}`,p=(l=l||{}).duration||864e5;switch(r){case"ONCE-SINCE-STARTUP":f in e?d=!1:(d=!0,e[f]=!0);break;case"MAX-COUNT":{let e=0;const n=l.maxCount||1;f in t&&(e=t[f]),t[f]=++e,e<=n&&(d=!0);break}default:d=!0}if(i.default.log("UserNotification.alert",n,d,r,a,u,l),d){const e={url:c,message:u,timeout:p};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=l},13712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(21014))&&i.__esModule?i:{default:i},o=new function(){function e(e,t,n){const i=function(){try{throw Error("")}catch(e){return e}}(),r=i.stack.split("\n")[5],o=r.indexOf("at "),s=r.slice(o+2,r.length),a=i.stack.split("\n")[6],u=a.indexOf("at "),l=a.slice(u+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${l}`)}this.args=function(){let t=!0;if(r.default.validationEnabled()){const n=arguments.length;if((n+1)%2!=0)for(let i=0;i<n;i+=2){let n=!1;const r=arguments[i];let o=arguments[i+1];if("="===o.slice(-1)&&(o=o.slice(0,-1),n=!0),typeof r!==o&&!(n&&void 0===r||void 0!==r&&"any"===o)){e(i/2+1,r,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(r.default.validationEnabled()){const n=arguments.length;if((n+1)%3!=0)for(let i=0;i<n;i+=3){let n=!1;const r=arguments[i],o=arguments[i+1];let s=arguments[i+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(r,o,s),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t}};t.default=o},15828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=d(n(22708)),r=d(n(80089)),o=d(n(32407)),s=d(n(39319)),a=d(n(9562)),u=n(51742),l=d(n(72551)),c=n(78379);function d(e){return e&&e.__esModule?e:{default:e}}const{REMOTE_FOCUS:f}=c.WINDOW_SERVICE_REQUESTS;a.default.initialize();const p=e=>(0,r.default)(e,"window.descriptor.isWPF",(0,r.default)(e,"descriptor.isWPF"));class h extends o.default{constructor(e,t){super(),this.port=e.port,this.manifest=e,this.assimilationWindowManager=t,this.setupListeners(),this.keyboard={}}setupListeners(){this.addListener("startMove",this.onWindowStartMove.bind(this)),this.addListener("moveUpdate",this.onWindowMoveUpdate.bind(this)),this.addListener("moveEnd",this.onMoveEnd.bind(this)),this.addListener("windowClicked",this.onWindowClicked.bind(this)),this.addListener("locationResponse",this.onLocationResponse.bind(this)),this.addListener("addWindow",this.onAddWindow.bind(this)),this.addListener("removeWindow",this.onRemoveWindow.bind(this)),this.addListener("applicationList",this.onApplicationList.bind(this)),this.addListener("keyDown",this.onKeyDown.bind(this)),this.addListener("keyUp",this.onKeyUp.bind(this)),this.addListener("focus",this.onWindowFocused.bind(this)),this.addListener("maximize",this.onWindowMaximize.bind(this)),this.addListener("restore",this.onWindowRestore.bind(this)),this.addListener("minimize",this.onWindowMinimize.bind(this)),this.addListener("windowInfo",this.onWindowInfo.bind(this)),this.addListener("openNewApp",this.onNewApp.bind(this)),this.addListener("openAssetApp",this.onNewApp.bind(this)),this.addListener("socketError",this.onSocketError.bind(this)),this.addListener("socketClosed",this.onSocketClosed.bind(this)),this.addListener("socketOpen",this.onSocketOpened.bind(this)),this.addListener("closeWindow",this.onCloseWindow.bind(this)),this.addListener("getBounds",this.onGetBoundsReturned.bind(this)),this.addListener("hookWindow",this.onWindowHooked.bind(this)),this.addListener("onLog",this.onLog.bind(this))}onGetBoundsReturned(e){l.default.system.verbose("APPLICATION LIFECYCLE:Assimilation:onGetBoundsReturned",e.ref,e),s.default.transmit(`${e.ref}-Assimilation.boundsUpdate`,e)}onWindowHooked(e){const t=this.assimilationWindowManager.getWindowByUUID(e.uuid);t&&t.descriptor&&t.descriptor.alwaysOnTop&&this.assimilationWindowManager.alwaysOnTop({data:{alwaysonTop:t.descriptor.alwaysOnTop,key:e.uuid}})}onLog(e){let{type:t,content:n}=e;"function"==typeof l.default.system[t]?l.default.system[t](`Assimilation EXE: ${n}`):l.default.system.warn(`Assimilation unable to log type ${t} from EXE. Defaulting to warn: ${n}`)}onNewApp(e){if(l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:openNewApp",e),e.error&&!e.error.startsWith("The operation completed successfully"))return l.default.system.error(e.error);try{const t=JSON.parse(e.window),n=this.assimilationWindowManager.updateSpawningWindow(e.ref,t.uuid);this.assimilationWindowManager.handleSpawnComplete(n,t)}catch(e){l.default.system.error("No Window found. Either the executable path is wrong or it has no window")}}onCloseWindow(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:closeWindow",e)}onWindowStartMove(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowStartMove",e),e.uuid?this.assimilationWindowManager.setMovingWindow(this.assimilationWindowManager.getWindowByUUID(e.uuid)).setStartBounds(e):l.default.system.error("window is missing uuid",e)}onWindowMoveUpdate(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMoveUpdate",e);const t=this.assimilationWindowManager.getMovingWindow();t.calculateWindowLocation(e),s.default.transmit(`AssimilationService.bounds-change-request.${t.window.name}`,{...t.location})}onWindowMaximize(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMaximize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&n.maximize({fromAssimilation:!0})}onWindowMinimize(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowMinimize",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.cachedLocation=n.location,n.minimize({fromAssimilation:!0}))}onWindowRestore(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowRestore",e);const{uuid:t}=e.data?JSON.parse(e.data):e,n=this.assimilationWindowManager.getWindowByUUID(t);n&&(n.state="restore",Date.now()-n.lastMinimized<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.restore({fromAssimilation:!0}))}onWindowFocused(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowFocused",e);const t=JSON.parse(e.data),n=this.assimilationWindowManager.getWindowByUUID(t.uuid),i={name:n&&n.name||t.name,windowHandle:t.uuid};s.default.transmit(f,i),n&&setTimeout((()=>{"minimize"!==n.state&&(Date.now()-n.lastRestored<this.assimilationWindowManager.assimilationHelper.manifest.eventIgnore||n.focus({fromAssimilation:!0}))}),this.assimilationWindowManager.assimilationHelper.manifest.focusDelay)}onRemoveWindow(e){const t=JSON.parse(e.window);this.assimilationWindowManager.removeWindow(t.uuid,!0)}onWindowClicked(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked",e);const t=JSON.parse(e.data);this.onWindowFocused(e);const n=this.assimilationWindowManager.getWindowByUUID(t.uuid);if(n&&!p(n)){if(this.keyboard[162]){const e=n.parentWindow?n.parentWindow.windowName:n.windowName;s.default.query("DockingService.getGroupObjectsForWindow",{name:e},((t,n)=>{let i=!1;for(let e=0;e<n.data.length;e++)if(n.data[e].isMovable){i=!0;break}return i?s.default.query("DockingService.leaveGroup",{name:e},(()=>{})):s.default.transmit("DockingService.formGroup",{windowName:e})}))}}else l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onWindowClicked no window found for window UUID",t.uuid)}onApplicationList(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onApplicationList",e),this.assimilationWindowManager.parseApplicationList(e.list)}onLocationResponse(e){if(!e.window)return;const t=JSON.parse(e.window),n=this.assimilationWindowManager.getWindowByUUID(t.uuid);n&&s.default.transmit("DockingService.updateWindowLocation",{windowName:n.windowName,location:{left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top}})}onAddWindow(e){const t=JSON.parse(e.window);t.uuid&&this.assimilationWindowManager.addNativeWindow(t)}onWindowInfo(){l.default.system.warn("This function does nothing.")}onMoveEnd(e){l.default.system.info("moveEnd",e);const t=this.assimilationWindowManager.getMovingWindow();if(t){if(this.keyboard[162]&&!p(t)){if(t.window.grouped)return s.default.query("DockingService.leaveGroup",{name:t.window.windowName},(()=>{}));s.default.transmit("DockingService.formGroup",{windowName:t.window.windowName})}e.location=t.window.location,s.default.transmit(`${t.window.name}.endMovement`,e),this.assimilationWindowManager.saveWindow({data:{key:t.window.uuid,location:t.window.location}})}}onKeyUp(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onKeyUp",e),e.key=Number(e.key),clearTimeout(this.keyboard[e.key]),delete this.keyboard[e.key],s.default.publish("humanInterface.keyup",{key:e.key}),160===e.key&&(self.shift=!1),s.default.transmit("finsemble.assimilation.keyup",{key:e.key})}onKeyDown(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:onKeyDown",e),e.key=Number(e.key),this.keyboard[e.key]&&clearTimeout(this.keyboard[e.key]),this.keyboard[e.key]=setTimeout((()=>this.onKeyUp(e)),this.manifest.hotkeyTimeout),s.default.publish("humanInterface.keydown",{key:e.key}),160===e.key&&(self.shift=!0),s.default.transmit("finsemble.assimilation.keydown",{key:e.key})}onSocketConnected(e=Function.prototype){this.enableAppHooks(),this.getMonitorInfo(),this.connectCallback&&(this.connectCallback(),this.connectCallback=null),e()}onSocketError(e){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketError",e);var t=setTimeout((()=>{clearTimeout(t),this.connect()}),5e3)}onSocketClosed(){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketClosed"),this.connect()}onSocketOpened(){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:onSocketOpened"),clearTimeout(this.wsConnectionFailureTimeout),this.wsConnectionFailureTimeout=null,this.onSocketConnected()}setThrottle(e){l.default.system.log("APPLICATION LIFECYCLE:Assimilation:enable move throttle",e),this.send(this.prepareAction({topic:"throttle",throttle:e}))}enableAppHooks(){l.default.system.info("APPLICATION LIFECYCLE:Assimilation:Enable Assimilation hooks"),this.send(this.prepareAction({topic:"enableHooks",data:{whitelist:[],blacklist:[]}}))}connect(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:connect to websocket"),e&&(this.connectCallback=e),this.ws&&this.ws.readyState<2||(this.wsConnectionFailureTimeout||(this.wsConnectionFailureTimeout=setTimeout((()=>{console.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds"),l.default.system.error("APPLICATION LIFECYCLE: STARTUP: Assimilation service failed to connect to websocket within 7500 milliseconds")}),7500)),super.connect())}prepareAction(e){const t=(0,i.default)();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}getMonitorInfo(){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:getMonitorInfo"),u.System.getMonitorInfo((e=>{this.send(JSON.stringify({topic:"monitorInfo",data:e}))}))}setMonitorInfo(e){l.default.system.debug("APPLICATION LIFECYCLE:Assimilation:setMonitorInfo"),this.send(JSON.stringify({topic:"monitorInfo",data:e}))}getApplicationList(){this.send(this.prepareAction({topic:"applicationList"}))}}t.default=h},32407:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=n(5939),o=(i=n(72551))&&i.__esModule?i:{default:i};class s extends r.EventEmitter{constructor(e){super(),this.ws=null,this.port=e||8392,this.wsConnectionFailureTimeout=null}connect(){if(this.ws&&(0===this.ws.readyState||1===this.ws.readyState))return;if(this.ws&&2===this.ws.readyState){const e=setTimeout((()=>{clearTimeout(e),this.connect()}),1e3);return}o.default.system.debug("Assimilation connecting to :",`ws://127.0.0.1:${this.port}`);const e=this.ws=new WebSocket(`ws://127.0.0.1:${this.port}`);e.onopen=()=>{o.default.system.debug("Assimilation connected to socket"),this.emit("socketOpen")},e.onerror=e=>{this.emit("socketError",e)},e.onmessage=e=>{let t;try{if(t=JSON.parse(e.data),!t.topic)return;return this.emit(t.topic,t)}catch(t){o.default.system.error("Assimilation:Socket.onMessage:err:",t,e)}},e.onclose=()=>{this.emit("socketClosed"),o.default.system.log("SERVICE LIFECYCLE:Web socket closed")}}send(e){(!this.ws||this.ws.readyState>1)&&this.connect(),this.ws&&1===this.ws.readyState?this.ws.send(e):this.on("socketOpen",(()=>this.send(e)))}}t.default=s},96963:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{constructor(e){this.window=e,this.mouseLocation={},this.mouseOffset={},this.startBounds={},this.resizeType=null,this.location=e.location}setStartBounds(e){e.resizeType&&(this.resizeType=e.resizeType),this.startBounds={left:e.left,top:e.top,bottom:e.bottom,right:e.right,x:e.x,y:e.y,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top},this.location=this.startBounds,this.setMouseLocation(e),this.setMouseOffset(this.startBounds)}setMouseLocation(e){this.mouseLocation={x:Number(e.x),y:Number(e.y)}}setMouseOffset(e){this.mouseOffset={left:e.x-e.left,top:e.y-e.top}}calculateWindowLocation(e){const t={x:Math.round(Number(e.x)),y:Math.round(Number(e.y))};this.edge||(this.edge=this.getResizeEdge(this.startBounds,t,this.resizeType));let n,i,{left:r}=this.location,{right:o}=this.location,{top:s}=this.location,{bottom:a}=this.location,u=0;if(this.edge){switch(u=1,this.edge){case"left":r=t.x;break;case"right":o=t.x;break;case"top":s=t.y;break;case"bottom":a=t.y;break;case"top-left":r=t.x,s=t.y;break;case"top-right":o=t.x,s=t.y;break;case"bottom-left":r=t.x,a=t.y;break;case"bottom-right":o=t.x,a=t.y}i=o-r,n=a-s}else r=t.x-Number(this.mouseOffset.left),s=t.y-Number(this.mouseOffset.top),a=Number(a)-(t.y-this.mouseLocation.y),o=Number(o)-(t.x-this.mouseLocation.x),n=Number(this.location.height),i=Number(this.location.width);const l=this.location;return l.changeType=u,l.left=Number(r),l.top=Number(s),l.bottom=Number(a),l.right=Number(o),l.height=Number(n),l.width=Number(i),this.mouseLocation=t,this.location=l,l}getResizeEdge(e,t,n){if("None"===n)return null;let i=null;switch(n){case"WE":i=Math.abs(t.x-e.left)<Math.abs(t.x-e.right)?"left":"right";break;case"NS":i=Math.abs(t.y-e.bottom)<Math.abs(t.y-e.top)?"bottom":"top";break;case"NESW":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-right":"bottom-left";break;case"NWSE":i=Math.abs(t.y-e.top)<Math.abs(t.y-e.bottom)?"top-left":"bottom-right"}return i}}},32790:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=h(n(22708)),r=h(n(80089)),o=h(n(72551)),s=h(n(9562)),a=h(n(6008)),u=n(75688),l=n(51742),c=h(n(39319)),d=h(n(96963)),f=h(n(5020)),p=n(76163);function h(e){return e&&e.__esModule?e:{default:e}}s.default.initialize(),t.default=class{constructor(e){this.assimilationHelper=e,this.activeWindows={},this.awaitingAssimilationSpawn={},this.awaitingSpawn={},this.allWindows={},this.movingWindow=null,this.floatingTitlebar=null,this.updateActiveWindowHeartbeats()}setWebsocket(e){this.ws=e}sendSocketMessage(e){if(!this.ws)return setTimeout((()=>{this.sendSocketMessage(e)}),100);this.ws.send(e)}setMovingWindow(e){return o.default.system.debug("Assimilation.AssimilationWindowManager.setMovingWindow",e),this.movingWindow=new d.default(e)}getMovingWindow(){return o.default.system.debug("Assimilation.AssimilationWindowManager.getMovingWindow"),this.movingWindow}getWindowByUUID(e){return o.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByUUID:",e),this.activeWindows[e]}getWindowByName(e){o.default.system.debug("Assimilation.AssimilationWindowManager.getWindowByName:",e);const t=Object.keys(this.activeWindows);for(let n=0;n<t.length;n++){const i=this.activeWindows[t[n]];if(i.windowName===e)return i}}updateSpawningWindow(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager.updateSpawningWindow:",e,t);const n=this.awaitingAssimilationSpawn[e];if(n)return t||(n.windowLess=!0,t=e),n.uuid=t,this.activeWindows[t]=n,delete this.awaitingAssimilationSpawn[e],n}updateSpawningWindowFromWindowObject(e){const t=e.data,n={name:e.data.name,windowType:"FinsembleNativeWindow"};return u.FinsembleWindow.getInstance(n,(async(e,n)=>{n.descriptor.hideTitleBar=!0,n.uuid=parseInt(t.windowHandle,10).toString(16),this.activeWindows[n.uuid]=n;const i=await n.getBounds();i.data&&this.handleSpawnComplete(n,i.data)}))}handleSpawnComplete(e,t){if(o.default.system.debug("Assimilation.AssimilationWindowManager.handleSpawnComplete:",e,t),!e)return o.default.system.error("no window reference found");const n=(0,r.default)(e,"descriptor.customData.foreign.services.windowService.manageWindowMovement",!0);t&&n&&this.assimilationHelper.canHookWindow(e)&&(e.location=t,e.setBounds({bounds:t}),e.onReady((()=>{c.default.transmit(`${e.name}.endMovement`)}))),this.registerWindow(e,e)}addNativeWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.addNativeWindow:",e),this.allWindows[e.uuid]=e;let t=this;this.assimilationHelper.executableInConfig(e,((n,i)=>{i||(e.windowName=e.name,t.assimilationHelper.canHookWindow(e)&&s.default._createWrap({name:e.uuid},((n,i)=>{n&&o.default.system.error("Error inside of createWrap:",n),u.FinsembleWindow.getInstance(i.data,((n,i)=>{if(n)return o.default.system.error("Could not create wrap for window",e);t.activeWindows[e.uuid]=i,i.uuid=e.uuid,t.handleSpawnComplete(i,e)}))})))}))}moveWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.moveWindow:",e),!e.location)return;if(!e.name)return;let t=this.getWindowByUUID(e.key);if(!t){if(t=this.getWindowByName(e.name),!t)return void o.default.system.error("MoveWindow - could not find window. Name:",e.name,"Handle:",e.key);o.default.system.warn("MoveWindow - Could not find window by UUID, but did find window by name. Name:",e.name,"Handle:",e.key)}e.location.width=Math.round(e.location.width),e.location.bottom=Math.round(e.location.bottom),e.location.height=Math.round(e.location.height),e.location.left=Math.round(e.location.left),e.location.right=Math.round(e.location.right),isNaN(e.location.left)||(isNaN(e.location.height)&&(e.location.height=e.location.bottom-e.location.top,e.location.width=e.location.right-e.location.left),t.location={...e.location},this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"moveWindow",uuid:t.uuid,windowId:t.uuid,location:e.location,locationResponse:e.locationResponse,resizable:e.resizable})))}showWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.showWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"showWindow",uuid:e.data.key,windowId:e.data.key}))}hideWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.hideWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hideWindow",uuid:e.data.key,windowId:e.data.key}))}dockWindow(e){const t=("00000000"+e.data.key).substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"dockWindow",uuid:t,windowId:t,edge:e.data.edge,bounds:e.data.bounds}))}undockWindow(e){const t=("00000000"+e.data.key).substr(-8);this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"undockWindow",uuid:t,windowId:t}))}closeWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.closeWindow:",e);const t=this.getWindowByName(e.data.name);t&&(t.windowLess?(c.default.transmit(`Finsemble.Assimilation.close.${t.windowName}`,{}),t.queryResponder=e.sendQueryResponse,this.removeWindow(t.uuid,!1)):t.spawnedByFea?this._closeSpawned(t.finUUID,e.sendQueryResponse):(t.queryResponder=e.sendQueryResponse,this._closeAssimilationSpawned(t.uuid)))}_closeAssimilationSpawned(e){o.default.system.debug("Assimilation.AssimilationWindowManager._closeAssimilationSpawned:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e})),setTimeout((()=>{this.getWindowByUUID(e)&&this._closeAssimilationSpawned(e)}),1e3)}_closeSpawned(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager._closeSpawned:",e),l.System.terminateExternalProcess(e,0,(e=>{t&&t(null,null),o.default.system.debug("Assimilation window closed:",e)}),(e=>{t&&t(null,null),o.default.system.error("Assimilation window closed error:",e)}))}closeAllWindows(e){o.default.system.debug("Assimilation.AssimilationWindowManager.closeAllWindows:",e),Object.keys(this.activeWindows).map((e=>{c.default.transmit("LauncherService.shutdownResponse",{waitForMe:!1,name:this.activeWindows[e].windowName}),this.removeWindow(e,!1),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"closeWindow",uuid:e,windowId:e}))}))}bringToFront(e){let t;if(o.default.system.debug("Assimilation.AssimilationWindowManager.bringToFront:",e),e.data.name){if(t=this.getWindowByName(e.data.name),!t)return void console.log("Failed to get window",e.data.name);e.data.key=t.uuid}else t=this.getWindowByUUID(e.data.key);"minimize"===t.state&&this.showWindow(e),t.descriptor.alwaysOnTop||this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"bringToFront",uuid:e.data.key,windowId:e.data.key}))}minimizeWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.minimizeWindow:",e);const t=this.getWindowByName(e.data.name);e.data.name&&(e.data.key=t.uuid),t.state="minimize",t.lastMinimized=Date.now(),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"minimize",uuid:e.data.key,windowId:e.data.key}))}maximizeWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.maximizeWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="maximize"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"maximize",uuid:e.data.key,windowId:e.data.key}))}restoreWindow(e){if(o.default.system.debug("Assimilation.AssimilationWindowManager.restoreWindow:",e),e.data.name){const t=this.getWindowByName(e.data.name);e.data.key=t.uuid,t.state="restore"}this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"restore",uuid:e.data.key,windowId:e.data.key})),c.default.transmit(`${e.data.name}.restored`,{})}alwaysOnTop(e){let t;t=e.data.name&&!e.data.key?this.getWindowByName(e.data.name):this.getWindowByUUID(e.data.key),(t||e.data.key)&&(o.default.system.debug("Assimilation.AssimilationWindowManager.alwaysOnTop:",e),this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"alwaysOnTop",uuid:e.data.key||t.uuid,alwaysOnTop:e.data.alwaysonTop})),t.descriptor&&t.descriptor.alwaysOnTop!==e.data.alwaysonTop&&t.updateOptions({alwaysOnTop:e.data.alwaysonTop},Function.prototype))}removeWindow(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager.removeWindow:",e);const n=this.getWindowByUUID(e);if(!n)return delete this.activeWindows[e],delete this.allWindows[e];n.queryResponder?n.queryResponder(null,null):n.close({fromAssimilation:!0,removeFromWorkspace:t}),delete this.activeWindows[e],delete this.allWindows[e],c.default.query("Launcher.removeComponent",{name:n.windowName},(()=>{}))}parseApplicationList(e){o.default.system.debug("Assimilation.AssimilationWindowManager.parseApplicationList:",e);const t=JSON.parse(e);this.checkForRemoved(t);for(let e=0;e<t.length;e++){const n=t[e];this.allWindows[n.uuid]||this.addNativeWindow(n)}}checkForRemoved(e){let t;o.default.system.debug("Assimilation.AssimilationWindowManager.checkForRemoved:",e);for(const n in this.allWindows)if(t=!1,!this.allWindows[n].windowLess){for(let i=0;i<e.length;i++)if(e[i].uuid===this.allWindows[n].uuid){t=!0;break}t||(this.activeWindows[n]&&this.activeWindows[n].unRegisterWithDocking(),delete this.activeWindows[n],delete this.allWindows[n])}}registerWindow(e,t){o.default.system.debug("Assimilation.AssimilationWindowManager.registerWindow:",t.windowName,e,t),e.name=t.windowName;const n={name:t.windowName,uuid:t.uuid,windowType:"NativeWindow",windowMsg:{location:e.location?e.location:null},options:{minWidth:t.descriptor.minWidth||0,minHeight:t.descriptor.minHeight||0,maxWidth:t.descriptor.maxWidth||1/0,maxHeight:t.descriptor.maxHeight||1/0}};let i=`Finsemble.${t.windowName}.wrapReady`;var r=c.default.subscribe(i,((i,o)=>{t.wrapState="ready",t.initializeWindow({identifier:n,manageWindowMovement:Boolean(e.location)}),o.data&&o.data.name===n.name&&"closed"!==o.data.state&&(t.descriptor.isWPF,c.default.transmit(`${e.name}.onSpawned`,n),f.default.publishBootStatus(t.componentType,"components","completed"),c.default.unsubscribe(r))}));e.location&&this.sendSocketMessage(this.assimilationHelper.prepareAction({topic:"hookWindow",uuid:t.uuid}))}unRegisterAllWindows(){if(o.default.system.debug("Assimilation.AssimilationWindowManager.unRegisterAllWindows:"),Object.keys(this.activeWindows).length>0)for(const e in this.activeWindows)this.activeWindows[e].unRegisterWithDocking();this.activeWindows={}}spawnWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.spawnWindow:",e);const t=this.assimilationHelper.manifest.useFeaSpawn,n=e.descriptor.customData.window.hasOwnProperty("useFeaSpawn")?e.descriptor.customData.window.useFeaSpawn:t;if(e.descriptor.alias)return n?this._spawnByAlias(e):this._SpawnByAlias(e);n?this._spawnByPathThroughContainer(e):this._spawnByPath(e)}async saveWindow(e){o.default.system.debug("Assimilation.AssimilationWindowManager.saveWindow:",e);const t=this.getWindowByUUID(e.data.key);if(t&&(e.data.location&&(t.location=e.data.location,t.location.width||(t.location.width=t.location.right-t.location.left),t.location.height||(t.location.height=t.location.bottom-t.location.top),t.descriptor.defaultLeft=t.location.left,t.descriptor.defaultTop=t.location.top,t.descriptor.defaultWidth=t.location.width,t.descriptor.defaultHeight=t.location.height,t.descriptor.defaultRight=t.location.left+t.location.width,t.descriptor.defaultBottom=t.location.top+t.location.height,t.descriptor.left=t.location.left,t.descriptor.top=t.location.top,t.descriptor.width=t.location.width,t.descriptor.height=t.location.height,t.descriptor.right=t.descriptor.defaultRight,t.descriptor.bottom=t.descriptor.defaultBottom),t.descriptor.cacheLocation=t.restoreBounds,e.data.options&&e.data.options.autoShow&&(t.descriptor.autoShow=e.data.options.autoShow),t.descriptor=Object.assign(t.descriptor,e.data),t.descriptor.customData&&delete t.descriptor.customData.manifest,delete t.descriptor.url,!t.outsideOfFinsemble)){const e=await p.BaseWindow.cleanupState(t.descriptor);try{a.default._setWindowState({windowName:t.descriptor.name,state:{windowData:e}})}catch{}}}setFloatingTitlebar(e){this.floatingTitlebar=e}getFloatingTitlebar(){return this.floatingTitlebar}updateActiveWindowHeartbeats(){setInterval((()=>{for(const e in this.activeWindows){const t=this.activeWindows[e];t.descriptor.isWPF||c.default.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName})}}),1e3)}_spawnByPath(e){console.log(`Spawning ${e.name}`),o.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,i.default)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n={topic:"openNewApp",env:e.descriptor.env,path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,alwaysOnTop:!!e.descriptor.hasOwnProperty("alwaysOnTop")&&e.descriptor.alwaysOnTop,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,spawnUUID:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,r.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,r.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,r.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(n))}_SpawnByAlias(e){o.default.system.debug("Assimilation.AssimilationWindowManager._SpawnByAlias:",e);const t=(0,i.default)();e.ref=t,this.awaitingAssimilationSpawn[t]=e;const n=this.assimilationHelper.findAssetByAlias(e.descriptor.alias||e.descriptor.generatedPath||e.descriptor.path);if(!n)return o.default.system.error("The alias or path for this asset is missing");const s={topic:"openAssetApp",alias:n.alias,env:e.descriptor.env,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,version:n.version,target:n.target,autoShow:!e.descriptor.hasOwnProperty("autoShow")||e.descriptor.autoShow,spawnDefaultViewer:!!e.descriptor.hasOwnProperty("spawnDefaultViewer")&&e.descriptor.spawnDefaultViewer,ref:t,spawnUUID:t,location:{left:e.descriptor.defaultLeft,top:e.descriptor.defaultTop,height:e.descriptor.defaultHeight,width:e.descriptor.defaultWidth},windowTitleWhiteList:(0,r.default)(e,"descriptor.customData.window.windowTitleWhiteList"),windowTitleBlackList:(0,r.default)(e,"descriptor.customData.window.windowTitleBlackList"),windowSpawnTimeout:(0,r.default)(e,"descriptor.customData.window.windowSpawnTimeout")};this.sendSocketMessage(JSON.stringify(s))}_spawnByPathThroughContainer(e){o.default.system.debug("Assimilation.AssimilationWindowManager._spawnByPath:",e);const t=(0,i.default)();e.ref=t,e.spawnedByFea=!0,this.awaitingSpawn[t]=e,l.System.launchExternalProcess({path:e.descriptor.generatedPath||e.descriptor.path,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,lifetime:"window",listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),o.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):o.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{o.default.system.error("Error in spawnByPath",e)}))}_spawnByAlias(e){o.default.system.debug("Assimilation.AssimilationWindowManager._spawnByAlias:",e);const t=(0,i.default)();e.ref=t,e.spawnedByFea=!0,e.appAsset=this.assimilationHelper.findAssetByAlias(e.descriptor.alias),this.awaitingSpawn[t]=e,l.System.launchExternalProcess({alias:e.descriptor.alias,arguments:e.descriptor.generatedArguments||e.descriptor.arguments,lifetime:"window",listener:t=>{"exited"===t.topic?(this.removeWindow(e.uuid,!0),o.default.system.log("Assimilation.AssimilationWindowManager:Exited External Process",t)):o.default.system.log("Assimilation.AssimilationWindowManager:Running External Process",t)}},(t=>{e.finUUID=t.uuid}),(e=>{o.default.system.error(e)}))}}},44791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(22708)),r=s(n(72551)),o=s(n(70010));function s(e){return e&&e.__esModule?e:{default:e}}o.default.initialize(),t.default=class{constructor(e){this.appAssets=e.appAssets,this.manifest=e.manifest,this.blacklist=this.manifest.blacklist.map((e=>e.toUpperCase())),this.whitelist=this.manifest.whitelist.map((e=>e.toUpperCase()))}canHookWindow(e){const t=this.manifest.onlySpawned;return!(t&&!e.descriptor||(t&&e.descriptor&&!this.checkBlacklist(e)?(r.default.system.debug("Assimilation.canHookWindow: true"),0):this.checkBlacklist(e)||!this.checkWhitelist(e)&&this.whitelist.length>0))}executableInConfig(e,t){if(!e.executablePath)return t("not found",!1);const n=e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase();o.default.getValue({field:"finsemble.components"},((i,r)=>{const o=Object.keys(r);for(let i=0;i<o.length;i++){const s=r[o[i]];if(s.window&&s.window.path){const i=s.window.path.replace(/^.*[\\\/]/,"").toUpperCase();if(e.executablePath&&i===n)return t(null,!0)}}return this.executableInAssets(e,t)}))}executableInAssets(e,t){for(let n=0;n<this.appAssets.length;n++)if(this.appAssets[n].target.toUpperCase()===e.executablePath.replace(/^.*[\\\/]/,"").toUpperCase())return t(null,!0);return t(null,!1)}checkBlacklist(e){if(!e.windowName)return!1;if(this.blacklist.length>0&&this.blacklist.includes(e.windowName.toUpperCase()))return!0;for(let t=0;t<this.blacklist.length;t++){const n=new RegExp(`^.*\\${this.blacklist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!1;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!1}return!1}checkWhitelist(e){if(!e.windowName)return!1;for(let t=0;t<this.whitelist.length;t++){const n=new RegExp(`^.*\\${this.whitelist[t]}$`);if(n.test(e.windowName.toUpperCase()))return!0;if(e.executablePath&&n.test(e.executablePath.toUpperCase()))return!0}return!1}prepareAction(e){const t=(0,i.default)();e.ref=t;const n=JSON.stringify(e);return e.expiry=Date.now()+3e3,n}findAssetByAlias(e){if(!Array.isArray(this.appAssets))return null;for(let t=0;t<this.appAssets.length;t++)if(this.appAssets[t].alias===e||this.appAssets[t].path===e)return this.appAssets[t];return null}}},74602:function(e,t,n){var i,r;void 0===(r="function"==typeof(i=function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(t,n){return n&&!0===n.clone&&e(t)?i((r=t,Array.isArray(r)?[]:{}),t,n):t;var r}function n(n,r,o){var s=n.slice();return r.forEach((function(r,a){void 0===s[a]?s[a]=t(r,o):e(r)?s[a]=i(n[a],r,o):-1===n.indexOf(r)&&s.push(t(r,o))})),s}function i(r,o,s){var a=Array.isArray(o),u=(s||{arrayMerge:n}).arrayMerge||n;return a?Array.isArray(r)?u(r,o,s):t(o,s):function(n,r,o){var s={};return e(n)&&Object.keys(n).forEach((function(e){s[e]=t(n[e],o)})),Object.keys(r).forEach((function(a){e(r[a])&&n[a]?s[a]=i(n[a],r[a],o):s[a]=t(r[a],o)})),s}(r,o,s)}return i.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,n){return i(e,n,t)}))},i})?i.call(t,n,t,e):i)||(e.exports=r)},33034:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new r(i,o||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,s=new Array(o);r<o;r++)s[r]=i[r].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},a.prototype.emit=function(e,t,i,r,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,o,s),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,i);break;case 4:c[l].fn.call(c[l].context,t,i,r);break;default:if(!u)for(f=1,u=new Array(d-1);f<d;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,i,r){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||r&&!a.once||i&&a.context!==i||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||r&&!a[u].once||i&&a[u].context!==i)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},5939:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=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 r=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,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,i){var r,o,s,l;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=u(e))>0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=c.bind(i);return r.listener=n,i.wrapFn=r,r}function f(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]: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}(r):h(r,r.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),i=0;i<t;++i)n[i]=e[i];return n}function m(e,t,n,i){if("function"==typeof e.on)i.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 r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(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||r(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 r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){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)i(u,this,t);else{var l=u.length,c=h(u,l);for(n=0;n<l;++n)i(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;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 r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);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(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},24081:(e,t,n)=>{var i=n(21059)(n(158),"DataView");e.exports=i},15999:(e,t,n)=>{var i=n(13387),r=n(69252),o=n(31125),s=n(9021),a=n(68131);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}u.prototype.clear=i,u.prototype.delete=r,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},26811:(e,t,n)=>{var i=n(72215),r=n(56105),o=n(30484),s=n(8046),a=n(30603);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}u.prototype.clear=i,u.prototype.delete=r,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},60945:(e,t,n)=>{var i=n(21059)(n(158),"Map");e.exports=i},25835:(e,t,n)=>{var i=n(73633),r=n(39382),o=n(28850),s=n(70756),a=n(2769);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}u.prototype.clear=i,u.prototype.delete=r,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},27540:(e,t,n)=>{var i=n(21059)(n(158),"Promise");e.exports=i},80476:(e,t,n)=>{var i=n(21059)(n(158),"Set");e.exports=i},74868:(e,t,n)=>{var i=n(25835),r=n(57554),o=n(18800);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=r,s.prototype.has=o,e.exports=s},34987:(e,t,n)=>{var i=n(26811),r=n(73832),o=n(31676),s=n(33577),a=n(43343),u=n(20488);function l(e){var t=this.__data__=new i(e);this.size=t.size}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},44937:(e,t,n)=>{var i=n(158).Symbol;e.exports=i},48596:(e,t,n)=>{var i=n(158).Uint8Array;e.exports=i},18307:(e,t,n)=>{var i=n(21059)(n(158),"WeakMap");e.exports=i},90929:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},73034:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},5680:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}},92554:(e,t,n)=>{var i=n(65086),r=n(67016),o=n(93706),s=n(77638),a=n(49699),u=n(70094),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&r(e),d=!n&&!c&&s(e),f=!n&&!c&&!d&&u(e),p=n||c||d||f,h=p?i(e.length,String):[],m=h.length;for(var w in e)!t&&!l.call(e,w)||p&&("length"==w||d&&("offset"==w||"parent"==w)||f&&("buffer"==w||"byteLength"==w||"byteOffset"==w)||a(w,m))||h.push(w);return h}},57041:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},52824:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},99280:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},96122:(e,t,n)=>{var i=n(88039),r=n(1316),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&r(s,n)&&(void 0!==n||t in e)||i(e,t,n)}},33993:(e,t,n)=>{var i=n(1316);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},73977:(e,t,n)=>{var i=n(34386),r=n(23150);e.exports=function(e,t){return e&&i(t,r(t),e)}},5081:(e,t,n)=>{var i=n(34386),r=n(61530);e.exports=function(e,t){return e&&i(t,r(t),e)}},88039:(e,t,n)=>{var i=n(88689);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},49548:(e,t,n)=>{var i=n(34987),r=n(73034),o=n(96122),s=n(73977),a=n(5081),u=n(728),l=n(86923),c=n(21375),d=n(1584),f=n(47461),p=n(31441),h=n(35551),m=n(75539),w=n(83394),g=n(45010),y=n(93706),v=n(77638),b=n(55948),S=n(23619),C=n(78255),_=n(23150),A=n(61530),W="[object Arguments]",E="[object Function]",T="[object Object]",L={};L[W]=L["[object Array]"]=L["[object ArrayBuffer]"]=L["[object DataView]"]=L["[object Boolean]"]=L["[object Date]"]=L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Map]"]=L["[object Number]"]=L[T]=L["[object RegExp]"]=L["[object Set]"]=L["[object String]"]=L["[object Symbol]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L["[object Error]"]=L[E]=L["[object WeakMap]"]=!1,e.exports=function e(t,n,I,O,k,N){var R,P=1&n,M=2&n,F=4&n;if(I&&(R=k?I(t,O,k,N):I(t)),void 0!==R)return R;if(!S(t))return t;var D=y(t);if(D){if(R=m(t),!P)return l(t,R)}else{var x=h(t),j=x==E||"[object GeneratorFunction]"==x;if(v(t))return u(t,P);if(x==T||x==W||j&&!k){if(R=M||j?{}:g(t),!P)return M?d(t,a(R,t)):c(t,s(R,t))}else{if(!L[x])return k?t:{};R=w(t,x,P)}}N||(N=new i);var B=N.get(t);if(B)return B;N.set(t,R),C(t)?t.forEach((function(i){R.add(e(i,n,I,i,t,N))})):b(t)&&t.forEach((function(i,r){R.set(r,e(i,n,I,r,t,N))}));var $=D?void 0:(F?M?p:f:M?A:_)(t);return r($||t,(function(i,r){$&&(i=t[r=i]),o(R,r,e(i,n,I,r,t,N))})),R}},33776:(e,t,n)=>{var i=n(23619),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},22153:(e,t,n)=>{var i=n(52824),r=n(76648);e.exports=function e(t,n,o,s,a){var u=-1,l=t.length;for(o||(o=r),a||(a=[]);++u<l;){var c=t[u];n>0&&o(c)?n>1?e(c,n-1,o,s,a):i(a,c):s||(a[a.length]=c)}return a}},51845:(e,t,n)=>{var i=n(49160),r=n(46384);e.exports=function(e,t){for(var n=0,o=(t=i(t,e)).length;null!=e&&n<o;)e=e[r(t[n++])];return n&&n==o?e:void 0}},45328:(e,t,n)=>{var i=n(52824),r=n(93706);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},20194:(e,t,n)=>{var i=n(44937),r=n(15401),o=n(92445),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?r(e):o(e)}},56640:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},64634:(e,t,n)=>{var i=n(20194),r=n(81653);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},95372:(e,t,n)=>{var i=n(55365),r=n(81653);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,o,s,e,a))}},55365:(e,t,n)=>{var i=n(34987),r=n(95428),o=n(1108),s=n(71711),a=n(35551),u=n(93706),l=n(77638),c=n(70094),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,w,g){var y=u(e),v=u(t),b=y?f:a(e),S=v?f:a(t),C=(b=b==d?p:b)==p,_=(S=S==d?p:S)==p,A=b==S;if(A&&l(e)){if(!l(t))return!1;y=!0,C=!1}if(A&&!C)return g||(g=new i),y||c(e)?r(e,t,n,m,w,g):o(e,t,b,n,m,w,g);if(!(1&n)){var W=C&&h.call(e,"__wrapped__"),E=_&&h.call(t,"__wrapped__");if(W||E){var T=W?e.value():e,L=E?t.value():t;return g||(g=new i),w(T,L,n,m,g)}}return!!A&&(g||(g=new i),s(e,t,n,m,w,g))}},2471:(e,t,n)=>{var i=n(35551),r=n(81653);e.exports=function(e){return r(e)&&"[object Map]"==i(e)}},4249:(e,t,n)=>{var i=n(39277),r=n(83481),o=n(23619),s=n(91223),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?f:a).test(s(e))}},42388:(e,t,n)=>{var i=n(35551),r=n(81653);e.exports=function(e){return r(e)&&"[object Set]"==i(e)}},88595:(e,t,n)=>{var i=n(20194),r=n(62008),o=n(81653),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!s[i(e)]}},76324:(e,t,n)=>{var i=n(3067),r=n(32501),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},21506:(e,t,n)=>{var i=n(23619),r=n(3067),o=n(90807),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=r(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},11241:(e,t,n)=>{var i=n(10722),r=n(47975);e.exports=function(e,t){return i(e,t,(function(t,n){return r(e,n)}))}},10722:(e,t,n)=>{var i=n(51845),r=n(68400),o=n(49160);e.exports=function(e,t,n){for(var s=-1,a=t.length,u={};++s<a;){var l=t[s],c=i(e,l);n(c,l)&&r(u,o(l,e),c)}return u}},68400:(e,t,n)=>{var i=n(96122),r=n(49160),o=n(49699),s=n(23619),a=n(46384);e.exports=function(e,t,n,u){if(!s(e))return e;for(var l=-1,c=(t=r(t,e)).length,d=c-1,f=e;null!=f&&++l<c;){var p=a(t[l]),h=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(l!=d){var m=f[p];void 0===(h=u?u(m,p,f):void 0)&&(h=s(m)?m:o(t[l+1])?[]:{})}i(f,p,h),f=f[p]}return e}},86920:(e,t,n)=>{var i=n(80446),r=n(88689),o=n(41549),s=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:o;e.exports=s},65086:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},80430:(e,t,n)=>{var i=n(44937),r=n(57041),o=n(93706),s=n(81878),a=i?i.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},12383:(e,t,n)=>{var i=n(38725),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},2723:e=>{e.exports=function(e){return function(t){return e(t)}}},67446:e=>{e.exports=function(e,t){return e.has(t)}},49160:(e,t,n)=>{var i=n(93706),r=n(63140),o=n(39230),s=n(33270);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:o(s(e))}},53310:(e,t,n)=>{var i=n(48596);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},728:(e,t,n)=>{e=n.nmd(e);var i=n(158),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}},14352:(e,t,n)=>{var i=n(53310);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},44694:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},29169:(e,t,n)=>{var i=n(44937),r=i?i.prototype:void 0,o=r?r.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},69752:(e,t,n)=>{var i=n(53310);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},86923:e=>{e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},34386:(e,t,n)=>{var i=n(96122),r=n(88039);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=o?o(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),s?r(n,l,c):i(n,l,c)}return n}},21375:(e,t,n)=>{var i=n(34386),r=n(45278);e.exports=function(e,t){return i(e,r(e),t)}},1584:(e,t,n)=>{var i=n(34386),r=n(27508);e.exports=function(e,t){return i(e,r(e),t)}},38728:(e,t,n)=>{var i=n(158)["__core-js_shared__"];e.exports=i},88689:(e,t,n)=>{var i=n(21059),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},95428:(e,t,n)=>{var i=n(74868),r=n(99280),o=n(67446);e.exports=function(e,t,n,s,a,u){var l=1&n,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(e),p=u.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,w=2&n?new i:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var g=e[h],y=t[h];if(s)var v=l?s(y,g,h,t,e,u):s(g,y,h,e,t,u);if(void 0!==v){if(v)continue;m=!1;break}if(w){if(!r(t,(function(e,t){if(!o(w,t)&&(g===e||a(g,e,n,s,u)))return w.push(t)}))){m=!1;break}}else if(g!==y&&!a(g,y,n,s,u)){m=!1;break}}return u.delete(e),u.delete(t),m}},1108:(e,t,n)=>{var i=n(44937),r=n(48596),o=n(1316),s=n(95428),a=n(11382),u=n(76680),l=i?i.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,i,l,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var h=1&i;if(p||(p=u),e.size!=t.size&&!h)return!1;var m=f.get(e);if(m)return m==t;i|=2,f.set(e,t);var w=s(p(e),p(t),i,l,d,f);return f.delete(e),w;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},71711:(e,t,n)=>{var i=n(47461),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var u=1&n,l=i(e),c=l.length;if(c!=i(t).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in t:r.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var w=u;++d<c;){var g=e[f=l[d]],y=t[f];if(o)var v=u?o(y,g,f,t,e,a):o(g,y,f,e,t,a);if(!(void 0===v?g===y||s(g,y,n,o,a):v)){m=!1;break}w||(w="constructor"==f)}if(m&&!w){var b=e.constructor,S=t.constructor;b==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof S&&S instanceof S||(m=!1)}return a.delete(e),a.delete(t),m}},39169:(e,t,n)=>{var i=n(30597),r=n(53039),o=n(47209);e.exports=function(e){return o(r(e,void 0,i),e+"")}},14528:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},47461:(e,t,n)=>{var i=n(45328),r=n(45278),o=n(23150);e.exports=function(e){return i(e,o,r)}},31441:(e,t,n)=>{var i=n(45328),r=n(27508),o=n(61530);e.exports=function(e){return i(e,o,r)}},5662:(e,t,n)=>{var i=n(10205);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},21059:(e,t,n)=>{var i=n(4249),r=n(4759);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},97959:(e,t,n)=>{var i=n(78579)(Object.getPrototypeOf,Object);e.exports=i},15401:(e,t,n)=>{var i=n(44937),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[a]=n:delete e[a]),r}},45278:(e,t,n)=>{var i=n(5680),r=n(59174),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),i(s(e),(function(t){return o.call(e,t)})))}:r;e.exports=a},27508:(e,t,n)=>{var i=n(52824),r=n(97959),o=n(45278),s=n(59174),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,o(e)),e=r(e);return t}:s;e.exports=a},35551:(e,t,n)=>{var i=n(24081),r=n(60945),o=n(27540),s=n(80476),a=n(18307),u=n(20194),l=n(91223),c="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",m=l(i),w=l(r),g=l(o),y=l(s),v=l(a),b=u;(i&&b(new i(new ArrayBuffer(1)))!=h||r&&b(new r)!=c||o&&b(o.resolve())!=d||s&&b(new s)!=f||a&&b(new a)!=p)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,i=n?l(n):"";if(i)switch(i){case m:return h;case w:return c;case g:return d;case y:return f;case v:return p}return t}),e.exports=b},4759:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},96919:(e,t,n)=>{var i=n(49160),r=n(67016),o=n(93706),s=n(49699),a=n(62008),u=n(46384);e.exports=function(e,t,n){for(var l=-1,c=(t=i(t,e)).length,d=!1;++l<c;){var f=u(t[l]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(f,c)&&(o(e)||r(e))}},13387:(e,t,n)=>{var i=n(45155);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},69252:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},31125:(e,t,n)=>{var i=n(45155),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},9021:(e,t,n)=>{var i=n(45155),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},68131:(e,t,n)=>{var i=n(45155);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},75539:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,i=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(i.index=e.index,i.input=e.input),i}},83394:(e,t,n)=>{var i=n(53310),r=n(14352),o=n(44694),s=n(29169),a=n(69752);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return i(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return r(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return s(e)}}},45010:(e,t,n)=>{var i=n(33776),r=n(97959),o=n(3067);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:i(r(e))}},76648:(e,t,n)=>{var i=n(44937),r=n(67016),o=n(93706),s=i?i.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||r(e)||!!(s&&e&&e[s])}},49699:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},63140:(e,t,n)=>{var i=n(93706),r=n(81878),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!r(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},10205:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},83481:(e,t,n)=>{var i,r=n(38728),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},3067:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},72215:e=>{e.exports=function(){this.__data__=[],this.size=0}},56105:(e,t,n)=>{var i=n(33993),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():r.call(t,n,1),--this.size,0))}},30484:(e,t,n)=>{var i=n(33993);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},8046:(e,t,n)=>{var i=n(33993);e.exports=function(e){return i(this.__data__,e)>-1}},30603:(e,t,n)=>{var i=n(33993);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},73633:(e,t,n)=>{var i=n(15999),r=n(26811),o=n(60945);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},39382:(e,t,n)=>{var i=n(5662);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},28850:(e,t,n)=>{var i=n(5662);e.exports=function(e){return i(this,e).get(e)}},70756:(e,t,n)=>{var i=n(5662);e.exports=function(e){return i(this,e).has(e)}},2769:(e,t,n)=>{var i=n(5662);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},11382:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}},32202:(e,t,n)=>{var i=n(54883);e.exports=function(e){var t=i(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},45155:(e,t,n)=>{var i=n(21059)(Object,"create");e.exports=i},32501:(e,t,n)=>{var i=n(78579)(Object.keys,Object);e.exports=i},90807:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},41771:(e,t,n)=>{e=n.nmd(e);var i=n(14528),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r&&i.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},92445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78579:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},53039:(e,t,n)=>{var i=n(90929),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=r(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=o[s];return l[t]=n(u),i(e,this,l)}}},158:(e,t,n)=>{var i=n(14528),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},57554:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},18800:e=>{e.exports=function(e){return this.__data__.has(e)}},76680:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},47209:(e,t,n)=>{var i=n(86920),r=n(10832)(i);e.exports=r},10832:e=>{var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),o=16-(r-i);if(i=r,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},73832:(e,t,n)=>{var i=n(26811);e.exports=function(){this.__data__=new i,this.size=0}},31676:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},33577:e=>{e.exports=function(e){return this.__data__.get(e)}},43343:e=>{e.exports=function(e){return this.__data__.has(e)}},20488:(e,t,n)=>{var i=n(26811),r=n(60945),o=n(25835);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!r||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},39230:(e,t,n)=>{var i=n(32202),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,(function(e,n,i,r){t.push(i?r.replace(o,"$1"):n||e)})),t}));e.exports=s},46384:(e,t,n)=>{var i=n(81878);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},91223:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},38725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},71879:(e,t,n)=>{var i=n(49548);e.exports=function(e){return i(e,4)}},99748:(e,t,n)=>{var i=n(49548);e.exports=function(e){return i(e,5)}},80446:e=>{e.exports=function(e){return function(){return e}}},76897:(e,t,n)=>{var i=n(23619),r=n(98253),o=n(95053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,l,c,d,f,p,h=0,m=!1,w=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=u,i=l;return u=l=void 0,h=t,d=e.apply(i,n)}function v(e){return h=e,f=setTimeout(S,t),m?y(e):d}function b(e){var n=e-p;return void 0===p||n>=t||n<0||w&&e-h>=c}function S(){var e=r();if(b(e))return C(e);f=setTimeout(S,function(e){var n=t-(e-p);return w?a(n,c-(e-h)):n}(e))}function C(e){return f=void 0,g&&u?y(e):(u=l=void 0,d)}function _(){var e=r(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return v(p);if(w)return clearTimeout(f),f=setTimeout(S,t),y(p)}return void 0===f&&(f=setTimeout(S,t)),d}return t=o(t)||0,i(n)&&(m=!!n.leading,c=(w="maxWait"in n)?s(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=p=l=f=void 0},_.flush=function(){return void 0===f?d:C(r())},_}},1316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},30597:(e,t,n)=>{var i=n(22153);e.exports=function(e){return null!=e&&e.length?i(e,1):[]}},80089:(e,t,n)=>{var i=n(51845);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},47975:(e,t,n)=>{var i=n(56640),r=n(96919);e.exports=function(e,t){return null!=e&&r(e,t,i)}},41549:e=>{e.exports=function(e){return e}},67016:(e,t,n)=>{var i=n(64634),r=n(81653),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=i(function(){return arguments}())?i:function(e){return r(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},93706:e=>{var t=Array.isArray;e.exports=t},51528:(e,t,n)=>{var i=n(39277),r=n(62008);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},77638:(e,t,n)=>{e=n.nmd(e);var i=n(158),r=n(30647),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?i.Buffer:void 0,u=(a?a.isBuffer:void 0)||r;e.exports=u},47184:(e,t,n)=>{var i=n(95372);e.exports=function(e,t){return i(e,t)}},65162:(e,t,n)=>{var i=n(95372);e.exports=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?i(e,t,void 0,n):!!r}},39277:(e,t,n)=>{var i=n(20194),r=n(23619);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},62008:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},55948:(e,t,n)=>{var i=n(2471),r=n(2723),o=n(41771),s=o&&o.isMap,a=s?r(s):i;e.exports=a},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}},78255:(e,t,n)=>{var i=n(42388),r=n(2723),o=n(41771),s=o&&o.isSet,a=s?r(s):i;e.exports=a},81878:(e,t,n)=>{var i=n(20194),r=n(81653);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},70094:(e,t,n)=>{var i=n(88595),r=n(2723),o=n(41771),s=o&&o.isTypedArray,a=s?r(s):i;e.exports=a},23150:(e,t,n)=>{var i=n(92554),r=n(76324),o=n(51528);e.exports=function(e){return o(e)?i(e):r(e)}},61530:(e,t,n)=>{var i=n(92554),r=n(21506),o=n(51528);e.exports=function(e){return o(e)?i(e,!0):r(e)}},53059:function(e,t,n){var i;e=n.nmd(e),function(){var r,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",w="[object Array]",g="[object Boolean]",y="[object Date]",v="[object Error]",b="[object Function]",S="[object GeneratorFunction]",C="[object Map]",_="[object Number]",A="[object Object]",W="[object Promise]",E="[object RegExp]",T="[object Set]",L="[object String]",I="[object Symbol]",O="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",R="[object Float32Array]",P="[object Float64Array]",M="[object Int8Array]",F="[object Int16Array]",D="[object Int32Array]",x="[object Uint8Array]",j="[object Uint8ClampedArray]",B="[object Uint16Array]",$="[object Uint32Array]",H=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,G=RegExp(V.source),Y=RegExp(z.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,we=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\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",We="["+Ae+"]",Ee="["+Se+"]",Te="\\d+",Le="["+Ce+"]",Ie="[^\\ud800-\\udfff"+Ae+Te+"\\u2700-\\u27bf"+Ce+_e+"]",Oe="\\ud83c[\\udffb-\\udfff]",ke="[^\\ud800-\\udfff]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+_e+"]",Me="(?:"+Le+"|"+Ie+")",Fe="(?:"+Pe+"|"+Ie+")",De="(?:['’](?:d|ll|m|re|s|t|ve))?",xe="(?:['’](?:D|LL|M|RE|S|T|VE))?",je="(?:"+Ee+"|"+Oe+")?",Be="[\\ufe0e\\ufe0f]?",$e=Be+je+"(?:\\u200d(?:"+[ke,Ne,Re].join("|")+")"+Be+je+")*",He="(?:"+["[\\u2700-\\u27bf]",Ne,Re].join("|")+")"+$e,Ue="(?:"+[ke+Ee+"?",Ee,Ne,Re,"[\\ud800-\\udfff]"].join("|")+")",qe=RegExp("['’]","g"),Ve=RegExp(Ee,"g"),ze=RegExp(Oe+"(?="+Oe+")|"+Ue+$e,"g"),Ge=RegExp([Pe+"?"+Le+"+"+De+"(?="+[We,Pe,"$"].join("|")+")",Fe+"+"+xe+"(?="+[We,Pe+Me,"$"].join("|")+")",Pe+"?"+Me+"+"+De,Pe+"+"+xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,He].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=["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"],Qe=-1,Xe={};Xe[R]=Xe[P]=Xe[M]=Xe[F]=Xe[D]=Xe[x]=Xe[j]=Xe[B]=Xe[$]=!0,Xe[m]=Xe[w]=Xe[k]=Xe[g]=Xe[N]=Xe[y]=Xe[v]=Xe[b]=Xe[C]=Xe[_]=Xe[A]=Xe[E]=Xe[T]=Xe[L]=Xe[O]=!1;var Ze={};Ze[m]=Ze[w]=Ze[k]=Ze[N]=Ze[g]=Ze[y]=Ze[R]=Ze[P]=Ze[M]=Ze[F]=Ze[D]=Ze[C]=Ze[_]=Ze[A]=Ze[E]=Ze[T]=Ze[L]=Ze[I]=Ze[x]=Ze[j]=Ze[B]=Ze[$]=!0,Ze[v]=Ze[b]=Ze[O]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,rt="object"==typeof self&&self&&self.Object===Object&&self,ot=it||rt||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,lt=ut&&it.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&&lt.binding&&lt.binding("util")}catch(e){}}(),dt=ct&&ct.isArrayBuffer,ft=ct&&ct.isDate,pt=ct&&ct.isMap,ht=ct&&ct.isRegExp,mt=ct&&ct.isSet,wt=ct&&ct.isTypedArray;function gt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var s=e[r];t(i,s,n(s),e)}return i}function vt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var s=e[n];t(s,n,e)&&(o[r++]=s)}return o}function _t(e,t){return!(null==e||!e.length)&&Rt(e,t,0)>-1}function At(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function Wt(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Et(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function Tt(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function Lt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function It(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Ot=Dt("length");function kt(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Nt(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function Rt(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Nt(e,Mt,n)}function Pt(e,t,n,i){for(var r=n-1,o=e.length;++r<o;)if(i(e[r],t))return r;return-1}function Mt(e){return e!=e}function Ft(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:f}function Dt(e){return function(t){return null==t?r:t[e]}}function xt(e){return function(t){return null==e?r:e[t]}}function jt(e,t,n,i,r){return r(e,(function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)})),n}function Bt(e,t){for(var n,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==r&&(n=n===r?s:n+s)}return n}function $t(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Ht(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Ut(e){return function(t){return e(t)}}function qt(e,t){return Wt(t,(function(t){return e[t]}))}function Vt(e,t){return e.has(t)}function zt(e,t){for(var n=-1,i=e.length;++n<i&&Rt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Rt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Kt=xt({À:"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"}),Jt=xt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Qt(e){return"\\"+et[e]}function Xt(e){return Ye.test(e)}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[r++]=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 Xt(e)?function(e){for(var t=ze.lastIndex=0;ze.test(e);)++t;return t}(e):Ot(e)}function sn(e){return Xt(e)?function(e){return e.match(ze)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var un=xt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function e(t){var n,i=(t=null==t?ot:ln.defaults(ot.Object(),t,ln.pick(ot,Je))).Array,re=t.Date,Se=t.Error,Ce=t.Function,_e=t.Math,Ae=t.Object,We=t.RegExp,Ee=t.String,Te=t.TypeError,Le=i.prototype,Ie=Ce.prototype,Oe=Ae.prototype,ke=t["__core-js_shared__"],Ne=Ie.toString,Re=Oe.hasOwnProperty,Pe=0,Me=(n=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Fe=Oe.toString,De=Ne.call(Ae),xe=ot._,je=We("^"+Ne.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:r,$e=t.Symbol,He=t.Uint8Array,Ue=Be?Be.allocUnsafe:r,ze=en(Ae.getPrototypeOf,Ae),Ye=Ae.create,et=Oe.propertyIsEnumerable,it=Le.splice,rt=$e?$e.isConcatSpreadable:r,st=$e?$e.iterator:r,at=$e?$e.toStringTag:r,lt=function(){try{var e=lo(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Ot=re&&re.now!==ot.Date.now&&re.now,xt=t.setTimeout!==ot.setTimeout&&t.setTimeout,cn=_e.ceil,dn=_e.floor,fn=Ae.getOwnPropertySymbols,pn=Be?Be.isBuffer:r,hn=t.isFinite,mn=Le.join,wn=en(Ae.keys,Ae),gn=_e.max,yn=_e.min,vn=re.now,bn=t.parseInt,Sn=_e.random,Cn=Le.reverse,_n=lo(t,"DataView"),An=lo(t,"Map"),Wn=lo(t,"Promise"),En=lo(t,"Set"),Tn=lo(t,"WeakMap"),Ln=lo(Ae,"create"),In=Tn&&new Tn,On={},kn=jo(_n),Nn=jo(An),Rn=jo(Wn),Pn=jo(En),Mn=jo(Tn),Fn=$e?$e.prototype:r,Dn=Fn?Fn.valueOf:r,xn=Fn?Fn.toString:r;function jn(e){if(na(e)&&!Vs(e)&&!(e instanceof Un)){if(e instanceof Hn)return e;if(Re.call(e,"__wrapped__"))return Bo(e)}return new Hn(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function $n(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Kn(e,t){var n=Vs(e),i=!n&&qs(e),r=!n&&!i&&Ks(e),o=!n&&!i&&!r&&ca(e),s=n||i||r||o,a=s?$t(e.length,Ee):[],u=a.length;for(var l in e)!t&&!Re.call(e,l)||s&&("length"==l||r&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||go(l,u))||a.push(l);return a}function Jn(e){var t=e.length;return t?e[zi(0,t-1)]:r}function Qn(e,t){return Po(Tr(e),si(t,0,e.length))}function Xn(e){return Po(Tr(e))}function Zn(e,t,n){(n!==r&&!$s(e[t],n)||n===r&&!(t in e))&&ri(e,t,n)}function ei(e,t,n){var i=e[t];Re.call(e,t)&&$s(i,n)&&(n!==r||t in e)||ri(e,t,n)}function ti(e,t){for(var n=e.length;n--;)if($s(e[n][0],t))return n;return-1}function ni(e,t,n,i){return di(e,(function(e,r,o){t(i,e,n(e),o)})),i}function ii(e,t){return e&&Lr(t,Na(t),e)}function ri(e,t,n){"__proto__"==t&&lt?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function oi(e,t){for(var n=-1,o=t.length,s=i(o),a=null==e;++n<o;)s[n]=a?r:Ta(e,t[n]);return s}function si(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ai(e,t,n,i,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!ta(e))return e;var d=Vs(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Tr(e,a)}else{var f=po(e),p=f==b||f==S;if(Ks(e))return Sr(e,u);if(f==A||f==m||p&&!o){if(a=l||p?{}:mo(e),!u)return l?function(e,t){return Lr(e,fo(e),t)}(e,function(e,t){return e&&Lr(t,Ra(t),e)}(a,e)):function(e,t){return Lr(e,co(e),t)}(e,ii(a,e))}else{if(!Ze[f])return o?e:{};a=function(e,t,n){var i,r=e.constructor;switch(t){case k:return Cr(e);case g:case y:return new r(+e);case N:return function(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case R:case P:case M:case F:case D:case x:case j:case B:case $:return _r(e,n);case C:return new r;case _:case L:return new r(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new r;case I:return i=e,Dn?Ae(Dn.call(i)):{}}}(e,f,u)}}s||(s=new Yn);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(i){a.add(ai(i,t,n,i,e,s))})):ia(e)&&e.forEach((function(i,r){a.set(r,ai(i,t,n,r,e,s))}));var w=d?r:(c?l?no:to:l?Ra:Na)(e);return vt(w||e,(function(i,r){w&&(i=e[r=i]),ei(a,r,ai(i,t,n,r,e,s))})),a}function ui(e,t,n){var i=n.length;if(null==e)return!i;for(e=Ae(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function li(e,t,n){if("function"!=typeof e)throw new Te(o);return Oo((function(){e.apply(r,n)}),t)}function ci(e,t,n,i){var r=-1,o=_t,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Wt(t,Ut(n))),i?(o=At,s=!1):t.length>=200&&(o=Vt,s=!1,t=new Gn(t));e:for(;++r<a;){var c=e[r],d=null==n?c:n(c);if(c=i||0!==c?c:0,s&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else o(t,d,i)||u.push(c)}return u}jn.templateSettings={escape:K,evaluate:J,interpolate:Q,variable:"",imports:{_:jn}},jn.prototype=$n.prototype,jn.prototype.constructor=jn,Hn.prototype=Bn($n.prototype),Hn.prototype.constructor=Hn,Un.prototype=Bn($n.prototype),Un.prototype.constructor=Un,qn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},qn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qn.prototype.get=function(e){var t=this.__data__;if(Ln){var n=t[e];return n===s?r:n}return Re.call(t,e)?t[e]:r},qn.prototype.has=function(e){var t=this.__data__;return Ln?t[e]!==r:Re.call(t,e)},qn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===r?s:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=ti(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},Vn.prototype.get=function(e){var t=this.__data__,n=ti(t,e);return n<0?r:t[n][1]},Vn.prototype.has=function(e){return ti(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,i=ti(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(An||Vn),string:new qn}},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),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var i=n.__data__;if(!An||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(i)}return n.set(e,t),this.size=n.size,this};var di=kr(vi),fi=kr(bi,!0);function pi(e,t){var n=!0;return di(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function hi(e,t,n){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(u===r?a==a&&!la(a):n(a,u)))var u=a,l=s}return l}function mi(e,t){var n=[];return di(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function wi(e,t,n,i,r){var o=-1,s=e.length;for(n||(n=wo),r||(r=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?wi(a,t-1,n,i,r):Et(r,a):i||(r[r.length]=a)}return r}var gi=Nr(),yi=Nr(!0);function vi(e,t){return e&&gi(e,t,Na)}function bi(e,t){return e&&yi(e,t,Na)}function Si(e,t){return Ct(t,(function(t){return Xs(e[t])}))}function Ci(e,t){for(var n=0,i=(t=gr(t,e)).length;null!=e&&n<i;)e=e[xo(t[n++])];return n&&n==i?e:r}function _i(e,t,n){var i=t(e);return Vs(e)?i:Et(i,n(e))}function Ai(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in Ae(e)?function(e){var t=Re.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var o=Fe.call(e);return i&&(t?e[at]=n:delete e[at]),o}(e):function(e){return Fe.call(e)}(e)}function Wi(e,t){return e>t}function Ei(e,t){return null!=e&&Re.call(e,t)}function Ti(e,t){return null!=e&&t in Ae(e)}function Li(e,t,n){for(var o=n?At:_t,s=e[0].length,a=e.length,u=a,l=i(a),c=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Wt(f,Ut(t))),c=yn(f.length,c),l[u]=!n&&(t||s>=120&&f.length>=120)?new Gn(u&&f):r}f=e[0];var p=-1,h=l[0];e:for(;++p<s&&d.length<c;){var m=f[p],w=t?t(m):m;if(m=n||0!==m?m:0,!(h?Vt(h,w):o(d,w,n))){for(u=a;--u;){var g=l[u];if(!(g?Vt(g,w):o(e[u],w,n)))continue e}h&&h.push(w),d.push(m)}}return d}function Ii(e,t,n){var i=null==(e=Eo(e,t=gr(t,e)))?e:e[xo(Qo(t))];return null==i?r:gt(i,e,n)}function Oi(e){return na(e)&&Ai(e)==m}function ki(e,t,n,i,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,o,s){var a=Vs(e),u=Vs(t),l=a?w:po(e),c=u?w:po(t),d=(l=l==m?A:l)==A,f=(c=c==m?A:c)==A,p=l==c;if(p&&Ks(e)){if(!Ks(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Yn),a||ca(e)?Zr(e,t,n,i,o,s):function(e,t,n,i,r,o,s){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case g:case y:case _:return $s(+e,+t);case v:return e.name==t.name&&e.message==t.message;case E:case L:return e==t+"";case C:var a=Zt;case T:var u=1&i;if(a||(a=nn),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;i|=2,s.set(e,t);var c=Zr(a(e),a(t),i,r,o,s);return s.delete(e),c;case I:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,l,n,i,o,s);if(!(1&n)){var h=d&&Re.call(e,"__wrapped__"),b=f&&Re.call(t,"__wrapped__");if(h||b){var S=h?e.value():e,W=b?t.value():t;return s||(s=new Yn),o(S,W,n,i,s)}}return!!p&&(s||(s=new Yn),function(e,t,n,i,o,s){var a=1&n,u=to(e),l=u.length;if(l!=to(t).length&&!a)return!1;for(var c=l;c--;){var d=u[c];if(!(a?d in t:Re.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var h=!0;s.set(e,t),s.set(t,e);for(var m=a;++c<l;){var w=e[d=u[c]],g=t[d];if(i)var y=a?i(g,w,d,t,e,s):i(w,g,d,e,t,s);if(!(y===r?w===g||o(w,g,n,i,s):y)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,i,o,s))}(e,t,n,i,ki,o))}function Ni(e,t,n,i){var o=n.length,s=o,a=!i;if(null==e)return!s;for(e=Ae(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var l=(u=n[o])[0],c=e[l],d=u[1];if(a&&u[2]){if(c===r&&!(l in e))return!1}else{var f=new Yn;if(i)var p=i(c,d,l,e,t,f);if(!(p===r?ki(d,c,3,i,f):p))return!1}}return!0}function Ri(e){return!(!ta(e)||(t=e,Me&&Me in t))&&(Xs(e)?je:me).test(jo(e));var t}function Pi(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Vs(e)?ji(e[0],e[1]):xi(e):pu(e)}function Mi(e){if(!Co(e))return wn(e);var t=[];for(var n in Ae(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fi(e,t){return e<t}function Di(e,t){var n=-1,r=Gs(e)?i(e.length):[];return di(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function xi(e){var t=uo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Ni(n,e,t)}}function ji(e,t){return vo(e)&&_o(t)?Ao(xo(e),t):function(n){var i=Ta(n,e);return i===r&&i===t?La(n,e):ki(t,i,3)}}function Bi(e,t,n,i,o){e!==t&&gi(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,i,o,s,a){var u=Lo(e,n),l=Lo(t,n),c=a.get(l);if(c)Zn(e,n,c);else{var d=s?s(u,l,n+"",e,t,a):r,f=d===r;if(f){var p=Vs(l),h=!p&&Ks(l),m=!p&&!h&&ca(l);d=l,p||h||m?Vs(u)?d=u:Ys(u)?d=Tr(u):h?(f=!1,d=Sr(l,!0)):m?(f=!1,d=_r(l,!0)):d=[]:oa(l)||qs(l)?(d=u,qs(u)?d=ya(u):ta(u)&&!Xs(u)||(d=mo(l))):f=!1}f&&(a.set(l,d),o(d,l,i,s,a),a.delete(l)),Zn(e,n,d)}}(e,t,a,n,Bi,i,o);else{var u=i?i(Lo(e,a),s,a+"",e,t,o):r;u===r&&(u=s),Zn(e,a,u)}}),Ra)}function $i(e,t){var n=e.length;if(n)return go(t+=t<0?n:0,n)?e[t]:r}function Hi(e,t,n){t=t.length?Wt(t,(function(e){return Vs(e)?function(t){return Ci(t,1===e.length?e[0]:e)}:e})):[ru];var i=-1;return t=Wt(t,Ut(so())),function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,o=t.criteria,s=r.length,a=n.length;++i<s;){var u=Ar(r[i],o[i]);if(u)return i>=a?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(Di(e,(function(e,n,r){return{criteria:Wt(t,(function(t){return t(e)})),index:++i,value:e}})))}function Ui(e,t,n){for(var i=-1,r=t.length,o={};++i<r;){var s=t[i],a=Ci(e,s);n(a,s)&&Qi(o,gr(s,e),a)}return o}function qi(e,t,n,i){var r=i?Pt:Rt,o=-1,s=t.length,a=e;for(e===t&&(t=Tr(t)),n&&(a=Wt(e,Ut(n)));++o<s;)for(var u=0,l=t[o],c=n?n(l):l;(u=r(a,c,u,i))>-1;)a!==e&&it.call(a,u,1),it.call(e,u,1);return e}function Vi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;go(r)?it.call(e,r,1):lr(e,r)}}return e}function zi(e,t){return e+dn(Sn()*(t-e+1))}function Gi(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=dn(t/2))&&(e+=e)}while(t);return n}function Yi(e,t){return ko(Wo(e,t,ru),e+"")}function Ki(e){return Jn($a(e))}function Ji(e,t){var n=$a(e);return Po(n,si(t,0,n.length))}function Qi(e,t,n,i){if(!ta(e))return e;for(var o=-1,s=(t=gr(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var l=xo(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var d=u[l];(c=i?i(d,l,u):r)===r&&(c=ta(d)?d:go(t[o+1])?[]:{})}ei(u,l,c),u=u[l]}return e}var Xi=In?function(e,t){return In.set(e,t),e}:ru,Zi=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ru;function er(e){return Po($a(e))}function tr(e,t,n){var r=-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=i(o);++r<o;)s[r]=e[r+t];return s}function nr(e,t){var n;return di(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function ir(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=e[o];null!==s&&!la(s)&&(n?s<=t:s<t)?i=o+1:r=o}return r}return rr(e,t,ru,n)}function rr(e,t,n,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,u=null===t,l=la(t),c=t===r;o<s;){var d=dn((o+s)/2),f=n(e[d]),p=f!==r,h=null===f,m=f==f,w=la(f);if(a)var g=i||m;else g=c?m&&(i||p):u?m&&p&&(i||!h):l?m&&p&&!h&&(i||!w):!h&&!w&&(i?f<=t:f<t);g?o=d+1:s=d}return yn(s,4294967294)}function or(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var s=e[n],a=t?t(s):s;if(!n||!$s(a,u)){var u=a;o[r++]=0===s?0:s}}return o}function sr(e){return"number"==typeof e?e:la(e)?f:+e}function ar(e){if("string"==typeof e)return e;if(Vs(e))return Wt(e,ar)+"";if(la(e))return xn?xn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ur(e,t,n){var i=-1,r=_t,o=e.length,s=!0,a=[],u=a;if(n)s=!1,r=At;else if(o>=200){var l=t?null:Gr(e);if(l)return nn(l);s=!1,r=Vt,u=new Gn}else u=t?[]:a;e:for(;++i<o;){var c=e[i],d=t?t(c):c;if(c=n||0!==c?c:0,s&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(c)}else r(u,d,n)||(u!==a&&u.push(d),a.push(c))}return a}function lr(e,t){return null==(e=Eo(e,t=gr(t,e)))||delete e[xo(Qo(t))]}function cr(e,t,n,i){return Qi(e,t,n(Ci(e,t)),i)}function dr(e,t,n,i){for(var r=e.length,o=i?r:-1;(i?o--:++o<r)&&t(e[o],o,e););return n?tr(e,i?0:o,i?o+1:r):tr(e,i?o+1:0,i?r:o)}function fr(e,t){var n=e;return n instanceof Un&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Et([e],t.args))}),n)}function pr(e,t,n){var r=e.length;if(r<2)return r?ur(e[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=e[o],u=-1;++u<r;)u!=o&&(s[o]=ci(s[o]||a,e[u],t,n));return ur(wi(s,1),t,n)}function hr(e,t,n){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var u=i<s?t[i]:r;n(a,e[i],u)}return a}function mr(e){return Ys(e)?e:[]}function wr(e){return"function"==typeof e?e:ru}function gr(e,t){return Vs(e)?e:vo(e,t)?[e]:Do(va(e))}var yr=Yi;function vr(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:tr(e,t,n)}var br=ct||function(e){return ot.clearTimeout(e)};function Sr(e,t){if(t)return e.slice();var n=e.length,i=Ue?Ue(n):new e.constructor(n);return e.copy(i),i}function Cr(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function _r(e,t){var n=t?Cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ar(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=la(e),a=t!==r,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||i&&a&&l||!n&&l||!o)return 1;if(!i&&!s&&!c&&e<t||c&&n&&o&&!i&&!s||u&&n&&o||!a&&o||!l)return-1}return 0}function Wr(e,t,n,r){for(var o=-1,s=e.length,a=n.length,u=-1,l=t.length,c=gn(s-a,0),d=i(l+c),f=!r;++u<l;)d[u]=t[u];for(;++o<a;)(f||o<s)&&(d[n[o]]=e[o]);for(;c--;)d[u++]=e[o++];return d}function Er(e,t,n,r){for(var o=-1,s=e.length,a=-1,u=n.length,l=-1,c=t.length,d=gn(s-u,0),f=i(d+c),p=!r;++o<d;)f[o]=e[o];for(var h=o;++l<c;)f[h+l]=t[l];for(;++a<u;)(p||o<s)&&(f[h+n[a]]=e[o++]);return f}function Tr(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function Lr(e,t,n,i){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=i?i(n[u],e[u],u,n,e):r;l===r&&(l=e[u]),o?ri(n,u,l):ei(n,u,l)}return n}function Ir(e,t){return function(n,i){var r=Vs(n)?yt:ni,o=t?t():{};return r(n,e,so(i,2),o)}}function Or(e){return Yi((function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&yo(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=Ae(t);++i<o;){var u=n[i];u&&e(t,u,i,s)}return t}))}function kr(e,t){return function(n,i){if(null==n)return n;if(!Gs(n))return e(n,i);for(var r=n.length,o=t?r:-1,s=Ae(n);(t?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function Nr(e){return function(t,n,i){for(var r=-1,o=Ae(t),s=i(t),a=s.length;a--;){var u=s[e?a:++r];if(!1===n(o[u],u,o))break}return t}}function Rr(e){return function(t){var n=Xt(t=va(t))?sn(t):r,i=n?n[0]:t.charAt(0),o=n?vr(n,1).join(""):t.slice(1);return i[e]()+o}}function Pr(e){return function(t){return Tt(Xa(qa(t).replace(qe,"")),e,"")}}function Mr(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),i=e.apply(n,t);return ta(i)?i:n}}function Fr(e){return function(t,n,i){var o=Ae(t);if(!Gs(t)){var s=so(n,3);t=Na(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[s?t[a]:a]:r}}function Dr(e){return eo((function(t){var n=t.length,i=n,s=Hn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Te(o);if(s&&!u&&"wrapper"==ro(a))var u=new Hn([],!0)}for(i=u?i:n;++i<n;){var l=ro(a=t[i]),c="wrapper"==l?io(a):r;u=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ro(c[0])].apply(u,c[3]):1==a.length&&bo(a)?u[l]():u.thru(a)}return function(){var e=arguments,i=e[0];if(u&&1==e.length&&Vs(i))return u.plant(i).value();for(var r=0,o=n?t[r].apply(this,e):i;++r<n;)o=t[r].call(this,o);return o}}))}function xr(e,t,n,o,s,a,u,c,d,f){var p=t&l,h=1&t,m=2&t,w=24&t,g=512&t,y=m?r:Mr(e);return function r(){for(var l=arguments.length,v=i(l),b=l;b--;)v[b]=arguments[b];if(w)var S=oo(r),C=Yt(v,S);if(o&&(v=Wr(v,o,s,w)),a&&(v=Er(v,a,u,w)),l-=C,w&&l<f){var _=tn(v,S);return Vr(e,t,xr,r.placeholder,n,v,_,c,d,f-l)}var A=h?n:this,W=m?A[e]:e;return l=v.length,c?v=To(v,c):g&&l>1&&v.reverse(),p&&d<l&&(v.length=d),this&&this!==ot&&this instanceof r&&(W=y||Mr(W)),W.apply(A,v)}}function jr(e,t){return function(n,i){return function(e,t,n,i){return vi(e,(function(e,r,o){t(i,n(e),r,o)})),i}(n,e,t(i),{})}}function Br(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=ar(n),i=ar(i)):(n=sr(n),i=sr(i)),o=e(n,i)}return o}}function $r(e){return eo((function(t){return t=Wt(t,Ut(so())),Yi((function(n){var i=this;return e(t,(function(e){return gt(e,i,n)}))}))}))}function Hr(e,t){var n=(t=t===r?" ":ar(t)).length;if(n<2)return n?Gi(t,e):t;var i=Gi(t,cn(e/on(t)));return Xt(t)?vr(sn(i),0,e).join(""):i.slice(0,e)}function Ur(e){return function(t,n,o){return o&&"number"!=typeof o&&yo(t,n,o)&&(n=o=r),t=ha(t),n===r?(n=t,t=0):n=ha(n),function(e,t,n,r){for(var o=-1,s=gn(cn((t-e)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=e,e+=n;return a}(t,n,o=o===r?t<n?1:-1:ha(o),e)}}function qr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ga(t),n=ga(n)),e(t,n)}}function Vr(e,t,n,i,o,s,a,l,c,d){var f=8&t;t|=f?u:64,4&(t&=~(f?64:u))||(t&=-4);var p=[e,t,o,f?s:r,f?a:r,f?r:s,f?r:a,l,c,d],h=n.apply(r,p);return bo(e)&&Io(h,p),h.placeholder=i,No(h,e,t)}function zr(e){var t=_e[e];return function(e,n){if(e=ga(e),(n=null==n?0:yn(ma(n),292))&&hn(e)){var i=(va(e)+"e").split("e");return+((i=(va(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Gr=En&&1/nn(new En([,-0]))[1]==c?function(e){return new En(e)}:lu;function Yr(e){return function(t){var n=po(t);return n==C?Zt(t):n==T?rn(t):function(e,t){return Wt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Kr(e,t,n,s,c,d,f,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(o);var m=s?s.length:0;if(m||(t&=-97,s=c=r),f=f===r?f:gn(ma(f),0),p=p===r?p:ma(p),m-=c?c.length:0,64&t){var w=s,g=c;s=c=r}var y=h?r:io(e),v=[e,t,n,s,c,w,g,d,f,p];if(y&&function(e,t){var n=e[1],i=t[1],r=n|i,o=r<131,s=i==l&&8==n||i==l&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Wr(c,u,t[4]):u,e[4]=c?tn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Er(c,u,t[6]):u,e[6]=c?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),i&l&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(v,y),e=v[0],t=v[1],n=v[2],s=v[3],c=v[4],!(p=v[9]=v[9]===r?h?0:e.length:gn(v[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Mr(e);return function s(){for(var a=arguments.length,u=i(a),l=a,c=oo(s);l--;)u[l]=arguments[l];var d=a<3&&u[0]!==c&&u[a-1]!==c?[]:tn(u,c);return(a-=d.length)<n?Vr(e,t,xr,s.placeholder,r,u,d,r,r,n-a):gt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,p):t!=u&&33!=t||c.length?xr.apply(r,v):function(e,t,n,r){var o=1&t,s=Mr(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=r.length,d=i(c+u),f=this&&this!==ot&&this instanceof t?s:e;++l<c;)d[l]=r[l];for(;u--;)d[l++]=arguments[++a];return gt(f,o?n:this,d)}}(e,t,n,s);else var b=function(e,t,n){var i=1&t,r=Mr(e);return function t(){return(this&&this!==ot&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return No((y?Xi:Io)(b,v),e,t)}function Jr(e,t,n,i){return e===r||$s(e,Oe[n])&&!Re.call(i,n)?t:e}function Qr(e,t,n,i,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Bi(e,t,r,Qr,s),s.delete(t)),e}function Xr(e){return oa(e)?r:e}function Zr(e,t,n,i,o,s){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,h=2&n?new Gn:r;for(s.set(e,t),s.set(t,e);++f<u;){var m=e[f],w=t[f];if(i)var g=a?i(w,m,f,t,e,s):i(m,w,f,e,t,s);if(g!==r){if(g)continue;p=!1;break}if(h){if(!It(t,(function(e,t){if(!Vt(h,t)&&(m===e||o(m,e,n,i,s)))return h.push(t)}))){p=!1;break}}else if(m!==w&&!o(m,w,n,i,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function eo(e){return ko(Wo(e,r,zo),e+"")}function to(e){return _i(e,Na,co)}function no(e){return _i(e,Ra,fo)}var io=In?function(e){return In.get(e)}:lu;function ro(e){for(var t=e.name+"",n=On[t],i=Re.call(On,t)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==e)return r.name}return t}function oo(e){return(Re.call(jn,"placeholder")?jn:e).placeholder}function so(){var e=jn.iteratee||ou;return e=e===ou?Pi:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function uo(e){for(var t=Na(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,_o(r)]}return t}function lo(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Ri(n)?n:r}var co=fn?function(e){return null==e?[]:(e=Ae(e),Ct(fn(e),(function(t){return et.call(e,t)})))}:wu,fo=fn?function(e){for(var t=[];e;)Et(t,co(e)),e=ze(e);return t}:wu,po=Ai;function ho(e,t,n){for(var i=-1,r=(t=gr(t,e)).length,o=!1;++i<r;){var s=xo(t[i]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&ea(r)&&go(s,r)&&(Vs(e)||qs(e))}function mo(e){return"function"!=typeof e.constructor||Co(e)?{}:Bn(ze(e))}function wo(e){return Vs(e)||qs(e)||!!(rt&&e&&e[rt])}function go(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?Gs(n)&&go(t,n.length):"string"==i&&t in n)&&$s(n[t],e)}function vo(e,t){if(Vs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||Z.test(e)||!X.test(e)||null!=t&&e in Ae(t)}function bo(e){var t=ro(e),n=jn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var i=io(n);return!!i&&e===i[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=N||An&&po(new An)!=C||Wn&&po(Wn.resolve())!=W||En&&po(new En)!=T||Tn&&po(new Tn)!=O)&&(po=function(e){var t=Ai(e),n=t==A?e.constructor:r,i=n?jo(n):"";if(i)switch(i){case kn:return N;case Nn:return C;case Rn:return W;case Pn:return T;case Mn:return O}return t});var So=ke?Xs:gu;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function _o(e){return e==e&&!ta(e)}function Ao(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in Ae(n))}}function Wo(e,t,n){return t=gn(t===r?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=gn(r.length-t,0),a=i(s);++o<s;)a[o]=r[t+o];o=-1;for(var u=i(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),gt(e,this,u)}}function Eo(e,t){return t.length<2?e:Ci(e,tr(t,0,-1))}function To(e,t){for(var n=e.length,i=yn(t.length,n),o=Tr(e);i--;){var s=t[i];e[i]=go(s,n)?o[s]:r}return e}function Lo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Io=Ro(Xi),Oo=xt||function(e,t){return ot.setTimeout(e,t)},ko=Ro(Zi);function No(e,t,n){var i=t+"";return ko(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return vt(h,(function(n){var i="_."+n[0];t&n[1]&&!_t(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(i),n)))}function Ro(e){var t=0,n=0;return function(){var i=vn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Po(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var s=zi(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Mo,Fo,Do=(Mo=Ms((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Fo.size&&Fo.clear(),e})),Fo=Mo.cache,Mo);function xo(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function jo(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Un)return e.clone();var t=new Hn(e.__wrapped__,e.__chain__);return t.__actions__=Tr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=Yi((function(e,t){return Ys(e)?ci(e,wi(t,1,Ys,!0)):[]})),Ho=Yi((function(e,t){var n=Qo(t);return Ys(n)&&(n=r),Ys(e)?ci(e,wi(t,1,Ys,!0),so(n,2)):[]})),Uo=Yi((function(e,t){var n=Qo(t);return Ys(n)&&(n=r),Ys(e)?ci(e,wi(t,1,Ys,!0),r,n):[]}));function qo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=gn(i+r,0)),Nt(e,so(t,3),r)}function Vo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=ma(n),o=n<0?gn(i+o,0):yn(o,i-1)),Nt(e,so(t,3),o,!0)}function zo(e){return null!=e&&e.length?wi(e,1):[]}function Go(e){return e&&e.length?e[0]:r}var Yo=Yi((function(e){var t=Wt(e,mr);return t.length&&t[0]===e[0]?Li(t):[]})),Ko=Yi((function(e){var t=Qo(e),n=Wt(e,mr);return t===Qo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Li(n,so(t,2)):[]})),Jo=Yi((function(e){var t=Qo(e),n=Wt(e,mr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Li(n,r,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Xo=Yi(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?qi(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,i=oi(e,t);return Vi(e,Wt(t,(function(e){return go(e,n)?+e:e})).sort(Ar)),i}));function ts(e){return null==e?e:Cn.call(e)}var ns=Yi((function(e){return ur(wi(e,1,Ys,!0))})),is=Yi((function(e){var t=Qo(e);return Ys(t)&&(t=r),ur(wi(e,1,Ys,!0),so(t,2))})),rs=Yi((function(e){var t=Qo(e);return t="function"==typeof t?t:r,ur(wi(e,1,Ys,!0),r,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Ys(e))return t=gn(e.length,t),!0})),$t(t,(function(t){return Wt(e,Dt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:Wt(n,(function(e){return gt(t,r,e)}))}var as=Yi((function(e,t){return Ys(e)?ci(e,t):[]})),us=Yi((function(e){return pr(Ct(e,Ys))})),ls=Yi((function(e){var t=Qo(e);return Ys(t)&&(t=r),pr(Ct(e,Ys),so(t,2))})),cs=Yi((function(e){var t=Qo(e);return t="function"==typeof t?t:r,pr(Ct(e,Ys),r,t)})),ds=Yi(os),fs=Yi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ss(e,n)}));function ps(e){var t=jn(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ms=eo((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return oi(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Un&&go(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:r}),new Hn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ws=Ir((function(e,t,n){Re.call(e,n)?++e[n]:ri(e,n,1)})),gs=Fr(qo),ys=Fr(Vo);function vs(e,t){return(Vs(e)?vt:di)(e,so(t,3))}function bs(e,t){return(Vs(e)?bt:fi)(e,so(t,3))}var Ss=Ir((function(e,t,n){Re.call(e,n)?e[n].push(t):ri(e,n,[t])})),Cs=Yi((function(e,t,n){var r=-1,o="function"==typeof t,s=Gs(e)?i(e.length):[];return di(e,(function(e){s[++r]=o?gt(t,e,n):Ii(e,t,n)})),s})),_s=Ir((function(e,t,n){ri(e,n,t)}));function As(e,t){return(Vs(e)?Wt:Di)(e,so(t,3))}var Ws=Ir((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Es=Yi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Hi(e,wi(t,1),[])})),Ts=Ot||function(){return ot.Date.now()};function Ls(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Kr(e,l,r,r,r,r,t)}function Is(e,t){var n;if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Os=Yi((function(e,t,n){var i=1;if(n.length){var r=tn(n,oo(Os));i|=u}return Kr(e,i,t,n,r)})),ks=Yi((function(e,t,n){var i=3;if(n.length){var r=tn(n,oo(ks));i|=u}return Kr(t,i,e,n,r)}));function Ns(e,t,n){var i,s,a,u,l,c,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(o);function m(t){var n=i,o=s;return i=s=r,d=t,u=e.apply(o,n)}function w(e){return d=e,l=Oo(y,t),f?m(e):u}function g(e){var n=e-c;return c===r||n>=t||n<0||p&&e-d>=a}function y(){var e=Ts();if(g(e))return v(e);l=Oo(y,function(e){var n=t-(e-c);return p?yn(n,a-(e-d)):n}(e))}function v(e){return l=r,h&&i?m(e):(i=s=r,u)}function b(){var e=Ts(),n=g(e);if(i=arguments,s=this,c=e,n){if(l===r)return w(c);if(p)return br(l),l=Oo(y,t),m(c)}return l===r&&(l=Oo(y,t)),u}return t=ga(t)||0,ta(n)&&(f=!!n.leading,a=(p="maxWait"in n)?gn(ga(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){l!==r&&br(l),d=0,i=c=s=l=r},b.flush=function(){return l===r?u:v(Ts())},b}var Rs=Yi((function(e,t){return li(e,1,t)})),Ps=Yi((function(e,t,n){return li(e,ga(t)||0,n)}));function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(o);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Ms.Cache||zn),n}function Fs(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)}}Ms.Cache=zn;var Ds=yr((function(e,t){var n=(t=1==t.length&&Vs(t[0])?Wt(t[0],Ut(so())):Wt(wi(t,1),Ut(so()))).length;return Yi((function(i){for(var r=-1,o=yn(i.length,n);++r<o;)i[r]=t[r].call(this,i[r]);return gt(e,this,i)}))})),xs=Yi((function(e,t){var n=tn(t,oo(xs));return Kr(e,u,r,t,n)})),js=Yi((function(e,t){var n=tn(t,oo(js));return Kr(e,64,r,t,n)})),Bs=eo((function(e,t){return Kr(e,256,r,r,r,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Hs=qr(Wi),Us=qr((function(e,t){return e>=t})),qs=Oi(function(){return arguments}())?Oi:function(e){return na(e)&&Re.call(e,"callee")&&!et.call(e,"callee")},Vs=i.isArray,zs=dt?Ut(dt):function(e){return na(e)&&Ai(e)==k};function Gs(e){return null!=e&&ea(e.length)&&!Xs(e)}function Ys(e){return na(e)&&Gs(e)}var Ks=pn||gu,Js=ft?Ut(ft):function(e){return na(e)&&Ai(e)==y};function Qs(e){if(!na(e))return!1;var t=Ai(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Xs(e){if(!ta(e))return!1;var t=Ai(e);return t==b||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=pt?Ut(pt):function(e){return na(e)&&po(e)==C};function ra(e){return"number"==typeof e||na(e)&&Ai(e)==_}function oa(e){if(!na(e)||Ai(e)!=A)return!1;var t=ze(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==De}var sa=ht?Ut(ht):function(e){return na(e)&&Ai(e)==E},aa=mt?Ut(mt):function(e){return na(e)&&po(e)==T};function ua(e){return"string"==typeof e||!Vs(e)&&na(e)&&Ai(e)==L}function la(e){return"symbol"==typeof e||na(e)&&Ai(e)==I}var ca=wt?Ut(wt):function(e){return na(e)&&ea(e.length)&&!!Xe[Ai(e)]},da=qr(Fi),fa=qr((function(e,t){return e<=t}));function pa(e){if(!e)return[];if(Gs(e))return ua(e)?sn(e):Tr(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=po(e);return(t==C?Zt:t==T?nn:$a)(e)}function ha(e){return e?(e=ga(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=ha(e),n=t%1;return t==t?n?t-n:t:0}function wa(e){return e?si(ma(e),0,p):0}function ga(e){if("number"==typeof e)return e;if(la(e))return f;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var n=he.test(e);return n||we.test(e)?nt(e.slice(2),n?2:8):pe.test(e)?f:+e}function ya(e){return Lr(e,Ra(e))}function va(e){return null==e?"":ar(e)}var ba=Or((function(e,t){if(Co(t)||Gs(t))Lr(t,Na(t),e);else for(var n in t)Re.call(t,n)&&ei(e,n,t[n])})),Sa=Or((function(e,t){Lr(t,Ra(t),e)})),Ca=Or((function(e,t,n,i){Lr(t,Ra(t),e,i)})),_a=Or((function(e,t,n,i){Lr(t,Na(t),e,i)})),Aa=eo(oi),Wa=Yi((function(e,t){e=Ae(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&yo(t[0],t[1],o)&&(i=1);++n<i;)for(var s=t[n],a=Ra(s),u=-1,l=a.length;++u<l;){var c=a[u],d=e[c];(d===r||$s(d,Oe[c])&&!Re.call(e,c))&&(e[c]=s[c])}return e})),Ea=Yi((function(e){return e.push(r,Qr),gt(Ma,r,e)}));function Ta(e,t,n){var i=null==e?r:Ci(e,t);return i===r?n:i}function La(e,t){return null!=e&&ho(e,t,Ti)}var Ia=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),tu(ru)),Oa=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]}),so),ka=Yi(Ii);function Na(e){return Gs(e)?Kn(e):Mi(e)}function Ra(e){return Gs(e)?Kn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var i in e)("constructor"!=i||!t&&Re.call(e,i))&&n.push(i);return n}(e)}var Pa=Or((function(e,t,n){Bi(e,t,n)})),Ma=Or((function(e,t,n,i){Bi(e,t,n,i)})),Fa=eo((function(e,t){var n={};if(null==e)return n;var i=!1;t=Wt(t,(function(t){return t=gr(t,e),i||(i=t.length>1),t})),Lr(e,no(e),n),i&&(n=ai(n,7,Xr));for(var r=t.length;r--;)lr(n,t[r]);return n})),Da=eo((function(e,t){return null==e?{}:function(e,t){return Ui(e,t,(function(t,n){return La(e,n)}))}(e,t)}));function xa(e,t){if(null==e)return{};var n=Wt(no(e),(function(e){return[e]}));return t=so(t),Ui(e,n,(function(e,n){return t(e,n[0])}))}var ja=Yr(Na),Ba=Yr(Ra);function $a(e){return null==e?[]:qt(e,Na(e))}var Ha=Pr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Qa(va(e).toLowerCase())}function qa(e){return(e=va(e))&&e.replace(ye,Kt).replace(Ve,"")}var Va=Pr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),za=Pr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Rr("toLowerCase"),Ya=Pr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Pr((function(e,t,n){return e+(n?" ":"")+Qa(t)})),Ja=Pr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Rr("toUpperCase");function Xa(e,t,n){return e=va(e),(t=n?r:t)===r?function(e){return Ke.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Za=Yi((function(e,t){try{return gt(e,r,t)}catch(e){return Qs(e)?e:new Se(e)}})),eu=eo((function(e,t){return vt(t,(function(t){t=xo(t),ri(e,t,Os(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Dr(),iu=Dr(!0);function ru(e){return e}function ou(e){return Pi("function"==typeof e?e:ai(e,1))}var su=Yi((function(e,t){return function(n){return Ii(n,e,t)}})),au=Yi((function(e,t){return function(n){return Ii(e,n,t)}}));function uu(e,t,n){var i=Na(t),r=Si(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Si(t,Na(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Xs(e);return vt(r,(function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),r=n.__actions__=Tr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Et([this.value()],arguments))})})),e}function lu(){}var cu=$r(Wt),du=$r(St),fu=$r(It);function pu(e){return vo(e)?Dt(xo(e)):function(e){return function(t){return Ci(t,e)}}(e)}var hu=Ur(),mu=Ur(!0);function wu(){return[]}function gu(){return!1}var yu,vu=Br((function(e,t){return e+t}),0),bu=zr("ceil"),Su=Br((function(e,t){return e/t}),1),Cu=zr("floor"),_u=Br((function(e,t){return e*t}),1),Au=zr("round"),Wu=Br((function(e,t){return e-t}),0);return jn.after=function(e,t){if("function"!=typeof t)throw new Te(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},jn.ary=Ls,jn.assign=ba,jn.assignIn=Sa,jn.assignInWith=Ca,jn.assignWith=_a,jn.at=Aa,jn.before=Is,jn.bind=Os,jn.bindAll=eu,jn.bindKey=ks,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},jn.chain=ps,jn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===r)?1:gn(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=i(cn(o/t));s<o;)u[a++]=tr(e,s,s+=t);return u},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var o=e[t];o&&(r[i++]=o)}return r},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Et(Vs(n)?Tr(n):[n],wi(t,1))},jn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Wt(e,(function(e){if("function"!=typeof e[1])throw new Te(o);return[n(e[0]),e[1]]})):[],Yi((function(n){for(var i=-1;++i<t;){var r=e[i];if(gt(r[0],this,n))return gt(r[1],this,n)}}))},jn.conforms=function(e){return function(e){var t=Na(e);return function(n){return ui(n,e,t)}}(ai(e,1))},jn.constant=tu,jn.countBy=ws,jn.create=function(e,t){var n=Bn(e);return null==t?n:ii(n,t)},jn.curry=function e(t,n,i){var o=Kr(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},jn.curryRight=function e(t,n,i){var o=Kr(t,16,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},jn.debounce=Ns,jn.defaults=Wa,jn.defaultsDeep=Ea,jn.defer=Rs,jn.delay=Ps,jn.difference=$o,jn.differenceBy=Ho,jn.differenceWith=Uo,jn.drop=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=n||t===r?1:ma(t))<0?0:t,i):[]},jn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,0,(t=i-(t=n||t===r?1:ma(t)))<0?0:t):[]},jn.dropRightWhile=function(e,t){return e&&e.length?dr(e,so(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?dr(e,so(t,3),!0):[]},jn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&yo(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=ma(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:ma(i))<0&&(i+=o),i=n>i?0:wa(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},jn.filter=function(e,t){return(Vs(e)?Ct:mi)(e,so(t,3))},jn.flatMap=function(e,t){return wi(As(e,t),1)},jn.flatMapDeep=function(e,t){return wi(As(e,t),c)},jn.flatMapDepth=function(e,t,n){return n=n===r?1:ma(n),wi(As(e,t),n)},jn.flatten=zo,jn.flattenDeep=function(e){return null!=e&&e.length?wi(e,c):[]},jn.flattenDepth=function(e,t){return null!=e&&e.length?wi(e,t=t===r?1:ma(t)):[]},jn.flip=function(e){return Kr(e,512)},jn.flow=nu,jn.flowRight=iu,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},jn.functions=function(e){return null==e?[]:Si(e,Na(e))},jn.functionsIn=function(e){return null==e?[]:Si(e,Ra(e))},jn.groupBy=Ss,jn.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},jn.intersection=Yo,jn.intersectionBy=Ko,jn.intersectionWith=Jo,jn.invert=Ia,jn.invertBy=Oa,jn.invokeMap=Cs,jn.iteratee=ou,jn.keyBy=_s,jn.keys=Na,jn.keysIn=Ra,jn.map=As,jn.mapKeys=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,t(e,i,r),e)})),n},jn.mapValues=function(e,t){var n={};return t=so(t,3),vi(e,(function(e,i,r){ri(n,i,t(e,i,r))})),n},jn.matches=function(e){return xi(ai(e,1))},jn.matchesProperty=function(e,t){return ji(e,ai(t,1))},jn.memoize=Ms,jn.merge=Pa,jn.mergeWith=Ma,jn.method=su,jn.methodOf=au,jn.mixin=uu,jn.negate=Fs,jn.nthArg=function(e){return e=ma(e),Yi((function(t){return $i(t,e)}))},jn.omit=Fa,jn.omitBy=function(e,t){return xa(e,Fs(so(t)))},jn.once=function(e){return Is(2,e)},jn.orderBy=function(e,t,n,i){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(n=i?r:n)||(n=null==n?[]:[n]),Hi(e,t,n))},jn.over=cu,jn.overArgs=Ds,jn.overEvery=du,jn.overSome=fu,jn.partial=xs,jn.partialRight=js,jn.partition=Ws,jn.pick=Da,jn.pickBy=xa,jn.property=pu,jn.propertyOf=function(e){return function(t){return null==e?r:Ci(e,t)}},jn.pull=Xo,jn.pullAll=Zo,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qi(e,t,so(n,2)):e},jn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?qi(e,t,r,n):e},jn.pullAt=es,jn.range=hu,jn.rangeRight=mu,jn.rearg=Bs,jn.reject=function(e,t){return(Vs(e)?Ct:mi)(e,Fs(so(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],o=e.length;for(t=so(t,3);++i<o;){var s=e[i];t(s,i,e)&&(n.push(s),r.push(i))}return Vi(e,r),n},jn.rest=function(e,t){if("function"!=typeof e)throw new Te(o);return Yi(e,t=t===r?t:ma(t))},jn.reverse=ts,jn.sampleSize=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ma(t),(Vs(e)?Qn:Ji)(e,t)},jn.set=function(e,t,n){return null==e?e:Qi(e,t,n)},jn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Qi(e,t,n,i)},jn.shuffle=function(e){return(Vs(e)?Xn:er)(e)},jn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yo(e,t,n)?(t=0,n=i):(t=null==t?0:ma(t),n=n===r?i:ma(n)),tr(e,t,n)):[]},jn.sortBy=Es,jn.sortedUniq=function(e){return e&&e.length?or(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?or(e,so(t,2)):[]},jn.split=function(e,t,n){return n&&"number"!=typeof n&&yo(e,t,n)&&(t=n=r),(n=n===r?p:n>>>0)?(e=va(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ar(t))&&Xt(e)?vr(sn(e),0,n):e.split(t,n):[]},jn.spread=function(e,t){if("function"!=typeof e)throw new Te(o);return t=null==t?0:gn(ma(t),0),Yi((function(n){var i=n[t],r=vr(n,0,t);return i&&Et(r,i),gt(e,this,r)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},jn.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===r?1:ma(t))<0?0:t):[]},jn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=i-(t=n||t===r?1:ma(t)))<0?0:t,i):[]},jn.takeRightWhile=function(e,t){return e&&e.length?dr(e,so(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?dr(e,so(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Te(o);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Ns(e,t,{leading:i,maxWait:t,trailing:r})},jn.thru=hs,jn.toArray=pa,jn.toPairs=ja,jn.toPairsIn=Ba,jn.toPath=function(e){return Vs(e)?Wt(e,xo):la(e)?[e]:Tr(Do(va(e)))},jn.toPlainObject=ya,jn.transform=function(e,t,n){var i=Vs(e),r=i||Ks(e)||ca(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:ta(e)&&Xs(o)?Bn(ze(e)):{}}return(r?vt:vi)(e,(function(e,i,r){return t(n,e,i,r)})),n},jn.unary=function(e){return Ls(e,1)},jn.union=ns,jn.unionBy=is,jn.unionWith=rs,jn.uniq=function(e){return e&&e.length?ur(e):[]},jn.uniqBy=function(e,t){return e&&e.length?ur(e,so(t,2)):[]},jn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ur(e,r,t):[]},jn.unset=function(e,t){return null==e||lr(e,t)},jn.unzip=os,jn.unzipWith=ss,jn.update=function(e,t,n){return null==e?e:cr(e,t,wr(n))},jn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:cr(e,t,wr(n),i)},jn.values=$a,jn.valuesIn=function(e){return null==e?[]:qt(e,Ra(e))},jn.without=as,jn.words=Xa,jn.wrap=function(e,t){return xs(wr(t),e)},jn.xor=us,jn.xorBy=ls,jn.xorWith=cs,jn.zip=ds,jn.zipObject=function(e,t){return hr(e||[],t||[],ei)},jn.zipObjectDeep=function(e,t){return hr(e||[],t||[],Qi)},jn.zipWith=fs,jn.entries=ja,jn.entriesIn=Ba,jn.extend=Sa,jn.extendWith=Ca,uu(jn,jn),jn.add=vu,jn.attempt=Za,jn.camelCase=Ha,jn.capitalize=Ua,jn.ceil=bu,jn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ga(n))==n?n:0),t!==r&&(t=(t=ga(t))==t?t:0),si(ga(e),t,n)},jn.clone=function(e){return ai(e,4)},jn.cloneDeep=function(e){return ai(e,5)},jn.cloneDeepWith=function(e,t){return ai(e,5,t="function"==typeof t?t:r)},jn.cloneWith=function(e,t){return ai(e,4,t="function"==typeof t?t:r)},jn.conformsTo=function(e,t){return null==t||ui(e,t,Na(t))},jn.deburr=qa,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=Su,jn.endsWith=function(e,t,n){e=va(e),t=ar(t);var i=e.length,o=n=n===r?i:si(ma(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},jn.eq=$s,jn.escape=function(e){return(e=va(e))&&Y.test(e)?e.replace(z,Jt):e},jn.escapeRegExp=function(e){return(e=va(e))&&ne.test(e)?e.replace(te,"\\$&"):e},jn.every=function(e,t,n){var i=Vs(e)?St:pi;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},jn.find=gs,jn.findIndex=qo,jn.findKey=function(e,t){return kt(e,so(t,3),vi)},jn.findLast=ys,jn.findLastIndex=Vo,jn.findLastKey=function(e,t){return kt(e,so(t,3),bi)},jn.floor=Cu,jn.forEach=vs,jn.forEachRight=bs,jn.forIn=function(e,t){return null==e?e:gi(e,so(t,3),Ra)},jn.forInRight=function(e,t){return null==e?e:yi(e,so(t,3),Ra)},jn.forOwn=function(e,t){return e&&vi(e,so(t,3))},jn.forOwnRight=function(e,t){return e&&bi(e,so(t,3))},jn.get=Ta,jn.gt=Hs,jn.gte=Us,jn.has=function(e,t){return null!=e&&ho(e,t,Ei)},jn.hasIn=La,jn.head=Go,jn.identity=ru,jn.includes=function(e,t,n,i){e=Gs(e)?e:$a(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=gn(r+n,0)),ua(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Rt(e,t,n)>-1},jn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=gn(i+r,0)),Rt(e,t,r)},jn.inRange=function(e,t,n){return t=ha(t),n===r?(n=t,t=0):n=ha(n),function(e,t,n){return e>=yn(t,n)&&e<gn(t,n)}(e=ga(e),t,n)},jn.invoke=ka,jn.isArguments=qs,jn.isArray=Vs,jn.isArrayBuffer=zs,jn.isArrayLike=Gs,jn.isArrayLikeObject=Ys,jn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Ai(e)==g},jn.isBuffer=Ks,jn.isDate=Js,jn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},jn.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||ca(e)||qs(e)))return!e.length;var t=po(e);if(t==C||t==T)return!e.size;if(Co(e))return!Mi(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return ki(e,t)},jn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?ki(e,t,r,n):!!i},jn.isError=Qs,jn.isFinite=function(e){return"number"==typeof e&&hn(e)},jn.isFunction=Xs,jn.isInteger=Zs,jn.isLength=ea,jn.isMap=ia,jn.isMatch=function(e,t){return e===t||Ni(e,t,uo(t))},jn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ni(e,t,uo(t),n)},jn.isNaN=function(e){return ra(e)&&e!=+e},jn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ri(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=ra,jn.isObject=ta,jn.isObjectLike=na,jn.isPlainObject=oa,jn.isRegExp=sa,jn.isSafeInteger=function(e){return Zs(e)&&e>=-9007199254740991&&e<=d},jn.isSet=aa,jn.isString=ua,jn.isSymbol=la,jn.isTypedArray=ca,jn.isUndefined=function(e){return e===r},jn.isWeakMap=function(e){return na(e)&&po(e)==O},jn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Ai(e)},jn.join=function(e,t){return null==e?"":mn.call(e,t)},jn.kebabCase=Va,jn.last=Qo,jn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ma(n))<0?gn(i+o,0):yn(o,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Nt(e,Mt,o,!0)},jn.lowerCase=za,jn.lowerFirst=Ga,jn.lt=da,jn.lte=fa,jn.max=function(e){return e&&e.length?hi(e,ru,Wi):r},jn.maxBy=function(e,t){return e&&e.length?hi(e,so(t,2),Wi):r},jn.mean=function(e){return Ft(e,ru)},jn.meanBy=function(e,t){return Ft(e,so(t,2))},jn.min=function(e){return e&&e.length?hi(e,ru,Fi):r},jn.minBy=function(e,t){return e&&e.length?hi(e,so(t,2),Fi):r},jn.stubArray=wu,jn.stubFalse=gu,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=_u,jn.nth=function(e,t){return e&&e.length?$i(e,ma(t)):r},jn.noConflict=function(){return ot._===this&&(ot._=xe),this},jn.noop=lu,jn.now=Ts,jn.pad=function(e,t,n){e=va(e);var i=(t=ma(t))?on(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Hr(dn(r),n)+e+Hr(cn(r),n)},jn.padEnd=function(e,t,n){e=va(e);var i=(t=ma(t))?on(e):0;return t&&i<t?e+Hr(t-i,n):e},jn.padStart=function(e,t,n){e=va(e);var i=(t=ma(t))?on(e):0;return t&&i<t?Hr(t-i,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(va(e).replace(ie,""),t||0)},jn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yo(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ha(e),t===r?(t=e,e=0):t=ha(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=Sn();return yn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return zi(e,t)},jn.reduce=function(e,t,n){var i=Vs(e)?Tt:jt,r=arguments.length<3;return i(e,so(t,4),n,r,di)},jn.reduceRight=function(e,t,n){var i=Vs(e)?Lt:jt,r=arguments.length<3;return i(e,so(t,4),n,r,fi)},jn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===r)?1:ma(t),Gi(va(e),t)},jn.replace=function(){var e=arguments,t=va(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(e,t,n){var i=-1,o=(t=gr(t,e)).length;for(o||(o=1,e=r);++i<o;){var s=null==e?r:e[xo(t[i])];s===r&&(i=o,s=n),e=Xs(s)?s.call(e):s}return e},jn.round=Au,jn.runInContext=e,jn.sample=function(e){return(Vs(e)?Jn:Ki)(e)},jn.size=function(e){if(null==e)return 0;if(Gs(e))return ua(e)?on(e):e.length;var t=po(e);return t==C||t==T?e.size:Mi(e).length},jn.snakeCase=Ya,jn.some=function(e,t,n){var i=Vs(e)?It:nr;return n&&yo(e,t,n)&&(t=r),i(e,so(t,3))},jn.sortedIndex=function(e,t){return ir(e,t)},jn.sortedIndexBy=function(e,t,n){return rr(e,t,so(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=ir(e,t);if(i<n&&$s(e[i],t))return i}return-1},jn.sortedLastIndex=function(e,t){return ir(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return rr(e,t,so(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ir(e,t,!0)-1;if($s(e[n],t))return n}return-1},jn.startCase=Ka,jn.startsWith=function(e,t,n){return e=va(e),n=null==n?0:si(ma(n),0,e.length),t=ar(t),e.slice(n,n+t.length)==t},jn.subtract=Wu,jn.sum=function(e){return e&&e.length?Bt(e,ru):0},jn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},jn.template=function(e,t,n){var i=jn.templateSettings;n&&yo(e,t,n)&&(t=r),e=va(e),t=Ca({},t,i,Jr);var o,s,a=Ca({},t.imports,i.imports,Jr),u=Na(a),l=qt(a,u),c=0,d=t.interpolate||ve,f="__p += '",p=We((t.escape||ve).source+"|"+d.source+"|"+(d===Q?de:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),h="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(p,(function(t,n,i,r,a,u){return i||(i=r),f+=e.slice(c,u).replace(be,Qt),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var m=Re.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(H,""):f).replace(U,"$1").replace(q,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var w=Za((function(){return Ce(u,h+"return "+f).apply(r,l)}));if(w.source=f,Qs(w))throw w;return w},jn.times=function(e,t){if((e=ma(e))<1||e>d)return[];var n=p,i=yn(e,p);t=so(t),e-=p;for(var r=$t(i,t);++n<e;)t(n);return r},jn.toFinite=ha,jn.toInteger=ma,jn.toLength=wa,jn.toLower=function(e){return va(e).toLowerCase()},jn.toNumber=ga,jn.toSafeInteger=function(e){return e?si(ma(e),-9007199254740991,d):0===e?e:0},jn.toString=va,jn.toUpper=function(e){return va(e).toUpperCase()},jn.trim=function(e,t,n){if((e=va(e))&&(n||t===r))return Ht(e);if(!e||!(t=ar(t)))return e;var i=sn(e),o=sn(t);return vr(i,zt(i,o),Gt(i,o)+1).join("")},jn.trimEnd=function(e,t,n){if((e=va(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,0,Gt(i,sn(t))+1).join("")},jn.trimStart=function(e,t,n){if((e=va(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ar(t)))return e;var i=sn(e);return vr(i,zt(i,sn(t))).join("")},jn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ma(t.length):n,i="omission"in t?ar(t.omission):i}var s=(e=va(e)).length;if(Xt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var u=n-on(i);if(u<1)return i;var l=a?vr(a,0,u).join(""):e.slice(0,u);if(o===r)return l+i;if(a&&(u+=l.length-u),sa(o)){if(e.slice(u).search(o)){var c,d=l;for(o.global||(o=We(o.source,va(fe.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;l=l.slice(0,f===r?u:f)}}else if(e.indexOf(ar(o),u)!=u){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+i},jn.unescape=function(e){return(e=va(e))&&G.test(e)?e.replace(V,un):e},jn.uniqueId=function(e){var t=++Pe;return va(e)+t},jn.upperCase=Ja,jn.upperFirst=Qa,jn.each=vs,jn.eachRight=bs,jn.first=Go,uu(jn,(yu={},vi(jn,(function(e,t){Re.call(jn.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),jn.VERSION="4.17.21",vt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),vt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===r?1:gn(ma(n),0);var i=this.__filtered__&&!t?new Un(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,p),type:e+(i.__dir__<0?"Right":"")}),i},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),vt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=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__||i,t}})),vt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),vt(["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(ru)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Yi((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Ii(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Fs(so(e)))},Un.prototype.slice=function(e,t){e=ma(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!==r&&(n=(t=ma(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)},vi(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=jn[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(jn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,u=t instanceof Un,l=a[0],c=u||Vs(t),d=function(e){var t=o.apply(jn,Et([e],a));return i&&f?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=s&&!f,m=u&&!p;if(!s&&c){t=m?t:new Un(this);var w=e.apply(t,a);return w.__actions__.push({func:hs,args:[d],thisArg:r}),new Hn(w,f)}return h&&m?e.apply(this,a):(w=this.thru(d),h?i?w.value()[0]:w.value():w)})})),vt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Le[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Vs(r)?r:[],e)}return this[n]((function(n){return t.apply(Vs(n)?n:[],e)}))}})),vi(Un.prototype,(function(e,t){var n=jn[t];if(n){var i=n.name+"";Re.call(On,i)||(On[i]=[]),On[i].push({name:t,func:n})}})),On[xr(r,2).name]=[{name:"wrapper",func:r}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Tr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Tr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Tr(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=Vs(e),i=t<0,r=n?e.length:0,o=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yn(t,e+s);break;case"takeRight":e=gn(e,t-s)}}return{start:e,end:t}}(0,r,this.__views__),s=o.start,a=o.end,u=a-s,l=i?a:s-1,c=this.__iteratees__,d=c.length,f=0,p=yn(u,this.__takeCount__);if(!n||!i&&r==u&&p==u)return fr(e,this.__actions__);var h=[];e:for(;u--&&f<p;){for(var m=-1,w=e[l+=t];++m<d;){var g=c[m],y=g.iteratee,v=g.type,b=y(w);if(2==v)w=b;else if(!b){if(1==v)continue e;break e}}h[f++]=w}return h},jn.prototype.at=ms,jn.prototype.chain=function(){return ps(this)},jn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===r&&(this.__values__=pa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},jn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var i=Bo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},jn.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:r}),new Hn(t,this.__chain__)}return this.thru(ts)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return fr(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,st&&(jn.prototype[st]=function(){return this}),jn}();ot._=ln,(i=function(){return ln}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},54883:(e,t,n)=>{var i=n(25835);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},98253:(e,t,n)=>{var i=n(158);e.exports=function(){return i.Date.now()}},75892:(e,t,n)=>{var i=n(11241),r=n(39169)((function(e,t){return null==e?{}:i(e,t)}));e.exports=r},59174:e=>{e.exports=function(){return[]}},30647:e=>{e.exports=function(){return!1}},38172:(e,t,n)=>{var i=n(76897),r=n(23619);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),i(e,t,{leading:o,maxWait:t,trailing:s})}},95053:(e,t,n)=>{var i=n(12383),r=n(23619),o=n(81878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):s.test(e)?NaN:+e}},33270:(e,t,n)=>{var i=n(80430);e.exports=function(e){return null==e?"":i(e)}},42169:(e,t,n)=>{"use strict";const i=n(14561);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new i;let n=0;const r=async(e,i,...r)=>{n++;const o=(async()=>e(...r))();i(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(i,...o)=>new Promise((s=>{((i,o,...s)=>{t.enqueue(r.bind(null,i,o,...s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(i,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},88021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var i=n(33034);class r extends Error{constructor(e){super(e),this.name="TimeoutError"}}class o{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){var n;const i={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&(null===(n=this._queue[this.size-1])||void 0===n?void 0:n.priority)>=t.priority)return void this._queue.push(i);const r=function(e,t,n){let i=0,r=e.length;for(;r>0;){const n=Math.trunc(r/2);let s=i+n;o=e[s],t.priority-o.priority<=0?(i=++s,r-=n+1):r=n}var o;return i}(this._queue,i);this._queue.splice(r,0,i)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}const s=()=>{},a=new r;class u extends i{constructor(e){var t,n,i,r;if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:o,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(r=null===(i=e.interval)||void 0===i?void 0:i.toString())&&void 0!==r?r:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const r=void 0===this._timeout&&void 0===t.timeout?e():function(e,t,n,i){let r;const o=new Promise(((o,s)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");t!==Number.POSITIVE_INFINITY?(i={customTimers:{setTimeout,clearTimeout},...i},r=i.customTimers.setTimeout.call(void 0,(()=>{try{o(n())}catch(e){s(e)}}),t),(async()=>{try{o(await e)}catch(e){s(e)}finally{i.customTimers.clearTimeout.call(void 0,r)}})()):o(e)}));return o.clear=()=>{clearTimeout(r),r=void 0},o}(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&i(a)})),o=await r;n(o),this.emit("completed",o)}catch(e){i(e),this.emit("error",e)}this._next()}),t),this._tryToStartAnother(),this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onSizeLessThan(e){if(!(this._queue.size<e))return new Promise((t=>{const n=()=>{this._queue.size<e&&(this.removeListener("next",n),t())};this.on("next",n)}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}},50586:(e,t,n)=>{var i=n(36589),r=n(22708),o=r;o.v1=i,o.v4=r,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 i=n||0,r=t;return r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]}},76338:(e,t,n)=>{var i,r=n.g.crypto||n.g.msCrypto;if(r&&r.getRandomValues){var o=new Uint8Array(16);i=function(){return r.getRandomValues(o),o}}if(!i){var s=new Array(16);i=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=i},36589:(e,t,n)=>{var i=n(76338),r=n(98726),o=i(),s=[1|o[0],o[1],o[2],o[3],o[4],o[5]],a=16383&(o[6]<<8|o[7]),u=0,l=0;e.exports=function(e,t,n){var i=t&&n||0,o=t||[],c=void 0!==(e=e||{}).clockseq?e.clockseq:a,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,p=d-u+(f-l)/1e4;if(p<0&&void 0===e.clockseq&&(c=c+1&16383),(p<0||d>u)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,l=f,a=c;var h=(1e4*(268435455&(d+=122192928e5))+f)%4294967296;o[i++]=h>>>24&255,o[i++]=h>>>16&255,o[i++]=h>>>8&255,o[i++]=255&h;var m=d/4294967296*1e4&268435455;o[i++]=m>>>8&255,o[i++]=255&m,o[i++]=m>>>24&15|16,o[i++]=m>>>16&255,o[i++]=c>>>8|128,o[i++]=255&c;for(var w=e.node||s,g=0;g<6;++g)o[i+g]=w[g];return t||r(o)}},22708:(e,t,n)=>{var i=n(76338),r=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||i)();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||r(s)}},14561:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},34361:function(e,t,n){"use strict";var i,r,o,s,a,u,l,c,d,f,p,h,m,w=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},g=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},y=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const v=n(98832),b=y(n(72551)),S=n(6192),C=n(81298),_=n(81298),A=y(n(60306));class W{constructor(e){i.set(this,void 0),r.set(this,void 0),w(this,i,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};g(this,i,"f").transmit(C.HEARTBEAT_CHANNEL,t),w(this,r,setInterval((()=>{g(this,i,"f").transmit(C.HEARTBEAT_CHANNEL,t)}),C.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(g(this,r,"f")),w(this,r,void 0,"f")}}i=new WeakMap,r=new WeakMap;class E{constructor(e,t,n="app"){o.set(this,void 0),w(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){g(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return g(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return g(this,o,"f").channelAddContextListener(this.id,e,t)}}o=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){s.set(this,!1),a.set(this,void 0),u.set(this,!1),l.set(this,""),c.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),d.set(this,{}),f.set(this,{}),p.set(this,[]),h.set(this,void 0),m.set(this,void 0),w(this,h,e,"f"),w(this,a,new W(e),"f"),w(this,m,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:g(this,l,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(g(this,f,"f")[t?.type]??[]).concat(g(this,f,"f")["*"]??[]).forEach((({handler:n,channel:i})=>{e.meta.channel!==i&&(e.meta.channel||i)||n(t)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,i=g(this,d,"f")[t];n&&(i||[]).forEach((e=>e(n)))}handleIncoming(e){switch(b.default.log("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e)}}releaseQueue(){const e=e=>(void 0!==e?.meta?.uuid&&(e.meta.uuid=g(this,l,"f")),e);g(this,p,"f").forEach((async t=>{const{message:n,handler:i,resolve:r}=t,{err:o,response:s}=await g(this,h,"f").query(C.SERVER_CHANNEL,e(n),i);r({err:o,receiveMessage:s?.data})})),w(this,p,[],"f")}async connectWhenFSBLIsReady(){g(this,u,"f")||(w(this,u,!0,"f"),await g(this,m,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(g(this,s,"f")){const{err:i,response:r}=await g(this,h,"f").query(C.SERVER_CHANNEL,e,t);n({err:i,receiveMessage:r?.data})}else g(this,p,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=g(this,m,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;b.default.log(`fdc3.connect StartupData for ${t}`,e),w(this,l,t,"f");const i={type:"register",meta:this.meta(),payload:{clientChannel:g(this,c,"f"),windowName:t,authenticationToken:n}};g(this,h,"f").query(C.SERVER_CHANNEL,i,(e=>{e?b.default.error("connect error",e):(g(this,h,"f").addResponder(g(this,c,"f"),((e,t)=>{if(e||!t){const t=_.errorAsString(e??"No request received on responder");b.default.error(`FinsembleDesktopAgent can't listen on channel ${g(this,c,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),w(this,s,!0,"f"),this.releaseQueue())})),g(this,a,"f").start(g(this,l,"f"))}stop(){g(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{g(this,h,"f").removeResponder(g(this,c,"f")),w(this,s,!1,"f")}))}async getCurrentContext(e){const t={type:"currentContextRequest",meta:this.meta(),payload:{contextType:e}},{err:n,receiveMessage:i}=await this.exchange(t);return n?null:"currentContext"===i?.type&&i.payload.context?i.payload.context:null}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:i,receiveMessage:r}=await this.exchange(n);return i?null:"currentContext"===r?.type?r.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t}};this.exchange(n)}async getSystemChannels(){const e={type:"systemChannelRequest",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e);return t?[]:("systemChannels"===n?.type?n?.payload?.channels:[]).map((e=>new E(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw v.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:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw v.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),i=n;if(i.payload.error)throw i.payload.error;return i.payload.intents||[]}async raiseIntent(e,t,n){const i={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:r,receiveMessage:o}=await this.exchange(i),s=o;if(r)throw v.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:i,receiveMessage:r}=await this.exchange(n),o=r;if(i)throw v.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){g(this,d,"f")[e]=_.mmAdd(g(this,d,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),g(this,d,"f")[e]=_.mmRemove(g(this,d,"f"),e,t)}}}channelAddContextListener(e,t,n){const i=n?t:"*";n||(n=t);const r={handler:n,channel:e};g(this,f,"f")[i]=_.mmAdd(g(this,d,"f"),i,r);let o={type:"subscribeContext",meta:this.meta(),payload:{contextType:i}};return e&&(o.meta.channel=e),this.exchange(o),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:i}};e&&(t.meta.channel=e),g(this,f,"f")[i]=_.mmRemove(g(this,d,"f"),i,r),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new E(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),i=n;if(t)throw t;if(i.payload.error)throw i.payload.error;if(!i.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return i.payload.data.map((e=>new E(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:A.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,m=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],i=e?n.concat(e):n;return Array.from(new Set(i))},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 i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const r=i(n(39319)),o=n(67580),s=n(51742),a=n(16925),u=n(50586),l=n(6192),c=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",i=t.name??document?.location?.href??`Unknown window-${u.v4()}`,d=o.getManifestFromStartupData(e)??{},f=o.getRouterConfig({windowName:i,systemManifest:d});await r.default.start(f);const p=a.Startup.getInstance();p.setStartupData({windowName:i,authenticationToken:{authenticationKeyType:"unauthenticated",meta:{name:n}}}),l.Globals.fdc3=new c.FinsembleDesktopAgent({routerClient:r.default,startup:p}),p.ready()}async stopApp(){r.default.stop()}}},67580:function(e,t,n){"use strict";var i=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 r=i(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 r.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,i=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&&i;return r.default.system.debug(`Transport crossDomain=${u} (${n}:${i}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=e?.finsemble,{sameDomainTransport:i="SharedWorker",crossDomainTransport:o="IPCBus"}=n??{},s=u(t)?o:i;return r.default.system.log(`Transport Info: Selected=${s} SameDomainDefault=${i} CrossDomainDefault=${o}`),console.log(`Transport Info: Selected=${s} SameDomainDefault=${i} CrossDomainDefault=${o}`),s},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:i})=>n?((e,n)=>{if(r.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const i=e.finsemble,r=i?.router?.transportSettings??i?.IAC??{},o=i?.notificationURL??`${i.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:i.moduleRoot,transportName:t.getRecommendedTransport(e),transportSettings:r,notificationURL:o}}return r.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...a,windowName:n}})(n,e):{...a,windowName:e,transportSettings:i??{}},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 i=n(81298),r=n(6192),o=n(50586),s=n(4971);class a{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:i.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()})),r.Globals.dispatchEvent&&r.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=a,a.instance=null},17348:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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)),l=s(n(72551)),c=window;t.default=class{constructor(e,t){this.values={},this.listeners=[],this.registeredDispatchListeners=[],this.mapping={},this.Dispatcher={register:e=>{this.registeredDispatchListeners.push(e)},dispatch:e=>{this.isGlobal?this.routerClient.transmit(`storeService.dispatch.${this.name}`,e):this.handleDispatchedMessages(null,{data:e})}},this.handleChanges=(e,t)=>{if(e&&l.default.system.error("DistributedStoreClient",e),!t.data.store)return;t.data.field||(t.data.field=null);const n=this.name+(t.data.field?`.${t.data.field}`:""),i=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(n,i)},this.routerClient=t,this.isGlobal=e.global,this.name=e.store?e.store:"finsemble",e.values&&(this.values=e.values),this.lst=this.listeners,u.initObject(this.values,null,this.mapping),this.isGlobal&&this.routerClient.addListener(`storeService.dispatch.${this.name}`,this.handleDispatchedMessages.bind(this))}handleDispatchedMessages(e,t){for(let e=0;e<this.registeredDispatchListeners.length;e++)this.registeredDispatchListeners[e](t.data)}setValue(e,t){if(e.field||l.default.system.error("DistributedStore.setValue:no field provided",e),e.hasOwnProperty("value")||l.default.system.error("DistributedStore.setValue:no value provided",e),this.isGlobal){const n={store:this.name,field:e.field,value:e.value};return c.distributedStoreClient.routerClient.query("storeService.setValue",n,(e=>{if(t)return t(e)}))}const n=u.checkForObjectChange(this.values,e.field,this.mapping);return u.setPath(this.values,e.field,e.value),u.mapField(this.values,e.field,this.mapping),n&&this.sendRemovals(n),this.triggerListeners(this.name,this),this.publishObjectUpdates(e.field,this.mapping),t?t(null):null}publishObjectUpdates(e,t){const n=t;for(;e;)this.triggerListeners(`${this.name}.${e}`,u.byString(this.values,e)),e=n[e]}sendRemovals(e){for(let t=0;t<e.length;t++)this.triggerListeners(`${this.name}.${e[t]}`,u.byString(this.values,e[t]))}setValues(e,t){return e?Array.isArray(e)?void a.each(e,((e,t)=>{this.setValue(e,t)}),(e=>t?t(e):null)):l.default.system.error("DistributedStore.setValues:params must be an array"):l.default.system.error("DistributedStore.setValues:no params given")}getValue(e,t){if("string"==typeof e&&(e={field:e}),!e.field)return t?t("no field provided"):"no field provided";if(this.isGlobal)return this.getGlobalValue(e,t);const n=u.byString(this.values,e.field);return void 0!==n?t?t(null,n):n:t?t("couldn't find a value"):null}getValues(e,t){if(null===e&&(e=t),"function"==typeof e)return t=e,this.isGlobal?this.getGlobalValues(null,t):t?t(null,this.values):this.values;if(!Array.isArray(e))return this.getValue(e,t);if(this.isGlobal)return this.getGlobalValues(e,t);const n={};for(let t=0;t<e.length;t++){const i=e[t],r="string"==typeof i?i:i.field,o=u.byString(this.values,r);n[r]=o}return t?t(null,n):n}getGlobalValue(e,t){c.distributedStoreClient.routerClient.query("storeService.getValue",{store:this.name,field:e.field},((e,n)=>e?t(e):t(e,n.data)))}getGlobalValues(e,t){c.distributedStoreClient.routerClient.query("storeService.getValues",{store:this.name,fields:e},((e,n)=>e?t(e):t(e,n.data)))}removeValue(e,t){if(!e.field){if(void 0===e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");a.map(e,this.removeValue,((e,n)=>t(e,n)))}destroy(e){const t={store:this.name,global:this.isGlobal};c.distributedStoreClient.removeStore(t,(t=>t?e(t):e(null,!0)))}changeSub(e){this.subs||(this.subs=[]),this.subs[e]||(this.isGlobal&&c.distributedStoreClient.routerClient.subscribe(`storeService${e}`,this.handleChanges),this.subs[e]=!0)}addListener(e,t,n){"function"==typeof e&&(t=e,e={});let{field:i}=e;const r=this.name+(i?`.${i}`:"");return this.listeners[r]?this.listeners[r].push(t):this.listeners[r]=[t],this.changeSub(r),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 r=null;const o=e[n];var i;"string"==typeof o?r=o:o.field&&(({field:r}=o),i=e[n].listener);const s=this.name+(r?`.${r}`:"");i||t&&"function"==typeof t&&(i=t),this.listeners[s]?this.listeners[s].push(i):this.listeners[s]=[i],this.changeSub(s)}return n?n():null}removeListener(e,t,n){"function"==typeof e&&(n=t,t=e,e={});let{field:i}=e;const r=this.name+(i?`.${i}`:"");if(this.listeners[r])for(let e=0;e<this.listeners[r].length;e++)if(this.listeners[r][e]===t)return this.listeners[r].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 i=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var r;"string"==typeof s?o=s:s.field&&(({field:o}=s),r=e[n].listener);const a=this.name+(o?`.${o}`:"");if(!r){if(!t||"function"!=typeof t)continue;r=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===r&&(this.listeners[a].splice(e,1),i++)}return i<e.length?n("All listeners could not be found",!1):n?n(null,!0):null}triggerListeners(e,t){if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?(l.default.system.debug("DistributedStore.triggerListeners",e,t),this.listeners[e][n](null,{field:e,value:t})):l.default.system.warn("DistributedStoreClient:triggerListeners: listener is not a function",e,n,this.listeners[e][n])}}},72669:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const r=i(n(39319)),o=i(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=r.default}}},70010:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(57664),o=i(n(13712)),s=n(72669),a=i(n(5020)),u=i(n(72551));class l extends s._BaseClient{constructor(e){super(e),this.listeners=[],this.changeSub=e=>{this.subs||(this.subs={}),this.subs[e]||(this.routerClient.query("configService.addListener",e,(t=>{t&&u.default.system.error("Error adding listener to config service",t),this.routerClient.subscribe(e,this.handleChanges)})),this.subs[e]=!0)},this.handleChanges=(e,t)=>{e&&u.default.system.error(e),t.data.field||(t.data.field=null);const n=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(t.data.field?t.data.field:"configService",n)},this.triggerListeners=(e,t)=>{if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?this.listeners[e][n](null,{field:e,value:t}):u.default.system.warn("ConfigClient:triggerListeners: listener is not a function",e)},this.set=(e,t)=>{u.default.system.debug("ConfigClient.Set",e),"function"==typeof e?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.set",e,((e,n)=>{t(e,n?n.data:null)}))},this.processAndSet=this.processAndSet.bind(this),this.getValue=this.getValue.bind(this),this.getValues=this.getValues.bind(this),this.setValue=this.setValue.bind(this),this.setValues=this.setValues.bind(this),this.removeValue=this.removeValue.bind(this),this.removeValues=this.removeValues.bind(this),this.addListener=this.addListener.bind(this),this.addListeners=this.addListeners.bind(this),this.removeListener=this.removeListener.bind(this),this.removeListeners=this.removeListeners.bind(this),this.setPreference=this.setPreference.bind(this),this.getPreferences=this.getPreferences.bind(this),this.unsetPreference=this.unsetPreference.bind(this)}getValue(e,t=Function.prototype){return"string"==typeof e&&(e={field:e}),new Promise(((n,i)=>{if(!e.field){const e="no field provided";return i(e),t(e)}this.routerClient.query("configService.getValue",{field:e.field},((e,r)=>e?(i(e),t(e)):(n({err:e,data:r.data}),t(e,r.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,i)=>e?t(e):(n({err:e,data:i.data}),t(e,i.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");r.map(e,this.removeValue,((e,n)=>t(e,n)))}addListener(e,t,n){let i=null;"function"==typeof e&&(t=e,e={field:i}),({field:i}=e);const r="configService"+(i?`.${i}`:"");return this.listeners[r]?this.listeners[r].push(t):this.listeners[r]=[t],this.changeSub(r),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 r=null;const o=e[n];var i;"string"==typeof o?r=o:o.field&&(({field:r}=o),i=o.listener);const s="configService"+(r?`.${r}`:"");i||t&&"function"==typeof t&&(i=t),this.listeners[s]?this.listeners[s].push(i):this.listeners[s]=[i],this.changeSub(s)}return n?n():null}removeListener(e,t,n){let i=null;"function"==typeof e&&(n=t,t=e,e={field:i}),({field:i}=e);const r=this.name+(i?`.${i}`:"");if(this.listeners[r])for(let e=0;e<this.listeners[r].length;e++)if(this.listeners[r][e]===t)return this.listeners[r].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 i=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var r;"string"==typeof s?o=s:s.field&&(({field:o}=s),r=e[n].listener);const a="configService"+(o?`.${o}`:"");if(!r){if(!t||"function"!=typeof t)continue;r=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===r&&(this.listeners[a].pop(n),i++)}return i<e.length?n?.("All listeners could not be found",!1):n?n(null,!0):null}get(e,t){u.default.system.debug("ConfigClient.Get",e),u.default.system.deprecated("This functionality has been deprecated. It will be removed in a future Finsemble release. Use getValue instead.",e),1===arguments.length?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.get",e,((e,n)=>{t(e,n?n.data:null)}))}processAndSet(e,t){if(u.default.system.debug("ConfigClient.processAndSet",e),o.default.args(e,"object",t,"function=")&&o.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";u.default.system.warn("ConfigClient.processAndSet:",e),t&&t(e,null)}else this.routerClient.query("config.processAndSet",e,((e,n)=>{t&&t(e,n?n.data:null)}))}setPreference(e,t){this.routerClient.query("PreferencesService.setPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}async getPreferences(e){await a.default.waitForStartup("preferencesService"),this.routerClient.query("PreferencesService.getPreferences",{},((t,n)=>{u.default.system.debug("ConfigClient.getPreferences response",n),e&&e(t,n?n.data:null)}))}async unsetPreference(e,t){u.default.system.debug("ConfigClient.unsetPreference",e),this.routerClient.query("PreferencesService.unsetPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}}const c=new l({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=c},43190:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(72669),o=i(n(17348));let s;const a=window;let u;const l={};function c(e,t){return u.routerClient.query("storeService.getStore",e,(function(e,n){return e?t(e):t(e,new s(n.data,u.routerClient))}))}function d(e,t){u.routerClient.query("storeService.removeStore",e,((e,n)=>t(e,!e&&n.data)))}class f extends r._BaseClient{constructor(e){super(e),this.load=function(e){e()},u=this,this.ls=l}getStore(e,t){return e.global?c(e,t):e.store&&l[e.store]?t(null,l[e.store]):c(e,t)}createStore(e,t=Function.prototype){let n=new Promise(((n,i)=>{if(e.global)return this.routerClient.query("storeService.createStore",e,((e,r)=>{if(e)return i(e),t(e);const o=new s(r.data,u.routerClient);return n({err:e,data:o}),t(e,o)}));if(l[e.store])return n({err:null,data:l[e.store]}),t(null,l[e.store]);const r=new s(e,u.routerClient);return l[r.name]=r,n({err:null,data:r}),t(null,r)}));return n.catch((e=>{console.log(e)})),n}removeStore(e,t){return e.global?d(e,t):l[e.store]?(delete l[e.store],t(null,!0)):void d(e,t)}}var p=new f({startupDependencies:{},onReady(e){s=o.default,p.load(e)},name:"distributedStoreClient"});a.distributedStoreClient=p,t.default=p},68718:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(5939),o=n(72669),s=i(n(39319)),a=i(n(72551)),u=n(87063).F,l=window,c=new r.EventEmitter;function d(e,t=u){const n=[];return e.keys.forEach((e=>{if("string"!=typeof e)return a.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const i=t[e];if(!i)return a.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);n.push(i)})),n}const f=function(e){this.cb=e,this.shift=!1,this.ctrl=!1,this.cmd=!1,this.capsLock=!1,this.initialize()};f.prototype.keyup=function(e){switch(e.key){case"Shift":return this.shift=!1,void this.cb({key:e.key,e,keystroke:this});case"Control":case"Alt":return this.ctrl=!1,void this.cb({key:e.key,e,keystroke:this});case"Meta":case"Win":return this.cmd=!1,void this.cb({key:e.key,e,keystroke:this})}this.key&&this.cb({key:this.key,e,keystroke:this})},f.prototype.keydown=function(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.cb({key:e.key,e,keystroke:this})}},f.prototype.keypress=function(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)},f.prototype.initialize=function(){const e=this;document.addEventListener("keyup",(t=>{e.keyup(t)})),document.addEventListener("keydown",(t=>{e.downValue=t.key,e.keydown(t)})),document.addEventListener("keypress",(t=>{e.keypress(t)})),window.addEventListener("blur",(t=>{e.ctrl=!1,e.cb({key:"Control",e:t,keystroke:e})}))};const p=[];class h extends o._BaseClient{constructor(e){super(e),this.onClose=e=>{this.removeAllHotkeys(e)},this.keyMap=u,this.listenForHotkeys=this.listenForHotkeys.bind(this),this.routerClient=s.default,this.localListeners={}}addLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addLocalHotkey"),a.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e);const i=d({keys:e}).sort().toString(),r=()=>{document.hasFocus()&&t()};this.localListeners[i]||(this.localListeners[i]={}),this.localListeners[i][t]=r,c.addListener(i,r),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:i,windowName:this.windowName},n)}addBrowserHotkey(e,t){this.KeyStroke||(this.KeyStroke=new f((e=>{const{key:t,keystroke:n}=e,i=[t];n.ctrl&&i.push("control"),n.shift&&i.push("shift"),n.alt&&i.push("alt"),n.cmd&&i.push("command");const r=i.sort().toString();p.forEach((e=>{const t=e.keyString.toUpperCase(),n=r.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))})));const n=d({keys:e}).sort().toString();p.push({keyString:n,handler:t})}removeLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeLocalHotkey"),a.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e);const i=d({keys:e}).sort().toString(),r=this.localListeners[i][t];c.removeListener(i,r),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:i,windowName:this.windowName},n)}addGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addGlobalHotkey"),a.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const i=d({keys:e}).sort().join("+");c.addListener(i,t),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:i,windowName:this.windowName},n)}removeGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeGlobalHotkey"),a.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const i=d({keys:e}).sort().join("+");c.removeListener(i,t),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:i,windowName:this.windowName},n)}listenForHotkeys(){const e=this;this.routerClient.addListener("HotkeyTriggered",((t,n)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):n.data.windows.includes(e.windowName)&&c.emit(n.data.keys)}))}removeAllHotkeys(e){c.removeAllListeners(),this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName},e)}}const m=new h({onReady(e){m.listenForHotkeys(),e&&e()},name:"hotkeyClient"});l.Keystroke=f,t.default=m},9562:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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(72669),u=s(n(95376)),l=o(n(76420)),c=s(n(13712)),d=n(51742),f=s(n(72551)),p=n(75688),h=window,m={};class w extends a._BaseClient{constructor(e){super(e),c.default.args(e,"object=")&&e&&c.default.args2("params.onReady",e.onReady,"function="),this.windowClient=e.clients.windowClient}getComponentList(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.componentList",{},((n,i)=>{e(n,i.data),t({err:n,data:i.data})}))}))}getComponentDefaultConfig(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.componentList",{},((i,r)=>{const o=r.data[e];t(i,o),n({err:i,data:o})}))}))}getMonitorInfo(e={},t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfo"),"all"===e.monitor?n.getMonitorInfoAll(t):new Promise((i=>{l.getMyWindowIdentifier((r=>{e.windowIdentifier||(e.windowIdentifier=r),n.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data),f.default.system.log("MONITOR: launcherClient.getMonitorInfo query response data",n.data),i({err:e,data:n.data})}))}))}))}getMonitorInfoAll(e=Function.prototype){return c.default.args(e,"function="),f.default.system.debug("MONITOR: launcherClient.getMonitorInfoAll"),new Promise(((t,n)=>{this.routerClient.query("Launcher.getMonitorInfoAll",{},((i,r)=>{i&&(n({err:i}),e(i)),t({err:i,data:r.data}),e(i,r.data)}))}))}registerComponent(e,t=Function.prototype){return new Promise((n=>{this.routerClient.query("LauncherService.registerComponent",e,((e,i)=>{t&&t(e,i.data),n({err:e,data:i.data})}))}))}unRegisterComponent(e,t=Function.prototype){return e.componentType?new Promise((n=>{this.routerClient.query("LauncherService.unRegisterComponent",e,((e,i)=>{t&&t(e,i.data),n({err:e,data:i.data})}))})):t("No componentType provided")}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,t,n){const i=this;let r=this.locatorToIdentifier(t),o=`${r.windowName}:${r.uuid}`;r.windowName||(o=r.componentType),!1!==m[o]?(n.position||(n.position="absolute"),this.showWindow(t,n,(function(t,n){if(!n)return;const{finWindow:r}=n;var s=function(){m[o]=!0,i.windowClient.isMouseOverDOMElement(e,(e=>{m[o]=!e})),r.removeEventListener("blurred",s)};r.addEventListener("blurred",s)}))):m[o]=!0}showWindow(e,t,n=Function.prototype){c.default.args(e,"object",t,"object=",n,"function=");const i=this;return t||(t={}),(t=l.clone(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e),new Promise((e=>{l.getMyWindowIdentifier((r=>{t.relativeWindow||(t.relativeWindow=r),i.routerClient.query("Launcher.showWindow",t,(async(t,i)=>{if(t)return e({err:t}),n(t);const r=i.data.windowIdentifier;i.data.windowIdentifier.name=i.data.windowIdentifier.windowName;const{wrap:o}=await p.FinsembleWindow.getInstance({name:r.windowName});i.data.finWindow=o,e({err:t,data:i.data}),n(t,i.data)}))}))}))}spawn(e,t,n=Function.prototype){const i=this;return c.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=l.clone(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),f.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`),new Promise((r=>{l.getMyWindowIdentifier((o=>{t.launchingWindow=o,i.callSpawn(t,((t,i)=>{f.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,t),r({err:t,response:i}),n(t,i)}))}))}))}callSpawn(e,t=Function.prototype){const n=this;return c.default.args(t,"function="),f.default.perf.debug("CallSpawn","start","from spawn to callback",e),new Promise((i=>{function r(e,n){t(e,n),i({err:e,data:n})}n.routerClient.query("Launcher.spawn",e,(async(e,t)=>{if(f.default.system.debug("CallSpawn","Initial launcher callback params",e,t),f.default.perf.debug("CallSpawn","Initial launcher callback",t),e)return r(e,t.data),f.default.system.error("LauncherClient.callSpawn",e);t.data.windowIdentifier.name=t.data.windowIdentifier.windowName;var i=t.data;if(i.windowDescriptor.native)return r(e,i);const o=i.windowIdentifier,{wrap:s}=await p.FinsembleWindow.getInstance({name:o.windowName});i.finWindow=s;const a=`Finsemble.${i.windowIdentifier.windowName}.componentReady`,u=n.routerClient.subscribe(a,((t,o)=>{if(t)return f.default.system.error(t);o&&0===Object.keys(o.data).length||(f.default.perf.debug("CallSpawn","stop"),r(e,i),n.routerClient.unsubscribe(u))}))}))}))}getMonitor(e,t=Function.prototype){return f.default.system.deprecated("This method is deprecated and will be removed in a future release. Method getMonitorInfo should be used instead."),c.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}getMyWindowIdentifier(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{l.getMyWindowIdentifier((n=>{e(n),t(n)}))}))}getActiveDescriptors(e=Function.prototype){return c.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.getActiveDescriptors",{},((n,i)=>{n&&f.default.system.error(n),e(n,i.data),t({err:n,data:i.data})}))}))}getActiveAndPendingWindowNames(e=Function.prototype){return new Promise((t=>{this.routerClient.query("Launcher.getActiveAndPendingWindowNames",{},((n,i)=>{n&&f.default.system.error(n),e(n,i.data),t({err:n,data:i.data})}))}))}async getPendingWindows(){const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return e&&f.default.system.error("Error retrieving pending windows:",e),{err:e,data:t.data}}addUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url},((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}removeUserDefinedComponent(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url},((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,i)=>{t(e,i.data),n({err:e,data:i.data})}))}))}bringWindowsToFront(e={},t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}hyperFocus(e,t=Function.prototype){return f.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.windowList||e.groupName||e.componentType||(e.windowList=[this.myWindowIdentifier]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.hyperFocus",e),t(),Promise.resolve()}minimizeWindows(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&c.default.args(e.groupName,"string"),e.componentType&&c.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.minimizeWindows",e),t(),Promise.resolve()}createWindowGroup(e,t=Function.prototype){return c.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),c.default.args(e.groupName,"string"),new Promise((n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}this.routerClient.query("LauncherService.createWindowGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}addWindowsToGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),c.default.args(e.groupName,"string"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return c.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}getGroupsForWindow(e,t=Function.prototype){return c.default.args(t,"function="),"function"==typeof e&&(t=e,e=null),new Promise((n=>{e&&e.windowIdentifier?this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,i)=>{n({err:e,data:i.data}),t(e,i.data)})):this.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,i)=>{n({err:e,data:i}),t(e,i)}))}))}addToGroups(e,t=Function.prototype){return c.default.args(t,"function="),c.default.args(e.groupNames,"array"),e.windowIdentifier||(e.windowIdentifier=this.myWindowIdentifier),new Promise((n=>{this.routerClient.query("LauncherService.addWindowToGroups",e,((e,i)=>{t(e,i),n({err:e,data:i})}))}))}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){const t=this;if(void 0!==h.FSBL){function n(){t.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${t.windowName}`,((e,n)=>{Array.isArray(n.data)&&t.windowClient.setComponentState({field:"finsemble:windowGroups",value:n.data})}))}h.FSBL.addEventListener("onReady",(()=>{t.windowClient.onReady((()=>{t.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,i)=>{if(!e&&i)return t.addToGroups({groupNames:i},n);n()}))}))}))}setInterval((()=>{t.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName,componentType:"finsemble",isBrowserView:d.System.isBrowserView()})}),1e3),this.getMyWindowIdentifier((n=>{t.myWindowIdentifier=n,e&&e()}))}}let g;function y(e){return(e=e||{}).windowClient||(e.windowClient=u.default),new w({clients:e,onReady(e){f.default.system.debug("launcherClient ready",window.name),f.default.perf.debug("LauncherClientReadyTime","stop"),g.start(e)},name:"launcherClient"})}g=y(),g.constructInstance=y,t.default=g},75729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalLogger=void 0;const{debug:n,warn:i,log:r,error:o}=console,s=()=>{},a=s,u={warn:i,info:s,log:r,debug:n,error:o,verbose:a,deprecated:o},l={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},c={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:l,system:l,perf:l};function d(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=d,this.setting=()=>c,this.callStack=()=>function(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}(),this.unregisterClient=()=>{},this.setRouterClient=()=>{},this.warn=i,this.info=s,this.log=r,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 i=n(51742),r=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 r=this;let l;r.RouterClient=e&&e.RouterClient;let c=!1,d=!1;const f=r;let p,h,m=0,w=0;this.startupTime=0;let g=[];if("undefined"==typeof window)return;let y=i.System.Window.getCurrent().name;window.top!==window&&(y=`${y}.Frame`),this.onLogStateChangeCallback=[];let v={console:a,dev:s,system:s,perf:s};function b(e,t,n){this.category=e,!l&&i.System.isBrowserView()&&(l=i.System.getViewId()),this.logClientName=l?`${y}: view-${l}`:y,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+m}function S(e,t){e&&e.dev&&(v=e,r.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){f.system.debug("Logger updateQueueBasedOnState",e,m,"QUEUE LENGTH",g.length,v);const t=[];for(let n=0,{length:i}=g;n<i;n++)if(v[g[n].category][g[n].logType]&&!v[g[n].category].LocalOnly)e&&(g[n].logTimestamp=g[n].logTimestamp+m),t.push(g[n]);else if(v[g[n].category][g[n].logType]&&v[g[n].category].LocalOnly){const e=g[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}g=t}(t)}function C(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}this.onStateChanged=e=>{-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)},this.setClientName=function(e){console.error("logger.setClientName() is deprecated"),y=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),y},this.clearMessageList=function(){g=[]},this.callStack=function(){return C()},this.setting=function(){return v};const _=console.error,A=console.warn,W=console.info,E=console.log,T=console.debug;function L(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?L(t):t)),[])}function I(e,t){try{e.apply(console,L(t))}catch(e){(t=[]).push(C())}}let O=()=>{g.length>0&&(r.RouterClient.transmit("logger.service.logMessages",g),f.clearMessageList())};function k(e,n,i){let r,o=!1,s=!0;"forceObjectsToLogger"===i[0]&&(o=!0,s=!1,i.splice(0,1)),i=i.map((e=>s&&function(e){const t=[],n=[e];let i=0,r=0;for(;n.length&&r<1e3;){r++;const e=n.pop();if("boolean"==typeof e)i+=4;else if("string"==typeof e)i+=2*e.length;else if("number"==typeof e)i+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return i}(e)>5e4?(I(W,["Message too large to send to the logger.",i]),"Log argument greater than 50KB. Check local Console to see output of the object."):e));try{for(let e=0;e<i.length;e++)i[e]instanceof Error&&(i[e]=i[e].toString());r=new b(e,n,JSON.stringify(i))}catch(t){i.splice(0,i.length),i.push(C()),r=new b(e,n,`*** Logging Error: ${JSON.stringify(i)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(r)?function(e){if(g.length<2e4)g.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",g.length);let e,n=0;for(;e=g.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(r):++w<=5&&I(W,[`"Filtered Logger Message (${w} of first 5 shown)`,r]),d&&O()}function N(){const{windowName:e}=o.Startup.getInstance().getStartupData();y=e,window.top!==window&&(y=`${y}.Frame`);const t=`finsemble.logger.client.${y}`;!l&&i.System.isBrowserView()&&(l=i.System.getViewId()),f.system.debug("logger.service.registering",y),i.System.Window.getCurrent().getOptions((n=>{const i=n?.customData?.component?.centralLoggerNamePrefix;r.RouterClient.query("logger.service.register",{clientName:y,clientChannel:t,windowName:e,viewId:l,centralLoggerNamePrefix:i},((e,t)=>{if(e)setTimeout(N,750);else{for(const e of g)e.viewId=l;d=!0,f.system.debug("logger.service.registered"),p=t.data,"routerService"!==y?(m=h,S(p,!0)):S(p,!1),k("system","Debug",["Logger Registered"]),O()}}))})),r.RouterClient.addListener(t,((e,t)=>{f.system.debug("logger.client.setLogState",t.data),p=t.data,S(p,!1)}))}O=u(O,"routerService"===y?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),v.dev.Error&&!v.dev.LocalOnly&&k("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),I(_,e)},this.warn=function(){if(v.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),v.dev.Warn&&!v.dev.LocalOnly&&k("dev","Warn",e),v.dev.Warn&&v.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),I(A,e))}},this.info=function(){if(v.dev.Info){const e=Array.prototype.slice.call(arguments);v.dev.Info&&!v.dev.LocalOnly&&k("dev","Info",e),v.dev.Info&&v.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),I(W,e))}},this.log=function(){if(v.dev.Log){const e=Array.prototype.slice.call(arguments);v.dev.Log&&!v.dev.LocalOnly&&k("dev","Log",e),v.dev.Log&&v.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),I(E,e))}},this.debug=function(){if(v.dev.Debug){const e=Array.prototype.slice.call(arguments);v.dev.Debug&&!v.dev.LocalOnly&&k("dev","Debug",e),v.dev.Debug&&v.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),I(T,e))}},this.verbose=function(){if(v.dev.Verbose){const e=Array.prototype.slice.call(arguments);v.dev.Verbose&&!v.dev.LocalOnly&&k("dev","Verbose",e),v.dev.Verbose&&v.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),I(T,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),v.system.Error&&!v.system.LocalOnly&&k("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),I(_,e)},this.system.warn=function(){if(v.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),v.system.Warn&&!v.system.LocalOnly&&k("system","Warn",e),v.system.Warn&&v.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),I(A,e))}},this.system.info=function(){if(v.system.Info){const e=Array.prototype.slice.call(arguments);v.system.Info&&!v.system.LocalOnly&&k("system","Info",e),v.system.Info&&v.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),I(W,e))}},this.system.log=function(){if(v.system.Log){const e=Array.prototype.slice.call(arguments);v.system.Log&&!v.system.LocalOnly&&k("system","Log",e),v.system.Log&&v.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),I(E,e))}},this.system.debug=function(){if(v.system.Debug){const e=Array.prototype.slice.call(arguments);v.system.Debug&&!v.system.LocalOnly&&k("system","Debug",e),v.system.Debug&&v.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),I(T,e))}},this.system.verbose=function(){if(v.system.Verbose){var e=Array.prototype.slice.call(arguments);v.system.Verbose&&!v.system.LocalOnly&&k("system","Verbose",e),v.system.Verbose&&v.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),I(T,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(C()),v.perf.Error&&!v.perf.LocalOnly&&k("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),I(_,e)},this.perf.warn=function(){if(v.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(C()),v.perf.Warn&&!v.perf.LocalOnly&&k("perf","Warn",e),v.perf.Warn&&v.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),I(A,e))}},this.perf.info=function(){if(v.perf.Info){const e=Array.prototype.slice.call(arguments);v.perf.Info&&!v.perf.LocalOnly&&k("perf","Info",e),v.perf.Info&&v.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),I(W,e))}},this.perf.log=function(){if(v.perf.Log){const e=Array.prototype.slice.call(arguments);v.perf.Log&&!v.perf.LocalOnly&&k("perf","Log",e),v.perf.Log&&v.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),I(E,e))}},this.perf.debug=function(){if(v.perf.Debug){const e=Array.prototype.slice.call(arguments);v.perf.Debug&&!v.perf.LocalOnly&&k("perf","Debug",e),v.perf.Debug&&v.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),I(T,e))}},this.perf.verbose=function(){if(v.perf.Verbose){const e=Array.prototype.slice.call(arguments);v.perf.Verbose&&!v.perf.LocalOnly&&k("perf","Verbose",e),v.perf.Verbose&&v.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),I(T,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){f.system.debug("logger.service.unregister",y,e,l),O();const n=e||{clientName:y,viewId:l};r.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(),r.RouterClient||(console.log("No instance of the RouterClient found for this instance of the Logger. Dynamically requiring it."),r.RouterClient=n(39319).default);const t=()=>{e=r.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(r.status="online",f.system.debug("Logger onReady",y),r.RouterClient.calibrateTimeWithRouterService((e=>{h=e,c||(r.startupTime=performance.now()-r.startupTime,N(),c=!0)})),r.RouterClient.unsubscribe(e))}))};"routerService"===window.name?r.RouterClient.query("logger.service.register",{},(e=>{e?setTimeout(t,750):t()})):r.RouterClient.onReady(t),i.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{r.unregisterClient()}))}},t.Logger="undefined"!=typeof window?new t.LoggerConstructor:new r.LocalLogger,t.default=t.Logger},2807:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationClient=t.ActionTypes=t.ROUTER_NAMESPACE=void 0;const r=n(52283);Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return r.ActionTypes}});const o=i(n(95320)),s=i(n(12521)),a=i(n(50631)),u=i(n(55016)),l=n(24232),c=n(72669),d=i(n(70010)),f=i(n(95376)),p=i(n(9562)),h=i(n(73014)),m="notification.",w="unsubscribe";t.ROUTER_NAMESPACE={ACTION_PREFIX:"notification.action."};class g extends c._BaseClient{constructor(e){super(e),this.subscriptions=[],this.Notification=o.default,this.ActionTypes=r.ActionTypes,this.Subscription=s.default,this.Action=a.default,this.Filter=u.default,this.actionTypes=r.ActionTypes,this.publicEventManager=new h.default({name:"notificationClient",sourceType:"notification"})}async applyOverrides(){const{data:e}=await d.default.getValue("finsemble.servicesConfig.notifications.applyNotificationOverrides");if(!e)return;const t=f.default.getWindowIdentifier().windowName,{data:n}=await p.default.getActiveDescriptors(),i=Object.keys(n).filter((e=>e===t)).map((e=>n[e]));let r,o="Unknown Source";function s(e,t){const{componentType:n}=f.default.getWindowIdentifier();t.finsembleSource=o,y.notify(JSON.parse(JSON.stringify({title:e,options:t})))}1!==i.length?this.logger.warn("Unable to fetch component to extract type or display name"):(r=i[0],o=r.customData?.component?.displayName||r.componentType);const a=window.Notification;s.requestPermission=a.requestPermission.bind(a),Object.defineProperty(s,"permission",{get:function(){return a.permission}}),window.Notification=s}setup(){window&&window.addEventListener&&window.addEventListener("unload",(()=>{this.unsubscribeAll()}))}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}query(e,t,n,i){return new Promise((async(r,o)=>{try{null==n&&(n=m),this.logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.routerClient.query(n+e,t,(()=>{}));s.err?(this.logger.system.error("Error: ",s.err),o(s.err)):(this.logger.system.log(`${e} raw response: `,s),i&&i(null,s.response.data.data),r(s.response.data.data))}catch(e){this.logger.system.error("Error: ",e),i&&i(e),o(e)}}))}async fetchHistory(e,t){return this.logger.system.info("FetchHistory() called with params: ",e,t),await this.query("fetch_history",{options:e,filter:t})}async getLastIssuedAt(e){return this.logger.system.info("getLastIssued called with params: ",e),await this.query("last_issued",e)}async performAction(e,t){return this.logger.system.info("performAction() called with params: ",e,t),Array.isArray(e)||(e=[e]),await this.query("perform_action",{notifications:e,action:t})}async markRead(e){this.logger.info("markRead() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_read",{notifications:e,isRead:!0})}async markUnread(e){this.logger.info("markUnread() called with params: ",e),Array.isArray(e)||(e=[e]),await this.query("mark_unread",{notifications:e,isRead:!1})}deleteNotifications(e){return this.logger.info("deleteNotifications() called with params: ",e),new Promise((async(t,n)=>{try{t(this.query("delete",e))}catch(e){n(e)}}))}async notify(e){this.logger.system.info("notify() called with params: ",e);try{await this.query("notify",Array.isArray(e)?e:[e])}catch(t){if(!t.includes("No responder"))throw t;await l.sleep(500),await this.notify(e)}}async subscribe(e,t){this.logger.system.info("subscribe() called with params: ",e,t);const n=await this.query("subscribe",JSON.parse(JSON.stringify(e)));return this.logger.system.info("Got a return value containing a channel",n),await this.monitorChannel(n.channel,t),this.subscriptions.push(n),n}async unsubscribe(e){this.logger.system.info("unsubscribe() called with params: ",e),await this.query(w,e),this.cleanupSubscription(e)}removeResponder(e,t){null==t&&(t=m),this.routerClient.removeResponder(t+e)}unsubscribeAll(){this.logger.system.info("unsubscribeAll() called"),this.subscriptions.forEach((e=>{this.query(w,e.id).then(),this.removeResponder(e.id)})),this.subscriptions=[]}async mute(e){return this.logger.system.info("mute() called with params: ",e),await this.query("mute",{filter:e})}async unmute(e){return this.logger.system.info("unmute() called with params: ",e),await this.query("unmute",{filter:e})}async getSources(){return this.logger.system.info("getSources() called"),await this.query("sources",{})}async getMuteFilters(){return this.logger.system.info("getSources() called"),await this.query("mute_filters",{})}async getPreferences(){return this.logger.system.info("getPreferences() called"),await this.query("preferences",{})}cleanupSubscription(e){const t=this.subscriptions.findIndex((t=>t.id===e));t>-1&&(this.removeResponder(this.subscriptions[t].channel),this.subscriptions.splice(t,1))}addResponder(e,t,n){null==n&&(n=m),this.logger.system.info(`Adding responder for endpoint: ${n+e}`),this.routerClient.addResponder(n+e,((n,i)=>{if(this.logger.system.info(`Message received on ${e}: `,i),n)this.logger.system.error(`Failed to setup ${e} responder`,n);else try{this.logger.system.info(`Processing message on channel ${e}: `,i);const n=t(i.data);this.logger.system.info(`Message response on ${e}: `,n),i.sendQueryResponse(null,{status:"success",data:n})}catch(n){this.logger.system.error("Failed to process query",n),i.sendQueryResponse(n)}}))}monitorChannel(e,t){return new Promise((n=>{this.logger.system.info("Listening for messages on channel",e),this.addResponder(e,(e=>{this.logger.system.info("Notification received: ",e.id);try{t(e)}catch(e){this.logger.system.error("Error thrown in the subscription.onNotification()",e)}return{message:"success"}})),n()}))}}t.NotificationClient=g;const y=new g({onReady:function(e){y.applyOverrides(),y.setup(),this.logger.system.log("notificationClient Online"),e()},name:"notificationClient"});t.default=y},40568:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClientConstructor=void 0;const r=i(n(82369)),o=i(n(13712)),s=i(n(73699)),a=n(51742),u=n(72551),l=n(6192),c=n(75729),d=n(50586),f=[];let p=u.Logger;function h(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?h(e[n],null):t[n];return t}t.RouterClientConstructor=function(){let e,t;const n={},i={},u={},m={},w={},g={},y={},v={},b={},S={};let C,_=null,A=!1;const W=[];function E(){this.header={origin:C,type:"initialHandshake"}}function T(e,t){this.header={origin:C,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function L(e){this.header={origin:C,type:"addListener",channel:e}}function I(e,t,n){this.header={origin:C,type:"transmit",channel:e},this.data=t,this.options=n}function O(e){this.header={origin:C,type:"removeListener",channel:e}}function k(e){this.header={origin:C,type:"addResponder",channel:e}}function N(e,t,n){this.header={origin:C,type:"query",queryID:e,channel:t},this.data=n}function R(e,t,n){this.header={origin:C,type:"queryResponse",queryID:e,error:t},this.data=n}function P(e){this.header={origin:C,type:"removeResponder",channel:e}}function M(e,t){this.header={origin:C,type:"subscribe",subscribeID:e,topic:t}}function F(e,t){this.header={origin:C,type:"unsubscribe",subscribeID:e,topic:t}}function D(e,t){this.header={origin:C,type:"publish",topic:e},this.data=t}function x(e,t,n,i){this.header={origin:C,type:"notify",subscribeID:e,topic:t,error:n},this.data=i}function j(e,t,n){this.header={origin:C,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:C,type:"removePubSubResponder",topic:e}}function $(e){_?_.send(e):(p.system.info("RouterClient: Queuing message since router initialization not complete",e),f.push(e))}function H(){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 R(this.header.queryID,e,t))}function q(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=H,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 V(e,t){if(e)p.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{m[this.header.topic]=t;const n=g[this.header.topic];if(void 0!==n)for(let i=0;i<n.length;i++)p.system.info("RouterClient: sending pubsub notify","TOPIC",this.header.topic,"NOTIFY DATA",t),$(new x(n[i],this.header.topic,e,t))}}function z(e,t){var n,i,r;(function(e){let t=!1;return void 0===e&&(t=!0),t})(t)||$(new x(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=g,i=this.header.topic,r=this.header.subscribeID,i in n?n[i].push(r):n[i]=[r],p.system.info("RouterClient: incoming subscription added","TOPIC",this.header.topic,"MESSAGE",this))}function G(){!function(e,t,n){let i=!1;if(t in e){const r=g[t];for(let o=0;o<r.length;o++)if(n===r[o]){r.splice(o,1),0===r.length&&delete e[t],i=!0,p.system.info("RouterClient: PubSub removeListener","TOPIC",t,"FROM",n);break}}i||p.system.warn(`RouterClient: tried to remove non-existent listener on ${t} from ${JSON.stringify(n)}`)}(g,this.header.topic,this.header.subscribeID)}function Y(r){switch(p.system.verbose("Incoming Message Type",r.header.type,r),r.header.type){case"transmit":!function(e,t){const n=e[t.header.channel]||[],i=[];if(Array.isArray(n)&&0!==n.length){t.originatedHere=H,n.forEach((e=>{i.push(e)}));for(let e=0;e<i.length;e++)p.isLogMessage(t.header.channel)||p.system.info("RouterClient: incoming transmit","CHANNEL",t.header.channel,"FROM",t.header.origin,"MESSAGE",t),i[e](null,t)}else p.system.warn(`RouterClient: no listener for incoming transmit on channel ${t.header.channel} from ${t.header.origin}`,t)}(n,r);break;case"query":q(i,r);break;case"queryResponse":!function(e,t){const n=e[t.header.queryID];void 0===n?p.system.warn("RouterClient: no handler for incoming query response","QUERY ID",t.header.queryID):(function(e,t){const n=e[t];void 0!==n&&clearTimeout(n)}(S,t.header.queryID),t.header.error?(p.system.debug("RouterClient: incoming queryResponse error",t.header,"QUERY ID",t.header.queryID),n(t.header.error,t)):(p.system.info("RouterClient: incoming query response","RESPONSE MESSAGE",t,"QUERY ID",t.header.queryID),n(null,t)),delete e[t.header.queryID])}(b,r);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=H,p.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(y,r);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in w)if(w[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=V,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)))}(r);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 w)if(w[n].test(e.header.topic)){t=u[n];let i=m[e.header.topic];void 0===i&&(i=m[n]),m[e.header.topic]=i;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=m[e.header.topic],t.subscribeCallback(null,e)):e.sendNotifyToSubscriber(null,m[e.header.topic]))}(r);break;case"unsubscribe":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in w)if(w[n].test(e.header.topic)){t=u[n];break}void 0===t?p.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e):(e.removeSubscriber=G,t.unsubscribeCallback?(p.system.info("RouterClient: incoming unsubscribe callback","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),t.unsubscribeCallback(null,e)):(p.system.info("RouterClient: incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),e.removeSubscriber()))}(r);break;case"timeCalibration":const o=()=>{t?t(r):setTimeout((()=>{o()}),10)};o();break;case"initialHandshakeResponse":e()}}function K(e,t){t.header.lastClient=C,t.header.incomingTransportInfo=e,Y(t)}this.startupTime=0,this.notificationURL="";const J=(t,n,i)=>{let o,a;p.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,l,c,d,h=!1,m=0;const w=t=>{a=0,p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),_=t,e=d,c(),o=setInterval(c,200)};u=e=>{p.system.error("RouterClientError",e)};const g=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),r.default.getTransport(t,n,K,C,"RouterService").then(w).catch(u)};l=()=>{if(clearInterval(o),m++,m<=3)p.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",m,t),g();else{const e="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";p.system.error(e,t),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",e,{url:this.notificationURL})}},c=()=>{p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),$(new E),a++>50&&l()},d=()=>{if(!h){if(p.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${C} with transport ${_.identifier()}`),h=!0,clearInterval(o),f)for(let e=0;e<f.length;e++){p.system.debug("RouterClient: firing queued msg");const t=f[e];_.send(t)}i&&i()}},g()};function Q(){return`${C}.${d.v4()}`}function X(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}this.calibrateTimeWithRouterService=function(e){let n,i=0,r=1/0;t=function(t){i++,i>5?function(t){let i=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<r&&(r=s,n=a),i+=a,p.system.debug("calibrationCalculation Intermediate Values","lastRRT",s,"lastOffset",a,"fastestOffset",n,"fastestRRT",r)}i/=4,p.system.debug("RouterClient calibrationCalculation","Average Offset",i,"Chosen FastestOffset",n,t),e(n)}(t):(t.clientBaseTime.push(l.Globals.performance.timing.navigationStart+l.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()};A?n():W.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 i=!1;const r=e[t];return void 0===r||0===r.length?(e[t]=[n],i=!0):r.push(n),i}(n,e,t)&&$(new L(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 I(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 i=!1;const r=e[t];if(void 0!==r){const e=r.indexOf(n);e>-1?(r.splice(e,1),0===r.length&&(i=!0)):p.system.warn(`no listener defined for channel: ${t}`)}return i}(n,e,t)&&$(new O(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 i=!1;return void 0===e[t]&&(e[t]=n,i=!0),i}(i,e,t))$(new k(e));else{const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;p.system.warn(n),t(n,null)}},this.query=(e,t,n,i)=>{const r=`${Q()}.${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",r,{timestamp:s,navstart:a,timenow:u}),i||(i=n,n={timeout:2e4}),o.default.args(e,"string",t,"any=",n,"object=",i,"function"),n=n||{},o.default.args2("params.timeout",n.timeout,"number"),new Promise((function(o){b[r]=(l,c)=>{o({err:l,response:c}),"function"==typeof i?i(l,c):p.system.warn("No response event handler passed to RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",r,{timestamp:s,navstart:a,timenow:u})},l.Globals.runningInFSBLUnitTest||function(e,t,n,i){i>0&&(e[t]=setTimeout((()=>{p.system.warn(`RouterClient: timeout waiting on query response on channel ${n} for queryID ${t} on timer ${e[t]} timeout=${i}`)}),i))}(S,r,e,n.timeout),$(new N(r,e,t))}))},this.removeResponder=e=>{p.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),X(i,e)&&$(new P(e))},this.addPubSubResponder=(e,t,n,i)=>{let r,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 j(e.toString(),t,!0)),s="success"):!function(e,t,n,i){let r=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(w[e.toString()]=e,p.system.info(`RouterClient: PubSub RegEx added for topic ${e.toString()}`)),u[e.toString()]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:i},r=!0),r}(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)?(r=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,p.system.error(r)):(t=t||{},m[e.toString()]=h(t),$(new j(e.toString(),t,!1)),s="success"),i&&i(r,s)},this.removePubSubResponder=e=>{p.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any"),X(u,e)?(delete m[e.toString()],delete w[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=Q();return function(e,t,n,i){e[t]=n,v[t]=i}(y,n,t,e),$(new M(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 D(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}(y,e.subscribeID)?p.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):$(new F(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 O(e)),delete n[e];for(const e in i)p.system.debug(`RouterClient.disconnectAll is removing responder on ${e}`),$(new P(e)),delete i[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 m[e.toString()],delete w[e.toString()];for(const e in y){const t=v[e];p.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),$(new F(e,t)),delete y[e],delete v[e]}},this.start=e=>new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return p.warn(e),t(e)}this.started=!0,p=new c.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(p=new c.LocalLogger),C=`RouterClient.${e.windowName}.${d.v4()}`;const n=`"RouterClient Check: connecting new client for ${C}`;p.system.debug(n),console.debug(n),J(e,e.transportName,(()=>{!function(){for(p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),A=!0;W.length>0;)p.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked"),W.shift()()}(),t(null)}))})),this.stop=()=>{this.disconnectAll(),r.default.close(),this.started=!1}}},39319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const i=n(40568),r=n(72551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",i.RouterClientConstructor),r.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(40568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},63862:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const r=i(n(42169)),o=i(n(13712)),s=i(n(72551)),a=n(72669),u=n(24232),l=r.default(1);class c extends a._BaseClient{constructor(){super(...arguments),this.clientReady=!1,this.delete=this.remove}setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function="),this.routerClient.query("Storage.setUser",{user:e.user},((n,i)=>{(n?s.default.system.error:s.default.system.info)("APPLICATION LIFECYCLE:StorageClient.setUser",e,n,i),t&&t(n,i.data)}))}setStore(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t),this.routerClient.query("Storage.setStore",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.setStore",e,n),t&&t(e,n.data)}))}save(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,i)=>{o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function="),this.routerClient.query("Storage.save",e,((e,r)=>{(e?s.default.system.error:s.default.system.info)("Storage.save",e,r),t&&t(e,r.data),e?i({err:e,data:null}):n({err:e,data:r.data})}))}))}save1(e){return l((()=>this.save(e)))}get(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,i)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.get",e,((e,r)=>{if(e)return s.default.system.error("Storage.get",e,r),t&&t(e,r?r.data:null),i(e,r?r.data:null);s.default.system.info("Storage.get",e,r),t&&t(e,r.data),n(r.data)}))}))}get1(e,t){return l((()=>this.get(e,t)))}keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t),this.routerClient.query("Storage.keys",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.keys",e,n),t&&t(e,n.data)}))}keys1(e){return l((()=>u.promisify(this.keys.bind(this))(e)))}getMultiple(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t),this.routerClient.query("Storage.getMultiple",e,((n,i)=>{(n?s.default.system.error:s.default.system.info)("StorageClient.getMultiple:",e,i),t&&t(n,i)}))}remove(e,t){return this.clientReady||s.default.system.error("storageClient invoked before ready"),new Promise(((n,i)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.delete",e,((e,r)=>{(e?s.default.system.error:s.default.system.info)("StorageClient.delete",e,r),t&&t(e,r.data),e?i({err:e,data:null}):n({err:e,data:r.data})}))}))}remove1(e){return l((()=>this.remove(e)))}clearCache(e){s.default.system.log("StorageClient.clearCache",e),this.routerClient.query("Storage.clearCache",null,((t,n)=>{(t?s.default.system.error:s.default.system.info)("StorageClient.clearCache",t,n),e&&e(t,n.data)}))}}t.StorageClient=c;var d=new c({onReady(e){e&&e(),d.clientReady=!0},name:"storageClient"});t.default=d},95376:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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=s(n(63862)),l=s(n(68718)),c=o(n(76420)),d=n(51742),f=n(72669),p=s(n(72551)),h=s(n(13712)),m=n(75688),w=n(33998),g=s(n(39319)),y=n(78379),v=s(n(70010)),b=n(24232),S=n(80089);let C;function _(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}class A extends f._BaseClient{constructor(e){super(e),this.showAtMousePosition=function(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())},h.default.args(e,"object=")&&e&&h.default.args2("params.onReady",e.onReady,"function="),this.options={},this.windowHash="",this.title=null,this.toolbarBottom=40,this.containers=[],this.componentState={},this.windowState="normal",this.hasHeader=!1,this.enableWindowsAeroSnap=!1,this.bindFunctions(),this.minimizeWithDockedWindows=this.minimize}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this),this.cacheInitialBounds=this.cacheInitialBounds.bind(this),this._setHeaderHeight=this._setHeaderHeight.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){this.setActive(!1)}onWindowFocused(){this.setActive(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",C.name),C.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:C.name}),C.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?FSBL.Clients.Logger.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes(this.getWindowNameForDocking()))))}close(e,t=(()=>{})){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=C;if(e.userInitiated&&n)return n.close(e,t);C.close(e,t)}getWindowHash(){return this.windowHash}getWindowTitle(){return this.title}retrieveMonitorDimensions(e=Function.prototype){c.getMonitor(null,(t=>{C.updateOptions({options:{monitorDimensions:t.monitorRect}}),e&&e(t.monitorRect)}))}listenForHashChanges(){d.System.hasBrowserView()||(C.updateOptions({url:window.top.location.href},(()=>{})),function(e){const{pushState:t}=e;e.pushState=function(n){"function"==typeof e.onpushstate&&e.onpushstate({state:n}),t.apply(e,arguments),C.updateOptions({url:window.top.location.href},(()=>{}))};const{replaceState:n}=e;e.replaceState=function(t){"function"==typeof e.onreplacestate&&e.onreplacestate({state:t}),n.apply(e,arguments),C.updateOptions({url:window.top.location.toString()})}}(window.history),window.addEventListener("hashchange",(()=>{C.updateOptions({url:window.top.location.toString()},(()=>{}))})))}getInitialOptions(e){this.isInAService?(this.options={},p.default.system.debug("WindowClient:getting options empty",this.options),e()):C.getOptions(((t,n)=>{t&&(n={}),C.windowOptions=n,this.options=n,p.default.system.debug("WindowClient:getting options",this.options),e()}))}cacheInitialBounds(e){if(d.System.hasBrowserView())return e();this.cacheBounds((()=>{try{if(!C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState)return e();C.updateOptions({options:{url:window.top.location.toString()}})}catch(e){p.default.system.warn('customData.foreign.components["Window Manager" is undefined')}e()}))}setInitialWindowBounds(e){p.default.system.warn("`FSBL.Clients.WindowClient.setInitialWindowBounds is deprecated and will be removed in a future version of finsemble. Use 'getInitialOptions' and 'cacheInitialBounds' instead."),a.parallel([this.getInitialOptions,this.cacheInitialBounds],e)}getWindowBounds(){return{top:C.windowOptions.defaultTop,left:C.windowOptions.defaultLeft,width:C.windowOptions.defaultWidth,height:C.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(p.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),h.default.args(e,"object")&&h.default.args2("bounds.top",e.top,"number"),e){C.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{C.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}minimize(e){this.cacheBounds((()=>{C.minimize(null,(t=>{t&&p.default.system.error("WindowClient:minimize",t),e&&e(t)}))}))}setAlwaysOnTop(e,t){C.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e=(()=>{})){C.restore(null,(t=>{t&&p.default.system.error("WindowClient:restore",t),e(t)}))}cacheBounds(e){this.getBounds(((t,n)=>{if(t)return e(),console.warn("Get bounds error.",t,"Window may not be registered with the window service");C.updateOptions({options:{cachedLeft:n.left,defaultLeft:n.left,cachedTop:n.top,defaultTop:n.top,cachedWidth:n.width,defaultWidth:n.width,cachedHeight:n.height,defaultHeight:n.height}}),e&&e(n)}))}maximize(e){C.maximize(),e()}removeFinWindowEventListeners(){C.removeEventListener("maximized",this.onWindowMaximized),C.removeEventListener("restored",this.onWindowRestored),C.removeEventListener("blurred",this.onWindowBlurred),C.removeEventListener("focused",this.onWindowFocused),C.removeEventListener("close-requested",this.close),C.removeEventListener("minimized",this.onWindowMinimized)}injectDOM(e){if(p.default.system.debug("injectDOM",e),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div");t.innerHTML=`<div id="FSBLHeader"${e?` style=height:${e}`:""}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){if(e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),h.default.args(e,"object",t,"function"),C)return C.getComponentState(e,t);p.default.system.warn("Attempt to use getComponentState before component is ready or in a service"),e.windowName||(e.windowName=window.name);const n=this.getContainerHash(e.windowName);u.default.get({topic:y.WORKSPACE.CACHE_STORAGE_TOPIC,key:n},((n,i)=>{if(n)return p.default.system.error("Error retrieving window client's component state."),void t(n);const r=i;if(i&&e.field)this.componentState=r||{},t(n,r[e.field]);else{if(e.fields){const n={};for(let t=0;t<e.fields.length;t++)r[e.fields[t]]&&(n[e.fields[t]]=r[e.fields[t]]);return t(null,n)}if(i)return t(null,r);p.default.system.info("WindowClient:getComponentState:error, response, params",n,i,e),t("Not found",i)}}))}async setComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),C?C.setComponentState(e,t):this.isInAService?(t("Cannot call setComponentState in a service."),Promise.resolve()):(t("Cannot call setComponentState. The window may not be ready"),Promise.reject("The window is not yet ready to save state."))}async removeComponentState(e,t=(()=>{})){return h.default.args(e,"object",t,"function=")&&h.default.args2("params.field",e.field,"string"),(C||await m.FinsembleWindow.getInstance({name:e.windowName||window.name})).removeComponentState(e,t)}getWindowNameForDocking(){const e=C.parentWindow;return e?e.name:C.name}getContainerHash(e){return c.camelCase(this.windowHash,e)}formGroup(){C.formGroup()}registerWithDockingManager(e,t){C.parentWindow&&(p.default.system.debug("registerWithDockingManager ignore registration request if has a parent"),t&&t());const n=C.name,{uuid:i}=C;this.startedRegistrationWithDocking=!0,this.routerClient.query("DockingService.registerWindow",{name:n,uuid:i,options:e||{},windowType:"WebWindow"},(()=>{this.startedRegistrationWithDocking=!1,this.deregisterPlease&&(this.deregisterWithDockingManager(),this.deregisterPlease=!1),p.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete."),t&&t()}))}deregisterWithDockingManager(e){this.startedRegistrationWithDocking&&(this.deregisterPlease=!0);const t=C.name;this.routerClient.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})}bumpFixedElements(e){if("complete"!==document.readyState)return setTimeout((()=>{this.bumpFixedElements(e)}),100);if(!e)return;let{absolute:t,fixed:n,bumpBy:i}=e;if(!t&&!n)return;const r=document.getElementById("FSBLHeader");if(!r||0===r.children.length||!r.children[0].clientHeight)return setTimeout((()=>{this.bumpFixedElements(e)}),100);"auto"===i?i="0px":-1===new String(i).indexOf("px")&&(i=`${i}px`);const o=document.body.getElementsByTagName("*"),s=o.length;for(let e=0;e<s;e++){if("FSBLHeader"===o[e].id||o[e].classList.contains("fsbl-header"))continue;const r=window.getComputedStyle(o[e],null),s=["0","0px",0],a=r.getPropertyValue("top");t&&o[e].parentNode===document.body&&"absolute"==r.getPropertyValue("position")&&("all"==t?o[e].style.top=`calc(${a} + ${i})`:"0Positioned"==t&&s.includes(a)&&(o[e].style.top=i)),n&&"fixed"==r.getPropertyValue("position")&&("all"==n?o[e].style.top=`calc(${a} + ${i})`:"0Positioned"==n&&s.includes(a)&&(o[e].style.top=i))}}bringWindowToFront(){C.bringToFront({forceFocus:!0},(e=>{e?p.default.system.error(`WindowClient.bringWindowToFront: failure:${e}`):p.default.system.info("WindowClient.bringWindowToFront: success")}))}injectStylesheetOverride(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(C.windowOptions.customData.cssOverride)),document.body.appendChild(e)}checkIfChildApp(){if(C.windowOptions&&C.windowOptions.customData&&C.windowOptions.customData.parentUUID&&C.windowOptions.customData.parentUUID!==d.System.Application.getCurrent().uuid){const e=d.System.Application.wrap(C.windowOptions.customData.parentUUID);e.addEventListener("crashed",this.close.bind(null,!1)),e.addEventListener("initialized",this.close.bind(null,!1)),e.addEventListener("out-of-memory",this.close.bind(null,!1))}}preventUnintendedDropEvents(){function e(e){e.preventDefault()}window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&g.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,d.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&g.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,d.System.Window.getCurrent().updateOptions({resizable:!1}))};FSBL&&l.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){FSBL&&l.default.onReady((()=>{l.default.addBrowserHotkey(["ctrl","r"],C.reload)}))}addListeners(e=Function.prototype){this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),C.addListener("setParent",(()=>{p.default.system.info("WindowClient.setParent deregisterWithDockingManager"),this.deregisterWithDockingManager()})),C.addEventListener("maximized",this.onWindowMaximized),C.addEventListener("minimized",this.onWindowMinimized),C.addEventListener("restored",this.onWindowRestored),C.addEventListener("blurred",this.onWindowBlurred),C.addEventListener("focused",this.onWindowFocused),e()}updateHeaderState(e,t){this.commandChannel&&this.commandChannel(e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){C.ejectFromGroup()}setWindowTitle(e){p.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){h.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),C.setTitle(e)}getSpawnData(){if(!this.options.customData)return{};const{spawnData:e}=this.options.customData;return void 0===e?{}:e}getCurrentWindow(){return d.System.Window.getCurrent()}async getDesktopBoundingBox(e){let t=e;"string"==typeof e&&(t=document.querySelector(e));const n=t.getBoundingClientRect(),i=await C.getBounds(),r=i.data;let o,s;i.err?(o=this.options.defaultTop,s=this.options.defaultLeft):(o=r.top,s=r.left);const a={top:o+n.top,left:s+n.left,width:n.width,height:n.height,right:0,bottom:0};return a.right=a.left+a.width,a.bottom=a.top+a.height,a}isPointInBox(e,t){return t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top}isMouseOverDOMElement(e,t){this.getDesktopBoundingBox(e).then((e=>{d.System.getMousePosition(((n,i)=>{t(this.isPointInBox(i,e))}))}))}getWindowIdentifier(){var e=null;return this.options&&this.options.customData&&this.options.customData.component&&(e=this.options.customData.component.type),{windowName:C?C.name:window.name,uuid:C?C.uuid:null,componentType:e}}setActive(e){var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):_(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(_(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")}getBounds(e){C.getBounds(((t,n)=>{e(t,n)}))}setShape(e,t=Function.prototype){C.setShape(e,t)}startTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.startTilingOrTabbing",e),t()}startMovingWindow(e){d.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){d.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t=Function.prototype){console.debug("CancelTilingOrTabbing"),g.default.transmit("DockingService.cancelTilingOrTabbing",e),t()}sendIdentifierForTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.identifierForTilingOrTabbing",e),t()}stopTilingOrTabbing(e,t=Function.prototype){const n=()=>{g.default.query("DockingService.stopTilingOrTabbing",e,(()=>{t()})),g.default.transmit("DockingService.stopTilingOrTabbing",e)};return e.mousePosition?(n(),e.allowDropOnSelf?void 0:t()):d.System.getMousePosition(((i,r)=>{if(e.mousePosition=r,n(),!e.allowDropOnSelf)return t()}))}getStackedWindow(e,t){if(p.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!C.parentWindow&&e.create){const n=e=>{const{parentName:i}=e.data;C.setParent({windowName:i},((e,n)=>{t?.(e,n)})),C.removeListener("parent-set",n)};C.addListener("parent-set",n),FSBL.Clients.LauncherClient.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{p.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&t?.(e,null)}))}else C.getParent(t)}getMonitorInfo(e,t){c.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data)}))}))}fitToDOM(e,t){let n=document.documentElement.offsetHeight,i=this.options.width;"function"==typeof e&&(t=e,e=null),e&&e.padding&&(e.padding.height&&(n+=e.padding.height),e.padding.width&&(i+=e.padding.width)),e&&e.maxHeight&&n>e.maxHeight&&(n=e.maxHeight),p.default.system.debug("WindowClient.FitToDOM:newHeight",n,e),this.getMonitorInfo({},((e,r)=>{r&&(n>=r.availableRect.height&&(n=r.availableRect.height),i>=r.availableRect.width&&(i=r.availableRect.width)),p.default.system.debug("WindowClient.FitToDOM:fixBounds",n,i),C.getBounds(((e,r)=>{r.width!=i||r.height!=n?(r.width=i,r.height=n,C.setBounds({bounds:r},t)):"function"==typeof t&&t()}))}))}_setHeaderHeight(e){let t=document.getElementsByClassName("fsbl-header")[0];if(!t)return setTimeout((()=>{this._setHeaderHeight(e)}),100);let n=window.getComputedStyle(t,null).getPropertyValue("height");document.body.style.marginTop=n,e.bumpElements&&"auto"===e.bumpElements.bumpBy&&(e.bumpElements.bumpBy=n),this.bumpFixedElements(e.bumpElements)}async start(e=Function.prototype){if(h.default.args(e,"function"),b.iAmAServiceWindow())return this.isInAService=!0,e();setInterval((()=>{C&&document?.title&&this.title!==document.title&&(!FSBL.System.isBrowserView&&FSBL.System.hasBrowserView||this.setWindowTitlePrivate(document.title))}),200);const t=this;await v.default.getValue("finsemble");let n=null,i=!1,r=!1,o=!1;this.componentState={},(e=>{m.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{if(p.default.system.debug(`FinsembleWindow.getInstance ${this.finWindow?.name}`),"Cannot Wrap Service Manager or Services"==t)return this.isInAService=!0,this.windowHash=c.camelCase("activeWorkspace",window.name),e();!t&&n||p.default.system.error("wrap failure",t),this.finsembleWindow=n,({finsembleWindow:C}=this),this.windowHash=c.camelCase("activeWorkspace",C.name),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),e()}))})((()=>{this.retrieveMonitorDimensions(),this.getInitialOptions((()=>{if(!C||!C.windowOptions)return this.isInAService||p.default.system.error("Something went wrong attempting to get the current window."),e();({customData:n}=C.windowOptions),p.default.system.debug("getInitialOptions",n),n&&(i=S(n,"window.compound",!1),n.cssOverride&&(p.default.system.debug("Window has cssOverride. See local window to inspect object"),r=!0),o=!i&&S(n,["foreign","components","Window Manager","FSBLHeader"],!1)),a.parallel([function(e){r&&t.injectStylesheetOverride(),e()},function(e){v.default.getValue("finsemble",((n,i)=>{n&&p.default.system.error("Error reading windowService config from finsemble");const r=i.services.windowService.config.enableWindowsAeroSnap;t.enableWindowsAeroSnap=w.ConfigUtilInstance.getDefault(i,"config.servicesConfig.docking.enableWindowsAeroSnap",r),e()}))},function(e){if(d.System.isBrowserView())e();else{if(!n||!n.component||b.iAmAServiceWindow())return e();{let i=w.ConfigUtilInstance.getDefault(n,"customData.foreign.services.windowService.manageWindowMovement",!1);i||(i=w.ConfigUtilInstance.getDefault(n,"customData.foreign.services.dockingService.manageWindowMovement",!1));const r=w.ConfigUtilInstance.getDefault(n,"customData.foreign.components.Window Manager.FSBLHeader",!1),o=w.ConfigUtilInstance.getDefault(n,"customData.window.dockable",!1);i=i||r||o;let s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangable"},null);if(null===s&&(s=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangeable"},i)),!i&&!s)return e();if(n.window.allowAutoArrange=s,n.window.snapping=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowSnapping",oldValue:"ignoreSnappingRequests"},i),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreSnappingRequests&&(n.window.snapping=!n.foreign.services[e].ignoreSnappingRequests)}if(w.ConfigUtilInstance.getDefault(n,"customData.window.ephemeral",!1)&&!n.window.snapping&&(n.window.snapping=!1),n.window.tiling=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTiling",oldValue:"ignoreTilingAndTabbingRequests"},i),n.window.tabbing=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTabbing",oldValue:"ignoreTilingAndTabbingRequests"},i),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreTilingAndTabbingRequests&&(n.window.tiling=!n.window.tiling,n.window.tabbing=!n.window.tabbing)}n.window.canGroup=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowGrouping",oldValue:"canGroup"},i),n.window.canMinimize=b.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowMinimize",oldValue:"canMinimize"},void 0),void 0===n.window.canMinimize&&(n.window.canMinimize=n.component.canMinimize,void 0===n.window.canMinimize&&(n.window.canMinimize=i)),void 0===n.window.canMaximize&&(n.window.canMaximize=n.component.canMaximize,void 0===n.window.canMaximize&&(n.window.canMaximize=i)),n.window.overwriteStartDocked=w.ConfigUtilInstance.getDefault(n,"customData.foreign.services.workspaceService.global",!1),t.registerWithDockingManager(n.window,(()=>{t.cacheInitialBounds(e)}))}}}],((t,n)=>e(t,n)))}))}))}}var W=new A({startupDependencies:{clients:["storageClient"]},onReady(e){W.start(e)},name:"windowClient"});t.default=W},6008:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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(72669),u=o(n(76420)),l=s(n(13712)),c=s(n(72551)),d=n(78379),f=n(33998),p=s(n(73014));class h extends a._BaseClient{constructor(e){super(e),this.workspaces=[],this.setWorkspaces=this.setWorkspaceOrder,this.createNewWorkspace=this.createWorkspace,this.getWorkspaceDefinition=this.export,this.addWorkspaceDefinition=this.import,this.saveWorkspaceTemplateToConfigFile=this.exportToFile,l.default.args(e,"object=")&&e&&l.default.args2("params.onReady",e.onReady,"function="),this.publicEventManager=new p.default({name:"workspaceClient",sourceType:"workspace"})}_serviceResponseHandler(e,t,n,i,r=Function.prototype){if(e)return i(new Error(e)),r(e);t||(t={data:null}),n(t.data),r(null,t.data)}addEventListener(e,t){this.publicEventManager.addEventListener(e,t)}removeEventListener(e,t){this.publicEventManager.removeEventListener(e,t)}async addWindow(e,t=null){l.default.args(e,"object",t,"function=")&&e&&l.default.args2("params.name",e.name,"string");const{err:n,response:i}=await this.routerClient.query("WorkspaceService.addWindow",e,(()=>{}));if(c.default.system.log(`WORKSPACE LIFECYCLE: Window added:WorkspaceClient.addWindow: Name (${e.name})`),t&&t(n,i),!t&&n)throw n;return i}removeWindow(e,t=Function.prototype){l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),this.routerClient.query("WorkspaceService.removeWindow",e,((n,i)=>{if(n)return c.default.system.error(n);c.default.system.log(`WORKSPACE LIFECYCLE:WorkspaceClient.removeWindow:Window removed: Name (${e.name})`),t(n,i?i.data:null)}))}autoArrange(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{},u.getMyWindowIdentifier((e=>{this.routerClient.query("DockingService.autoArrange",{windowIdentifier:e},t)}))}minimizeAll(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.minimizeAll",e,t)}))}bringWindowsToFront(e,t=Function.prototype){l.default.args(e,"object",t,"function="),e=e||{monitor:"all"},u.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("WorkspaceService.bringWindowsToFront",e,t)}))}async getActiveWorkspace(e){if(c.default.system.debug("WorkspaceClient.getActiveWorkspace"),this.activeWorkspace)return c.default.system.info("WorkspaceClient.getActiveWorkspace - returning from cache"),e&&e(null,{data:this.activeWorkspace}),{data:this.activeWorkspace};const{response:t}=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE,{});if(this.activeWorkspace=t.data,t.data.err)throw e&&e(t.data.err),new Error(t.data.err);return e&&e(null,{data:t.data??{}}),{data:t.data}}getWorkspaces(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaces"),new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}getWorkspaceActions(e){return e(null,d.WORKSPACE.API_CHANNELS)}getWorkspaceNames(e){return l.default.args(e,"function="),c.default.system.debug("WorkspaceClient.getWorkspaceNames"),this.workspaces?(c.default.system.info("WorkspaceClient.getWorkspaceNames - returning from cache"),Promise.resolve(this.workspaces)):new Promise((async(t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WORKSPACE_NAMES,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}setWorkspaceOrder(e,t){const{workspaces:n}=e;return l.default.args(t,"function"),c.default.system.debug("WorkspaceClient.setWorkspaceOrder",e),new Promise(((i,r)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WORKSPACE_ORDER,n||e,((e,n)=>{this._serviceResponseHandler(e,n,i,r,t)}))}))}remove(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&!e.name&&!e.workspace&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.remove",e),new Promise((async(n,i)=>{e.name||(e.name=e.workspace?.name,delete e.workspace);const r=(await this.getActiveWorkspace()).data;if(e.name===r.name){c.default.system.error(`APPLICATION LIFECYCLE: Cannot remove active workspace: WorkspaceClient.remove:attempt to remove active workspace name:${r.name}`);const e="Cannot remove active workspace";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.REMOVE,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}rename(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.oldName",e.oldName,"string","params.newName",e.newName,"string"),c.default.system.debug("WorkspaceClient.rename",e),new Promise(((n,i)=>{if(!e.overwriteExisting&&this.workspaceExists(e.newName)){const e="Workspace Already Exists";return this._serviceResponseHandler(e,null,n,i,t)}this.routerClient.query(d.WORKSPACE.API_CHANNELS.RENAME,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}clone(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),delete e.name,e.newName||(e.newName=`${e.name}_clone`),e.removeOldWorkspace=!1,this.rename({removeOldWorkspace:!1,newName:e.newName,oldName:e.name},t)}save(e=Function.prototype){return c.default.system.debug("WorkspaceClient.save"),new Promise(((t,n)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE,{},((i,r)=>{this._serviceResponseHandler(i,r,t,n,e)}))}))}workspaceExists(e){return l.default.args(e,"string"),this.workspaces.indexOf(e)>-1}saveAs(e,t=Function.prototype){return l.default.args(e,"object",t,"function=")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.saveAs",e),new Promise(((n,i)=>{if(!e.force&&this.workspaceExists(e.name))return this._serviceResponseHandler("Workspace Already Exists",null,n,i,t);this.routerClient.query(d.WORKSPACE.API_CHANNELS.SAVE_AS,e,((e,r)=>{this._serviceResponseHandler(e,r,n,i,t)}))}))}async switchTo(e,t=Function.prototype){l.default.args(e,"object",t,"function")&&l.default.args2("params.name",e.name,"string"),c.default.system.debug("WorkspaceClient.switchTo",e);const n=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.SWITCH_TO,e);if(n.err)throw t(n.err,null),new Error(n.err);return t(n),n}async _setWindowState(e){if(!this.activeWorkspace)throw"Workspace is not yet ready";if(!this.activeWorkspace.windows.includes(e.windowName))throw"Cannot set state for Window not in workspace";return c.default.system.debug("WorkspaceClient.setWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.SET_WINDOW_STATE,e)}async _getWindowState(e){return c.default.system.debug("WorkspaceClient.getWindowData",e),this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_WINDOW_STATE,e)}async isWorkspaceDirty(e=Function.prototype){l.default.args(e,"function"),c.default.system.debug("WorkspaceClient.isWorkspaceDirty");const{err:t,response:n}=await this.routerClient.query(d.WORKSPACE.API_CHANNELS.GET_ACTIVE_WORKSPACE_DIRTY,{},(()=>{}));return e(t,n),n.data}async createWorkspace(e,t,n=((e,t)=>{e&&(c.default.system.error(`Error creating workspace: ${e}`),c.default.system.info(`Result from create workspace: ${t}`))})){c.default.system.log(`WorkspaceClient: Creating Workspace Request for name "${e}"`);const i=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.NEW_WORKSPACE,{workspaceName:e})).response.data;!1!==t.switchAfterCreation&&await this.switchTo({name:i});const r={workspaceName:i};return n(null,r),r}export(e,t){return l.default.args(e,"object",t,"function")&&l.default.args2("params.workspaceName",e.workspaceName,"string"),c.default.system.debug("WorkspaceClient.export",e),new Promise(((n,i)=>{this.routerClient.query(d.WORKSPACE.API_CHANNELS.EXPORT,e,((r,o)=>{const s={};s[e.workspaceName]=o.data,this._serviceResponseHandler(r,{data:s},n,i,t)}))}))}async import(e,t){l.default.args(e,"object",t,"function=")&&l.default.args2("params.workspaceJSONDefinition",e.workspaceJSONDefinition,"object"),c.default.system.debug("WorkspaceClient.import",e);const n=(await this.routerClient.query(d.WORKSPACE.API_CHANNELS.IMPORT,e)).response.data;if(n&&n.err)throw t(n.err),new Error(n.err);return t&&t(null,n),n}exportToFile(e){c.default.system.info("workspaceClient.saveWorkspaceTemplateToConfigFile",e),l.default.args(e,"object")&&l.default.args2("params.workspaceTemplateDefinition",e.workspaceTemplateDefinition,"object");const{workspaceTemplateDefinition:t}=e;if("object"==typeof t){const e=Object.keys(t)[0];if(e&&t[e].templateDefinitionFlag){const n={workspaceTemplates:t};f.ConfigUtilInstance.promptAndSaveJSONToLocalFile(`workspaceConfig-${e}`,n)}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile. Input is not a legal template")}else c.default.system.error("workspaceClient.saveWorkspaceTemplateToConfigFile: Input is not a legal object")}async start(e){this.routerClient.subscribe(d.WORKSPACE.UPDATE_PUBSUB,((t,n)=>{c.default.system.debug(`${d.WORKSPACE.UPDATE_PUBSUB} response`,t,n),t?c.default.system.error(t):(this.activeWorkspace=n.data.activeWorkspace,this.workspaces=n.data.workspaces,e&&e())}))}}let m=new h({onReady:e=>{m.start(e)},name:"workspaceClient"});t.default=m},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 i=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(i)>-1||(n.g[i]=new t),n.g[i]}},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 i=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 r=n(5939),o=i(n(39319)),s=n(78379),a=i(n(5020)),u=i(n(72551));class l extends r.EventEmitter{constructor(e){super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),delete this.startupTimer}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout")}),1e4)}}function c(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class d{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=c();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const i=new l({dependencies:e,callback:t});return i.setStartupTimer(),i.on("timeout",(()=>{this.onDependencyTimeout(i)})),this.dependencies[n]=i,this.checkDependencies(),i}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:i}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),i&&i())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class f{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=c();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(u.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class p extends r.EventEmitter{constructor(){super(),this.startup=new d,this.shutdown=new f,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=p,t.FSBLDependencyManagerSingleton=new p,t.default=t.FSBLDependencyManagerSingleton},24232:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.removeKeys=t.toRecord=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.getProp=t.composeRL=t.instrumentPromise=t.promisify=t.identity=t.isNumber=t.chunkArray=t.Timeout=t.mockLogger=t.capitalizeFirst=t.clone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const r=n(50586),o=i(n(80089)),s=i(n(75892)),a=i(n(47184)),u=i(n(65162)),l=n(33998),c=i(n(72551)),d=window;function f(e,t){if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return t("clone error",e),e}}function p(e,t){return new Promise(((n,i)=>{const r=setTimeout((()=>{clearTimeout(r),i(t)}),e)}))}function h(e,t,n){return`${e}.${t}.${n}`}function m(e,t,n){const i=`${h(e.baseString,e.newPath,e.newValue)}`;c.default.system.deprecated(`${h(e.baseString,t,n)} has been deprecated in favor of ${i}`)}t.guuid=function(){return r.v4()},t.iAmAServiceWindow=function(){return!(!d.finsembleServices||!d.finsembleServices.length)},t.isServiceInWindow=function(e){return d.finsembleServices&&d.finsembleServices.find((t=>t.name===e))},t.clone=f,t.capitalizeFirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.mockLogger=new class{constructor({debug:e}={debug:!0}){e?(this.system=console,this.system.debug=console.log):this.system={warn:Function.prototype,debug:Function.prototype,log:Function.prototype,info:Function.prototype,error:console.error}}isLogMessage(){return!0}start(){}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.chunkArray=function(e,t){if(e<=0)throw new Error("Can't chunk array by number less than 0");return t.reduce(((n,i,r)=>{if(r%e==0){const i=[];for(let n=r;n<r+e;n++)n<t.length&&i.push(t[n]);n.push(i)}return n}),[])},t.isNumber=function(e){return!(!e||Number.isNaN(Number(e)))&&Number(e)},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((i,r)=>{n.push(((e,t)=>e?r(e):i(t))),e.apply(t,n)}))}},t.instrumentPromise=async(e,t,n)=>{const i=`${t} end`;return e(`${t} start`),n.then((()=>e(i)))},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getProp=function e(t,n,i){const r=Array.isArray(n)?n:n.split(".").filter((e=>e.length));return r.length?e(t[r.shift()],r,i):void 0===t?i:t},t.getRandomWindowName=function(e="RouterClient"){return`${e}-${r.v4()}`},t.timeoutPromise=p,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,p(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===(o.default(e,"windowIdentifier.windowType")||e.windowType)},t.toRecord=function(e,t){const n="string"==typeof e?t=>t[e]:e;return t.reduce(((e,t)=>(e[n(t)]=t,e)),{})},t.removeKeys=function(e,t){if(!e)return e;const n=Object.keys(e).filter((e=>!t.includes(e)));return s.default(e,n)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],i=s.default(e,n),r=s.default(t,n);return!!a.default(i,r)},t.sleep=function(e,t=!1){return new Promise(((n,i)=>{t?setTimeout((()=>{try{i("timeout expired")}catch{}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=function(e,t){const n=f(e,Function.prototype),i=f(t,Function.prototype);return u.default(n,i,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return u.default(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:i,oldPath:r,newPath:o,oldValue:s,newValue:a}=t;let u=l.ConfigUtilInstance.getDefault(e,h(i,o,a),null);return null===u&&(u=l.ConfigUtilInstance.getDefault(e,h(i,o,s),null),u?m(t,o,s):(u=l.ConfigUtilInstance.getDefault(e,h(i,r,a),null),u?m(t,r,a):(u=l.ConfigUtilInstance.getDefault(e,h(i,r,s),null),u?m(t,r,s):u=n))),u}},59459:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(39319)),u=o(n(78379));t.default=class{constructor(e,t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=t.data.guid,this.internalHandler()}async internalHandler(){this.data=this.queryMessage.data.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?(this.delayed=!0,this.queryMessage.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){this.completed=!0,this.delayed?a.default.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):this.queryMessage.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},73014:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(39319)),o=i(n(72551)),s=i(n(57815)),a=i(n(73601)),u=n(24232);class l extends s.default{constructor(e){super(e),this.eventList=[],this.eventHandlerMap={},this.eventInternalHandlerMap={},this.remoteListenerEventMap={},this.waitList={},r.default.addListener(`Finsemble.RegisterInterruptibleEvent.${this.name}`,((e,t)=>{this.registerListener(t?.data.event,t?.data.listenerGuid)})),r.default.addListener(`Finsemble.UnregisterInterruptibleEvent.${this.name}`,((e,t)=>{this.unregisterListener(t?.data.event,t?.data.listenerGuid)}))}registerListener(e,t){this.remoteListenerEventMap[e]||(this.remoteListenerEventMap[e]=[]),this.remoteListenerEventMap[e].push(t)}unregisterListener(e,t){this.remoteListenerEventMap[e]||o.default.system.warn("not found"),this.remoteListenerEventMap[e]=this.remoteListenerEventMap[e].filter((e=>e!==t))}awaitRemoteDelayer(e,t){return new Promise(((n,i)=>{const o=(s,a)=>{r.default.removeListener(`Finsemble.Listener.Done.${e}.${t}`,o),!0===a.data.canceled?i("canceled"):n(a.data.data)};this.waitList[e]=o,r.default.addListener(`Finsemble.Listener.Done.${e}.${t}`,o)}))}async queryRemoteListener(e,t,n,i){const o=`${window.name}_private_${Date.now()}_${Math.random()}`,s={event:e,guid:o,data:n},a=this.awaitRemoteDelayer(o,t);let{response:l}=await Promise.race([r.default.query(`Finsemble.Interrupt.${t}`,s,(()=>{})),u.sleep(i.initialQueryTimeout,!0)]).catch((()=>{throw r.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),"eventHandler failed initial response"}));if(l.header.error)return;let c=!0;if(!0===l.data.delayed)try{return c=!1,await Promise.race([a,u.sleep(i.timeout,!0)])}catch(e){if("timeout expired"!==e)throw"event was canceled";c=!0}if(c&&r.default.removeListener(`Finsemble.Listener.Done.${o}.${t}`,this.waitList[o]),!0===l.data.canceled)throw"event was canceled";return l.data.data}async trigger(e,t=null,n={initialQueryTimeout:1e3,timeout:1e4}){o.default.verbose(`Triggering ${e} for ${this.name}`,t);const i=[];if(this.remoteListenerEventMap[e])for(let r of this.remoteListenerEventMap[e])i.push(this.queryRemoteListener(e,r,t,n));if(this.eventHandlerMap[e]){const r=[...this.eventHandlerMap[e]],o=[...this.eventGuidMap[e]];for(let s=0;s<r.length;s++){const u=r[s],l=o[s],c=new a.default({source:this.name,sourceType:this.sourceType,handler:u,event:e,data:t,options:n,guid:l});i.push(c.complete)}}try{return await Promise.all(i)}catch(e){if("eventHandler failed initial response"!==e)throw"event was canceled";console.error(e)}}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_private_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n)}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("Trying to remove non-existent listener");let n=this.eventHandlerMap[e].indexOf(t);-1!==n&&(this.eventGuidMap[e][n],this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1))}cleanup(){}}t.default=l},73601:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(78379));t.default=class{constructor(e){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.data=e.data,this.guid=e.guid,s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),s[this.sourceType.toUpperCase()]&&s[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.complete=new Promise(((e,t)=>{this.eventCanceled=t,this.eventComplete=e})),this.internalHandler()}async internalHandler(){this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?this.delayed=!0:this.done()}done(e){this.completed=!0,this.canceled?this.eventCanceled():this.eventComplete(e)}}},57815:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(39319)),o=i(n(72551)),s=i(n(59459));t.default=class{constructor(e){this.eventList=[],this.eventHandlerMap={},this.eventGuidMap={},this.name=e.name,this.sourceType=e.sourceType,window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_public_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n),r.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n}),r.default.addResponder(`Finsemble.Interrupt.${n}`,((i,r)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},r)}))}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("not found");let n=this.eventHandlerMap[e].indexOf(t);if(-1!==n){const t=this.eventGuidMap[e][n];this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1),r.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${window.name}`,{event:e,guid:t}),r.default.removeResponder(`Finsemble.Interrupt.${t}`)}}cleanup(){for(var e of Object.keys(this.eventHandlerMap))for(var t of this.eventHandlerMap[e])this.removeEventListener(e,t)}}},50631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},52283:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(i=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",i.SNOOZE="SNOOZE",i.SPAWN="SPAWN",i.QUERY="QUERY",i.PUBLISH="PUBLISH",i.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},55016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.include=[],this.exclude=[]}}},31376:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},95320:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(31376));t.default=class{constructor(){this.actions=[],this.isRead=!1,this.isSnoozed=!1,this.isMuted=!1,this.isDeleted=!1,this.actionsHistory=[],this.meta=new r.default,this.stateHistory=[]}}},12521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.id=e||null,this.filter=t}}},82369:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(72551)),o=n(51742),s={activeTransports:{},liveTransport:null,addTransport(e,t){this.activeTransports[e]=t,r.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),r.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,i,r)=>new Promise(((o,a)=>{const u=s.activeTransports[t];u?s.liveTransport=new u(e,n,i,r,(e=>{o(e)})):a(`unknown router transport name: ${t}`)})),close(){s.liveTransport&&(s.liveTransport.close(),s.liveTransport=null)}},a=function(e,t,n,i,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]),r.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){r.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`;r.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],i=e.data[1],o={transportID:a.identifier(),port:n};r.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",i),t(o,i)},s.onerror=function(e){r.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,i,s){const{uuid:a}=o.System.Application.getCurrent(),u=this;this.send=function(e,t){let n;1===arguments.length?(n=i,t=arguments[0]):(n=e.name,t=arguments[1]),r.default.system.verbose("IPCTransport Outgoing Transport",a,n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=function(){return"IPCBus"},r.default.system.log(`IPCBus Transport Initializing for ${n}`),console.log(`IPCBus Transport Initializing for ${n}`);const l=o.System.InterApplicationBus.subscribe("*",n,(function(e,n){const i={transportID:u.identifier(),senderUuid:n,name:e.header.origin};r.default.system.verbose("IPCTransport Incoming Transport",i,"Message",e),t(i,e)}),(()=>{}),(function(e){r.default.system.error(`IPCBus Subscribe Failure: ${e}`)}));this.close=()=>{o.System.InterApplicationBus.unsubscribe(l)},s(this)},l=function(e,t,n,i,o){const s=`${e?.transportSettings?.FinsembleTransport?.serverAddress??e?.transportSettings?.serverAddress??"ws://127.0.0.1:3376"}/router`,a=this;let u;function l(){r.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function c(){r.default.system.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),console.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),s.startsWith("ws:")||s.startsWith("wss:")||console.error(`Illegal WebSocket address "${s}" (Missing ws:// or wss:// ?)`),u=new WebSocket(s);const e=setTimeout(l,3e3);u.addEventListener("open",(()=>{clearTimeout(e),r.default.system.log("FinsembleTransport Connected to Server"),console.log("FinsembleTransport Connected to Server"),u.addEventListener("message",(e=>{const i=JSON.parse(e.data);("RouterService"===n&&"ROUTER_SERVICE"==i.dest||n===i.message.client)&&function(e){const n={transportID:a.identifier(),client:e.clientMessage.header.origin};r.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}(i.message)})),o(a)}))}this.send=function(e,t){let n,i;1===arguments.length?(n="ROUTER_SERVICE",i={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],i={client:e.client,clientMessage:t}),r.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",i),u.readyState===WebSocket.OPEN&&u.send(JSON.stringify({dest:n,message:i})),u.readyState===WebSocket.CONNECTING&&u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:i}))})),u.readyState===WebSocket.CLOSED&&(c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:i}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{c(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:i}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},c()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",l),t.default=s},51742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const i=n(16925);class r{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}=i.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{e&&e({})},addEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return{}}}class s{constructor(e,t,n){return new fin.desktop.Application(e,t)}static get getCurrent(){return fin.desktop.Application.getCurrent}static get wrap(){return fin.desktop.Application.wrap}}class a{constructor(e){new fin.desktop.Notification(e)}}class u{constructor(){return new fin.desktop.System.Clipboard}static get writeText(){return fin.desktop.System.Clipboard.writeText}static get writeHTML(){return fin.desktop.System.Clipboard.writeHTML}static get writeRTF(){return fin.desktop.System.Clipboard.writeRTF}static get readText(){return fin.desktop.System.Clipboard.readText}static get readHTML(){return fin.desktop.System.Clipboard.readHTML}static get readRTF(){return fin.desktop.System.Clipboard.readRTF}}class l{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return l.isFreestanding()?o:r}static get Notification(){return a}static get Clipboard(){return u}static async getMousePosition(e=Function.prototype){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),e(null,n),t(n)}),(t=>{e(t,null),n(t)}))}))}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e(n)}))}))}static container(){return"undefined"==typeof fin?"freestanding":fin.container?fin.container:"FEA"}static isBrowserView(){return!l.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!l.isFreestanding()&&fin.hasBrowserView()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get getAllApplications(){return fin.desktop.System.getAllApplications}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get getRuntimeInfo(){return fin.desktop.System.getRuntimeInfo}static get addEventListener(){return l.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getAllWindows(){return fin.desktop.System.getAllWindows}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static closeApplication(e,t=Function.prototype){return new Promise((n=>{let i,r=!1;const o=()=>{r||(console.log("Attempting to terminate",e.uuid),e.terminate((()=>{t(),n()}),(()=>{r||(r=!0,clearInterval(i),console.log("force closing ",e.uuid),e.terminate())})))};i=setInterval(o,2e3),console.log("closing ",e.uuid),e.close(!1,(()=>{console.log("app.close: successfully closed",e.uuid),r=!0,clearInterval(i),t(),n()}),o)}))}}t.System=l},5020:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(39319)),o=i(n(72551)),s=n(56188),a=n(33509),u=n(95269),l=new class{publishBootStatus(e,t,n){console.log("publishStartingStatus",e,n),o.default.system.debug("publishBootStatus",e,t,n),r.default.publish(u.statusChannel(e),{name:e,type:t,state:n})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((i,u)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const l=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const c=r.default.subscribe(a.STAGE_CHANNEL,((a,d)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data.stage,c),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===l)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),u(a);else{const a=s.ALL_BOOT_STAGES.indexOf(d.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",d.data,c),"stageEntered"===t&&a+1>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,c,n.name),n(),i(),r.default.unsubscribe(c)):"stageCompleted"===t&&a>=l?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,c),n(),i(),r.default.unsubscribe(c)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${l} `,a,l,e,c)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,i)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=r.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),i()):u.data.name===e&&"completed"===u.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),r.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)),r.default.publish(u.checkpointChannel(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),r.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),r.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=l},76420:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.adjustBoundsToBeOnMonitor=t.isOnAMonitor=t.getNewBoundsWhenMovedToMonitor=t.openSharedData=t.injectJS=t.guuid=t.camelCase=t.getMyWindowIdentifier=t.getMonitorByDescriptor=t.windowOnMonitor=t.getMonitorFromCommand=t.getMonitor=t.getWhichMonitor=t.findMonitor=t.getWindowDescriptor=t.getFinWindow=t.getMonitorFromWindow=t.getMonitorFromXY=t.getAllMonitors=t.crossDomain=t.isPercentage=t.castToPromise=t.getContainerVersion=t.clone=t.Monitors=void 0;const r=i(n(36589)),o=n(51742),s=i(n(93802)),a=i(n(72551));function u(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?u(e[n],null):t[n];return t}function l(e,n){const i=Number.isFinite(e.x)?e.x:e.defaultLeft,r=Number.isFinite(e.y)?e.y:e.defaultTop,o=i+e.defaultWidth,s=r+e.defaultHeight;return new Promise(((e,l)=>{t.Monitors.getMonitorFromScaledXY(i,r,(c=>{if(!c)return a.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right"),void t.Monitors.getMonitorFromScaledXY(o,s,(o=>{if(!o)return a.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary"),void t.Monitors.getAllMonitors((t=>{t[0]?(n&&n(t[0]),e(t[0])):(l(new Error("Cannot find monitor for window.")),n&&n(null))}));o=u(o);const{monitorRect:s}=o;(s.left<i||s.right<r)&&(o.straddling=!0),n&&n(o),e(o)}));c=u(c);const{monitorRect:d}=c;(d.right>o||d.bottom>s)&&(c.straddling=!0),n&&n(c),e(c)}))}))}function c(e,t){return new Promise(((n,i)=>{const r=o.System.Window.getCurrent();r.getOptions((s=>{if(e&&e.windowName){e.uuid||(e.uuid=s.uuid);const r=o.System.Window.wrap(e.uuid,e.windowName);r.getInfo((()=>{t&&t(r),n(r)}),(()=>{t&&t(null),i(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}))}else if(e&&e.componentType)if(void 0!==window.LauncherService){const r=window.LauncherService.componentFinder(e);r?(n(r),t&&t(r)):(i(`util.getFinWindow: Component ${e.componentType} not found.`),t&&t(null))}else i("getFinWindow by componentType is currently only operable within LaunchService"),t&&t(null);else t&&t(r),n(r)}))}))}function d(e,t){return new Promise(((n,i)=>{c(e).then((e=>{e.getOptions((e=>{t&&t(e),n(e)}))})).catch((e=>{console.warn(e),t&&t(null),i(e)}))}))}function f(e,t,n){for(let i=0;i<e.length;i++){const r=e[i];if(r[t]===n)return r}return null}function p(e,n){let i;arguments.length>2&&(e={commandMonitor:arguments[0],monitors:arguments[1],launchingMonitorPosition:arguments[2]},n=null);let{commandMonitor:r,monitors:o,launchingMonitorPosition:s}=e;const a=r&&""!==r||0===r;if("primary"===r)i=f(o,"whichMonitor","primary");else if("next"===r){let e=s+1;e>=o.length&&(e=0),i=o[e]}else if("previous"===r){let e=s-1;e<0&&(e=o.length-1),i=o[e]}else if("mine"===r){var u=!0;activeWindows.getWindow(e.windowIdentifier.windowName)._getBounds(((e,r)=>{e?(i=o[0],n(i)):t.Monitors.getMonitorFromScaledXY(r.left,r.top,(e=>{n(e)}))}))}else a?(r>=o.length&&(r=o.length-1),i=o.filter((e=>e.position===r))[0]):s&&(i=o[s]);if(i||(i=o[0]),!u){if(!n)return i;n(i)}}function h(e,t){return new Promise(((n,i)=>{d(e,(e=>{e?l(e,(e=>{t&&t(e),n(e)})):i("util.getMonitor: Can't locate windowDescriptor.")}))}))}t.Monitors=new s.default(Function.prototype,Function.prototype,{System:o.System}),t.clone=u,t.getContainerVersion=function(e=Function.prototype){return new Promise((t=>{o.System.getVersion((n=>{const i=n.split(".").map(Number),r={major:i[0],chromium:i[1],minor:i[2],patch:i[3]};e(r),t({versionObject:r})}))}))},t.castToPromise=function(e){return function(...t){return new Promise(((n,i)=>{const r=e.apply(null,Array.from(t));try{return r.then(n,i)}catch(e){e instanceof TypeError?n(r):i(e)}}))}},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,i=window.location.protocol===t.protocol,r=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=!(n&&r&&i);return a.default.system.debug(`Launcher crossDomain=${o} (${n}:${i}:${r})`),o},t.getAllMonitors=t.Monitors.getAllMonitors,t.getMonitorFromXY=t.Monitors.getMonitorFromScaledXY,t.getMonitorFromWindow=l,t.getFinWindow=c,t.getWindowDescriptor=d,t.findMonitor=f,t.getWhichMonitor=p,t.getMonitor=h,t.getMonitorFromCommand=function(e,n,i){return new Promise((r=>{h(n,(n=>{t.Monitors.getAllMonitors((t=>{p({commandMonitor:e,monitors:t,launchingMonitorPosition:n.position},(e=>{i&&i(e),r(e)}))}))}))}))},t.windowOnMonitor=function(e,t){return e.left>=t.left&&e.left<t.right||e.right<=t.right&&e.right>t.left},t.getMonitorByDescriptor=function(e,t){return new Promise((n=>{l(e,(e=>{t&&t(e),n(e)}))}))},t.getMyWindowIdentifier=function(e){const t=o.System.Window.getCurrent();return new Promise((n=>{t.getOptions((i=>{let r=null;const{customData:o}=i;o&&o.component&&(r=o.component.type);const s={windowName:t.name,uuid:t.uuid,componentType:r};e&&e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.guuid=function(){return r.default()},t.injectJS=function(e,t){const n=document.createElement("script");n.onload=t,n.type="text/javascript",n.async=!0,n.src=e;const i=document.getElementsByTagName("head")[0],r=i.getElementsByTagName("script")[0];i.insertBefore(n,r)},t.openSharedData=function(e,t){const n=FSBL.Clients.LauncherClient,i=FSBL.Clients.LinkerClient;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const i of Object.keys(e))e[i].length>n&&(t=i,n=e[i].length);return[t]});const r=[],o={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((s,u)=>{for(const e of Object.keys(u))if(u[e].componentTypes.length)for(const t of u[e].componentTypes)o[t]?o[t].push(e):o[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;r.push(t),a.default.system.error(t)}let l=Object.keys(o);if(l.length){l.length>1&&(l=e.multipleOpenerHandler(o));const s=Object.keys(i.channels);if(s.length)if(i.getLinkedComponents({componentTypes:l,windowIdentifier:i.windowIdentifier()}).length||e.publishOnly)i.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(r.length?r:null,"Data published");else{for(const t of l)n.spawn(t,{data:{sharedData:e.data,linker:{channels:s}},addToWorkspace:!0});t&&t(r.length?r:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of l)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(r.length?r:null,"New Window(s) spawned with data")}}else t&&t(r.length?r:null,null)}))},t.getNewBoundsWhenMovedToMonitor=function(e,t,n="availableRect"){const i=e[n]||e.availableRect||e.monitorRect,r=u(t);return t.top<i.top?r.top=i.top:t.top>i.bottom-t.height&&(r.top=i.bottom-t.height),t.left<i.left?r.left=i.left:t.left>i.right-t.width&&(r.left=i.right-t.width),r.bottom=r.top+r.height,r.right=r.left+r.width,r.right>i.right&&(r.right=i.right),r.top<i.top&&(r.top=i.top),r.left<i.left&&(r.left=i.left),r.bottom>i.bottom&&(r.bottom=i.bottom),r.height=r.bottom-r.top,r.width=r.right-r.left,{newBounds:r,distanceMoved:Math.sqrt((t.left-r.left)**2+(t.top-r.top)**2),monitor:e}},t.isOnAMonitor=function(e){return this.Monitors.allMonitors.some((t=>{const{monitorRect:n}=t;return e.left>=n.left&&e.left<=n.right&&e.right>=n.left&&e.right<=n.right&&e.top>=n.top&&e.top<=n.bottom&&e.bottom>=n.top&&e.bottom<=n.bottom}))},t.adjustBoundsToBeOnMonitor=function(e,t="availableRect"){if(this.isOnAMonitor(e))return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),e;const n=this.Monitors.allMonitors.map((n=>{let i=n.rawMonitor?n.rawMonitor:n;return this.getNewBoundsWhenMovedToMonitor(i,e,t)})).sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",e,"monitor name",n.monitor.name,"newBounds",n.newBounds),n.newBounds},t.isWindows=async function(e=Function.prototype){const t=(await o.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return a.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},10428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},75688:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=s(n(39319)),u=s(n(72551)),l=o(n(76420)),c=s(n(57815)),d=o(n(78379)),f=n(24232),p=n(51742),h=s(n(99748)),m=n(10428);window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class w extends c.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=w.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=d.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=l.camelCase("activeWorkspace",this.name,this.name),this.windowKey=l.camelCase("activeWorkspace",this.name),w.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t){if("closed"!==e||!window.finsembleWindow||this.name!==finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new w(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=w;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static getInstance(e,t=Function.prototype){const n=p.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),(e=h.default(e))&&e.name?(e.windowName=e.name,new Promise((async function(i,r){if(window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return i({wrap:n}),t(null,n)}if(e.uuid&&e.name){if(e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),!1!==e.waitForReady)try{await w._windowReady(e.windowName),e.wrapState="ready"}catch(e){return r(e),t(e,null)}if(u.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally"),window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return i({wrap:n}),t(null,n)}const{wrap:n}=await w._createWrap(e);return i({wrap:n}),t(null,n)}if(!1!==e.waitForReady)try{await w._windowReady(e.windowName),e.wrapState="ready"}catch(e){return r(e),t(e,null)}a.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async(n,o)=>{if(n)return u.default.system.error(n),r(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),i({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await w._createWrap(e);o.data.descriptor&&(a.descriptor=o.data.descriptor),i({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let i=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let r={...n};r=Object.assign(r,e),r.setWindowType=r.windowType,delete r.windowType,u.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=w;window._FSBLCache.windows[n.windowName]=new o(r),i=window._FSBLCache.windows[n.windowName],i.windowType=n.windowType,i.identifier=n,i.addEventListener("closed",i.handleWrapRemoveRequest),i.addEventListener("maximized",(()=>{i.windowState=w.WINDOWSTATE.MAXIMIZED})),i.addEventListener("minimized",(()=>{i.windowState=w.WINDOWSTATE.MINIMIZED})),i.addEventListener("restored",(()=>{i.windowState=w.WINDOWSTATE.NORMAL}));const s=a.default.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)u.default.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;i.wrapState=e,a.default.unsubscribe(s)}}));i.parentSubscribeID=a.default.subscribe(`Finsemble.parentChange.${n.windowName}`,((e,n)=>{if(e)u.default.system.error("FinsembleWindow parent change notification error",e),t({wrap:i});else{const e=n.data||{};"Added"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",e),i.setParent(e.stackedWindowIdentifier,(()=>{t({wrap:i})}))):"Exists"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",e),i.setParentOnWrap(e.stackedWindowIdentifier,(()=>{t({wrap:i})}))):"Removed"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",e),i.clearParent(),t({wrap:i})):e.type?(u.default.system.error("FinsembleWindow Parent Notification: unknown type",e),t({wrap:i})):t({wrap:i})}}))}))}static _getRemoveWrapChannel(e){return`${p.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.default.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==window.name&&this.name&&(delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name]),e&&e.done()}cleanupRouter(){const e=w._getRemoveWrapChannel(this.name);a.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.default.unsubscribe(this.parentSubscribeID)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){if("close"===e||"setParent"===e||"ready"===this.wrapState)return new Promise((async(i,r)=>{"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,u.default.setting().system.Debug&&(t.callstack=u.default.callStack()),u.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);let o=null;a.default.query(this.windowServiceChannelName(e),t,((t,s)=>{t?(u.default.system.debug(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t),"getComponentState"!==e&&"Not found"!==t&&r(t)):(o=s.data,u.default.system.debug(`${this.windowServiceChannelName(e)} successful`,o),console.debug(`${this.windowServiceChannelName(e)} successful`,o)),i(o),n(t,o)}))}));this.onReady((()=>{this.wrapState="ready",this.queryWindowService(e,t,n)}))}minimize(e=null,t=Function.prototype){this.queryWindowService("minimize",e,t)}maximize(e=null,t=Function.prototype){this.getBounds(((n,i)=>{n?u.default.system.warn("Error getting bounds, cached bounds will not be set"):this.updateOptions({options:{cachedLeft:i.left,defaultLeft:i.left,cachedTop:i.top,defaultTop:i.top,cachedWidth:i.width,defaultWidth:i.width,cachedHeight:i.height,defaultHeight:i.height}}),this.queryWindowService("maximize",e,t)}))}restore(e=null,t=Function.prototype){this.queryWindowService("restore",e,t)}blur(e=null,t=Function.prototype){this.queryWindowService("blur",e,t)}focus(e=null,t=Function.prototype){this.queryWindowService("focus",e,t)}bringToFront(e=null,t=Function.prototype){this.queryWindowService("bringToFront",e,t)}setAlwaysOnTop(e={alwaysOnTop:!0},t=Function.prototype){this.queryWindowService("setAlwaysOnTop",e,t)}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",{},t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const i={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",i,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new m.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t=Function.prototype){"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,t)}getBounds(e={},t=Function.prototype){return new Promise((n=>{this.queryWindowService("getBounds",e,((e,i)=>{n({err:e,data:i}),t(e,i)}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t=Function.prototype){this.queryWindowService("hide",e,t)}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t=Function.prototype){this.queryWindowService("show",e,t)}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t=Function.prototype){u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(()=>{u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name),t()}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const i=()=>{a.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,i):i()}wrapReady(){a.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.default.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?u.default.system.warn("TabTile.stopTabTile: query failed",e):u.default.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(u.default.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){u.default.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.default.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.default.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?w.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}setParent(e,t){if(this.settingParent)return this.getParent(t);this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParent",e),w.getInstance(e,((n,i)=>{n?u.default.system.error("FinsembleWindow.setParent error",n):(u.default.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=i,this.parentWindow.windowType.includes("StackedWindow")||u.default.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.default.transmit(d.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const r=()=>{this.removeEventListener("parent-set",r),t(n,i)};this.addEventListener("parent-set",r)}))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParentOnWrap",e),w.getInstance(e,((n,i)=>{n?u.default.system.error("FinsembleWindow.setParentOnWrap error",n):(u.default.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=i,!1===this.parentWindow.windowType.includes("StackedWindow")&&u.default.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,i)}))}))}clearParent(){u.default.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.default.system.debug("Title change",e),a.default.publish(this.TITLE_CHANGED_CHANNEL,e)}getOptions(e=Function.prototype){this.queryWindowService("getOptions",{},e)}_privateManagementPreface(e,t){return"function"==typeof t&&u.default.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:this.identifier?.windowName,windowType:this.identifier?.windowType},u.default.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.default.query("StackedWindow.addWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.addWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.default.query("StackedWindow.removeWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.removeWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.default.query("StackedWindow.deleteWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.deleteWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.default.query("StackedWindow.setVisibleWindow",e,((e,i)=>{u.default.system.debug("StackedWindow.setVisibleWindow callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.default.query("StackedWindow.reorder",e,((e,i)=>{u.default.system.debug("StackedWindow.reorder callback",e,i),t(e,i.data),n({err:e,data:i.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=w,w.WINDOWSTATE={NORMAL:0,MINIMIZED:1,MAXIMIZED:2,HIDDEN:3},w.wrap=w.getInstance,w.isStartupApplication=async function(e){let t;const n=await new Promise(((e,t)=>{p.System.Application.getCurrent().getManifest(e,t)})).catch((()=>{t=!1}));return n&&(t=n&&n.startup_app&&n.startup_app.name===e),t},w._windowReady=function(e){let t;u.default.system.debug(`windowServiceReady: ${e} starting`);const n=`Finsemble.Component.State.${e}`;return new Promise((async(i,r)=>{await w.isStartupApplication(e)||f.isServiceInWindow(e)?r("Cannot Wrap Service Manager or Services"):(u.default.system.debug(`windowServiceReady: ${e} waiting`),t=a.default.subscribe(n,((n,r)=>{const{state:o}=r.data;switch(u.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.default.system.debug(`windowServiceReady: ${e} ${o}`),a.default.unsubscribe(t),i()}})))}))}},96755:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(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),l=s(n(39319)),c=s(n(72551)),d=s(n(5020)),f=n(51742),p=o(n(78379)),h=n(6192),m=n(10589),{SERVICE_INITIALIZING_CHANNEL:w,SERVICE_READY_CHANNEL:g,SERVICE_QUERY_READY_CHANNEL:y,SERVICE_CLOSING_CHANNEL:v,SERVICE_CLOSED_CHANNEL:b,SERVICE_STOP_CHANNEL:S}=p,C={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},addOFWrapper:!1,name:window.name};t.BaseService=class{constructor(e=C){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=C.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=C.startupDependencies.clients)):e.startupDependencies=C.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=C.shutdownDependencies.services):e.shutdownDependencies=C.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=c.default,this.RouterClient=l.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){c.default.system.debug("BaseService.start.setParentUUID"),f.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,t.parentUuid=n.customData.parentUuid,e()}))}async function i(){await(new m.FSBLService).startApp(),l.default.addResponder(y(e.name),((t,n)=>{(e.status="ready")?n?.sendQueryResponse(null):n?.sendQueryResponse("service not ready")})),l.default.transmit(w,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),c.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function r(e){const n=t.customData.debugServiceDelay||0;if(c.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&c.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.`;c.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),d.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){c.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),c.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),l.default.transmit(`${f.System.Window.getCurrent().name}.onSpawned`,{name:f.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e).on("err",(e=>{c.default.system.error(e)}))}function s(e){const n=f.System.Window.getCurrent();n.isShowing((i=>{i&&!1!==t.customData.showDevConsoleOnVisible?f.System.showDeveloperTools(n.uuid,n.name,null,e):(c.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return c.default.system.debug(`${this.name} starting`),new Promise((e=>{a.series([i,n,s,r,o],(()=>{e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${S}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",l.default.transmit(g,{serviceName:this.name},{suppressWarnings:!0}),c.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),d.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){c.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"),c.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(){c.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(l.default.transmit(v,{waitForMe:!0,name:this.name}),a.each(this.listeners.onShutdown,(function(e,t){a.asyncify(e)(null,t)}),(function(t){t&&c.default.system.error(t),e.shutdownComplete()}))):(l.default.transmit(v,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){c.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),l.default.transmit(b,{name:this.name,uuid:f.System.Application.getCurrent().uuid})}},window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return c.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?c.default.warn("A service tried To wrap itself. This is a side effect of using Clients in services."):c.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 i=n(51742),r=n(33509);t.killOldApplications=function(e){return new Promise((async t=>{i.System.getAllApplications((async n=>{if(n)for(let t=0;t<n.length;t++){const r=n[t];if(r.uuid?.endsWith(`-${e}`)){const e=i.System.Application.wrap(r.uuid);await i.System.closeApplication(e)}}console.log("killOldApplications: finished closing old apps"),t()}))}))},t.statusChannel=function(e){return`${r.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${r.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},76163:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWindow=void 0;const a=s(n(74602)),u=s(n(39319)),l=s(n(70010)),c=s(n(72551)),d=n(24232),f=o(n(76420)),p=s(n(73014)),h=o(n(78379)),m=n(51742),w=n(78379),g=s(n(43190)),y=s(n(63862)),v=s(n(6008)),b=s(n(99748));g.default.initialize(),y.default.initialize(),l.default.initialize(),v.default.initialize(),window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class S{constructor(e){this.eventlistenerHandlerMap={},this.handleWrapStateChange=(e,t)=>{const{state:n}=t.data;n&&n!==this.wrapState&&"closed"!==n&&(this.wrapState=n,this.eventManager.trigger(n),this.eventManager.trigger("wrap-state-changed",{state:n}))},this.types={},this.guid=f.guuid(),this.wrapState="initializing",this.componentState={},this.windowState=S.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.windowOptions={},this.bounds={},this.name,this.enableWindowsAeroSnap=!1,this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=f.camelCase("activeWorkspace",this.name,this.name),this.windowKey=f.camelCase("activeWorkspace",this.name),S.bindFunctions(this),this.wrapStateChangeSubscription=u.default.subscribe(`Finsemble.Component.State.${this.name}`,this.handleWrapStateChange),this.eventManager=new p.default({name:this.name,sourceType:"Window"}),this.finishedMove=!0,this.oldState={}}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}_startMove(e=0){window.aeroMode=!1,0===e&&(this.finishedMove=!1)}_stopMove(){this.finishedMove=!0}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new S.types[e.setWindowType](e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=S;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.setupListeners=e.setupListeners.bind(e),e.onTitleChanged=e.onTitleChanged.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e)}setupListeners(e){c.default.system.debug("BaseWindow parent change notification setup",e),this.parentSubscribeID=u.default.subscribe(`Finsemble.parentChange.${e}`,((e,t)=>{if(e)c.default.system.error("BaseWindow parent change notification error",e);else{const e=t.data||{};"Added"==e.type?(c.default.system.debug("BaseWindow Parent Notification: window.addedToStack listener",e),this.setParent(e.stackedWindowIdentifier)):"Removed"==e.type?(c.default.system.debug("BaseWindow Parent Notification: window.removedFromStack listener",e),this.clearParent()):"Exists"===e.type||e.type&&c.default.system.error("BaseWindow Parent Notification: unknown type",e)}})),this.TITLE_CHANGED_SUBSCRIPTION=u.default.subscribe(this.TITLE_CHANGED_CHANNEL,this.onTitleChanged)}onTitleChanged(e,t){t&&t.data&&("string"==typeof t.data||"number"==typeof t.data)&&(this._updateOptions&&this._updateOptions({title:t.data}),this.eventManager.trigger("title-changed",{name:this.name,title:t.data}))}static getInstance(e,t=Function.prototype){const n=m.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),e&&e.name?(e.windowName=e.name,new Promise((async function(i,r){if(!1!==e.waitForReady&&(c.default.system.debug("WRAP LIFECYCLE:WAIT FOR READY",e.name),await S._windowReady(e.windowName),c.default.system.debug("WRAP LIFECYCLE:WAIT DONE -- READY",e.name)),window._FSBLCache.windows[e.name]){c.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return i({wrap:n}),t(null,n)}if(e.uuid&&e.name){e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),c.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally");const{wrap:n}=await S._createWrap(e);return i({wrap:n}),t(null,n)}u.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async function(n,o){if(n)return c.default.system.error(n),r(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return c.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),i({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),c.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await S._createWrap(e);i({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let i=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let r={...n};r=Object.assign(r,e),r=Object.assign(r,n),r.setWindowType=r.windowType,delete r.windowType,c.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=S;window._FSBLCache.windows.hasOwnProperty(n.windowName)?c.default.system.error("DUPLICATE WRAPPER for",n.windowName):window._FSBLCache.windows[n.windowName]=new o.types[r.setWindowType](r),i=window._FSBLCache.windows[n.windowName],i.windowType=n.windowType,i.identifier=n,i.setupListeners(n.windowName),t({wrap:i})}))}static _getRemoveWrapChannel(e){return`${m.System.Window.getCurrent().name}.removeWrap.${e}`}handleWrapRemoveRequest(){this.removeListeners&&this.removeListeners(),this.eventManager.cleanup();for(const e in this.eventlistenerHandlerMap)for(let t=0;t<this.eventlistenerHandlerMap[e].length;t++)this.eventlistenerHandlerMap[e][t].interceptor.removeAllListeners();this.eventManager.cleanup(),c.default.system.debug("WRAP CLOSE. Deleting cached wrap."),delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name],this.cleanupRouter()}cleanupRouter(){const e=S._getRemoveWrapChannel(this.name);u.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&u.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),u.default.unsubscribe(this.wrapStateChangeSubscription)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,c.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t),console.debug("FinsembleWindow.queryWindowService",this,this.windowServiceChannelName(e),t);let i=null;u.default.query(this.windowServiceChannelName(e),t,((t,r)=>{t?(c.default.system.warn(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t)):(i=r.data,c.default.system.debug(`${this.windowServiceChannelName(e)} successful`,i),console.debug(`${this.windowServiceChannelName(e)} successful`,i)),n&&n(t,i)}))}addEventListener(e,t){return this.eventManager.addEventListener(e,t)}removeEventListener(e,t){return this.eventManager.removeEventListener(e,t)}registerWithDocking(e,t){u.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}unRegisterWithDocking(){u.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow(e){this.registerWithDocking(e,(()=>{u.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName})}))}wrapReady(){u.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}_minimize(e,t=Function.prototype){c.default.system.debug("BaseWindow._minimize",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._minimize(e,((e,n)=>{c.default.system.debug("BaseWindow._minimize parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_maximize(e,t=Function.prototype){c.default.system.debug("BaseWindow._maximize",e),t(null,{shouldContinue:!0})}_restore(e,t=Function.prototype){c.default.system.debug("BaseWindow._restore",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._restore(e,((e,n)=>{c.default.system.debug("BaseWindow._restore parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_blur(e,t=Function.prototype){c.default.system.debug("BaseWindow._blur",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._blur(e,((e,n)=>{c.default.system.debug("BaseWindow._blur parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_focus(e,t=Function.prototype){c.default.system.debug("BaseWindow._focus",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._focus(e,((e,n)=>{c.default.system.debug("BaseWindow._focus parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_bringToFront(e,t=Function.prototype){c.default.system.debug("BaseWindow._bringToFront",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._bringToFront(e,((e,n)=>{c.default.system.debug("BaseWindow._bringToFront parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isShowing(e,t=Function.prototype){c.default.system.debug("BaseWindow._isShowing",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._isShowing(e,((e,n)=>{c.default.system.debug("BaseWindow._isShowing parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_setBounds(e,t=Function.prototype){c.default.system.verbose("BaseWindow._setBounds",e),e=e||{};const{bounds:n}=e;this.mergeBounds(n),!e.invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setBounds(e,((e,n)=>{c.default.system.verbose("BaseWindow._setBounds parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_getBounds(e,t){c.default.system.verbose("BaseWindow._getBounds",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBounds(e,((e,n)=>{c.default.system.verbose("BaseWindow._getBounds parent",n),t(e,n)}))):t(null,{shouldContinue:!0})}_getBoundsFromSystem(e,t){c.default.system.debug("BaseWindow._getBoundsFromSystem",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._getBoundsFromSystem(e,((e,n)=>{c.default.system.verbose("BaseWindow._getBoundsFromSystem parent",n),t(e,n)}))):t(null,{shouldContinue:!0})}_updateOptions(e,t=Function.prototype){c.default.system.debug("BaseWindow._updateOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._updateOptions(e,((e,n)=>{c.default.system.debug("BaseWindow._updateOptions parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_hide(e,t=Function.prototype){c.default.system.debug("BaseWindow._hide",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._hide(e,((e,n)=>{c.default.system.debug("BaseWindow._hide parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_show(e,t=Function.prototype){c.default.system.debug("BaseWindow._show",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._show(e,((e,n)=>{c.default.system.debug("BaseWindow._show parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_showAt(e,t=Function.prototype){c.default.system.debug("BaseWindow._showAt",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._showAt(e,((e,n)=>{c.default.system.debug("BaseWindow._showAt parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_close(e,t=Function.prototype){c.default.system.debug("WRAP CLOSE. BaseWindow._close",this.name,e),e=e||{};const{parentWindow:n}=this;e.fromSystem?n&&"stackedwindow"===n.componentType.toLowerCase()?((e={}).removeFromWorkspace=!0,e.fromSystem=!0,e.stackedWindowIdentifier=n.identifier,n.close(e,((e,n)=>{c.default.system.debug("BaseWindow.close stacked window",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0}):e.invokedByParent||e.ignoreParent||!n?t(null,{shouldContinue:!0}):(e.windowIdentifier=this.identifier,e.noDocking=!0,n._removeWindow(e,((e,n)=>{c.default.system.debug("BaseWindow._close parent",n),t(e,{shouldContinue:!0})})))}_alwaysOnTop(e,t=Function.prototype){c.default.system.debug("BaseWindow._alwaysOnTop",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._alwaysOnTop(e,((e,n)=>{c.default.system.debug("BaseWindow._alwaysOnTop parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_isAlwaysOnTop(e={},t=Function.prototype){return t(null,Boolean(this.windowOptions.alwaysOnTop)),Boolean(this.windowOptions.alwaysOnTop)}_setOpacity(e,t=Function.prototype){c.default.system.debug("BaseWindow._setOpacity",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._setOpacity(e,((e,n)=>{c.default.system.debug("BaseWindow._setOpacity parent",n),t(e,{shouldContinue:!1})}))):t(null,{shouldContinue:!0})}_saveWindowOptions(e,t=Function.prototype){c.default.system.debug("BaseWindow._saveWindowOptions",e),!(e=e||{}).invokedByParent&&this.parentWindow?(e.windowIdentifier=this.identifier,this.parentWindow._saveWindowOptions(e,((e,n)=>{c.default.system.debug("BaseWindow._saveWindowOptions parent",n),t(e,{shouldContinue:!0})}))):t(null,{shouldContinue:!0})}_getOptions(e,t=Function.prototype){return t(null,{})}_setResizable(){throw new Error("Not Implemented")}startTabTileMonitoring(e){c.default.system.debug("BaseWindow.startTabTileMonitoring",e),u.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e,t){c.default.system.debug("BaseWindow.stopTabTileMonitoring",e),u.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?c.default.system.warn("TabTile.stopTabTile: query failed",e):c.default.system.debug("TabTile.stopTabTile results",n.data);const i=n.data;t?t(e,i,this.defaultStopTrackingAction):this.defaultTabTileAction(i)}))}defaultTabTileAction(e){const t=this;switch(c.default.system.debug("BaseWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:c.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){if(!e||!Number.isInteger(e.top))return console.error("Invalid bounds",e),void c.default.system.warn("BaseWindow.mergeBounds Invalid bounds","bounds=",e);const t={top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)};t.bottom=t.top+t.height,t.right=t.left+t.width;const n={defaultLeft:t.left,defaultWidth:t.width,defaultTop:t.top,defaultHeight:t.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e){c.default.system.debug("BaseWindow.startMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-start",{...this.windowOptions.bounds})}stopMove(e){c.default.system.debug("BaseWindow.stopMove",e),(e=e||{}).windowIdentifier=this.identifier,this.eventManager.trigger("bounds-change-end",{name:this.name,eventName:"bounds-change-end",dockedPosition:this.dockedPosition,...this.windowOptions.bounds})}async getFSBLState(e,t){c.default.system.debug("BaseWindow.getState",e),y.default.get({topic:w.WORKSPACE.CACHE_STORAGE_TOPIC,key:e.key},((n,i)=>{"componentState"===e.stateVar&&(this.componentState=i);const{field:r,fields:o}=e;if(i){if(!r){if(o){const e={};for(let t=0;t<o.length;t++)i[o[t]]&&(e[o[t]]=i[o[t]]);return t(null,e)}return t(null,i)}t(n,i[r])}else c.default.system.info("WindowClient:getComponentState:error, response, params",n,i,e),t("Not found",i)}))}getComponentState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.getFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}getWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),e.key=this.windowKey,e.stateVar="windowData",this.getFSBLState(e,t)}setComponentState(e,t=Function.prototype){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}removeComponentState(e,t=(()=>{})){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.removeFSBLState({...e,key:this.componentKey,stateVar:"componentState"},t)}setWindowState(e,t){return e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),this.setFSBLState({...e,key:this.windowKey,stateVar:"windowData"},t)}saveWindowState(e){this.windowState=e}static async cleanupState(e){const t={componentType:e.componentType,name:e.name};if(!S.additionalWorkspaceFields)try{const e=await l.default.getValue("finsemble.servicesConfig.window.additionalWorkspaceFields");S.additionalWorkspaceFields=e.data||[]}catch{S.additionalWorkspaceFields=[]}let n;n=w.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]?w.WORKSPACE.ADDITIONAL_WINDOW_PROPS[e.windowType]:w.WORKSPACE.ADDITIONAL_WINDOW_PROPS.WebWindow,"WebApplication"===e.windowType&&(e.windowType="WebWindow");const i=[...w.WORKSPACE.DEFAULT_WINDOW_PROPS,...n,...S.additionalWorkspaceFields];for(const n of i)void 0!==e[n]&&(t[n]=e[n]);return t}async saveCompleteWindowState(e,t=Function.prototype){if(c.default.system.debug("COMPONENT LIFECYCLE:SAVING STATE:",e.name),e){"StackedWindow"===e.windowType&&(e.componentType="StackedWindow",this.mergeBounds(e.bounds));const n=await S.cleanupState(e);if(d.isEqualIgnoringArrayOrder(this.oldState,n))c.default.system.debug("saveCompleteWindowState -- deep equal"),t();else{c.default.system.debug("saveCompleteWindowState -- not deep equal",this.oldState,n),this.oldState=b.default(n);try{await v.default._setWindowState({windowName:this.windowName,state:{windowData:n}})}catch{}t()}}else t("No State Provided")}setFSBLState(e,t){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const i="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState(n,(async()=>{c.default.system.debug("BaseWindow.getState",e);let n=a.default(this[i],{}),{fields:r}=e;e.field&&(r=[{field:e.field,value:e.value}]);for(let e=0;e<r.length;e++){const t=r[e];t.field&&void 0!==t.value&&(n[t.field]=t.value)}e.value=n,c.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,n),"windowData"===e.stateVar&&(n=await S.cleanupState(n));try{await v.default._setWindowState({windowName:this.windowName,state:{[e.stateVar]:n}})}catch{}this[i]=n,t&&t()}))}removeFSBLState(e,t=(()=>{})){const n={key:e.key,stateVar:e.stateVar};n.key||("componentState"===n.stateVar?n.key=this.componentKey:"windowData"===n.stateVar&&(n.key=this.windowKey));const i="componentState"===e.stateVar?"componentState":"windowOptions";this.getFSBLState(n,(async()=>{c.default.system.debug("BaseWindow.getState",e);let n=a.default(this[i],{}),{fields:r}=e;e.field&&(r=[{field:e.field}]);for(let e=0;e<r.length;e++){const t=r[e];t.field&&delete n[t.field]}e.value=n,c.default.system.debug(`COMPONENT LIFECYCLE: SAVING ${e.stateVar}:`,n),"windowData"===e.stateVar&&(n=await S.cleanupState(n));try{await v.default._setWindowState({windowName:this.windowName,state:{[e.stateVar]:n}})}catch{}this[i]=n,t(null)}))}cancelTabTileMonitoring(e){c.default.system.debug("BaseWindow.cancelTabTileMonitoring",e),u.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(){return this.parentWindow}setParent(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(c.default.system.debug("BaseWindow.setParent already set",e),t(null,e)):(c.default.system.debug("BaseWindow.setParent",e),S.getInstance(e,((n,i)=>{n?c.default.system.error("BaseWindow.setParent error",n):(c.default.system.debug("BaseWindow.setParent wrap success",e),console.debug("BaseWindow.setParent wrap success",this,i),this.parentWindow=i,this.eventManager.trigger("parent-set",{parentName:this.parentWindow.name})),t(n,e)})))}clearParent(){c.default.system.debug("BaseWindow.clearParent"),this.parentWindow=null,this.eventManager.trigger("parent-unset",this.parentWindow)}setTitle(e){this.windowOptions&&(this.windowOptions.title=e),c.default.system.debug("Title change",e),u.default.publish(this.TITLE_CHANGED_CHANNEL,e)}close(e={},t){this.queryWindowService("close",e,t)}_animate(e,t){"function"==typeof e&&(t=e,e=null),t("Method not implemented for window",{shouldContinue:!0})}}t.BaseWindow=S,S.WINDOWSTATE=h.WINDOWSTATE,S.wrap=S.getInstance,S._windowReady=e=>new Promise((async t=>{c.default.system.debug(`windowServiceReady: ${e} waiting`);const n=u.default.subscribe(`Finsemble.Component.State.${e}`,((i,r)=>{const{state:o}=r.data;switch(c.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":c.default.system.debug(`windowServiceReady: ${e} ${o}`),u.default.unsubscribe(n),t();break;default:c.default.system.debug(`windowServiceReady default: ${e} ${o}`)}}))}))},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,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(r=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",r.ErrorOnLaunch="ErrorOnLaunch",r.AppTimeout="AppTimeout",r.ResolverUnavailable="ResolverUnavailable",(i=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",i.ResolverUnavailable="ResolverUnavailable",i.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`."),i=new Error("Timed out waiting for `fdc3Ready` event."),r=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(i)),e);window.addEventListener("fdc3Ready",(()=>{clearTimeout(o),window.fdc3?t():n(r)}),{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),i=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,i.length);e++){if(e===n.length||n[e]<i[e])return-1;if(e===i.length||n[e]>i[e])return 1}return 0}catch(e){return console.error("Failed to compare version strings",e),null}},t.versionIsAtLeast=(e,n)=>{let i=t.compareVersionNumbers(e.fdc3Version,n);return null===i?null:i>=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 i(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 r(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,i,r=""){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 r=e.length;for(let n=0;n<r;n++){const r=e[n];try{return o(t,r,i)}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,i))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,r){if(null===r||"object"!=typeof r||Array.isArray(r))return n("object",r);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0;s[n.key]=o(a,n.typ,i,n.key)})),Object.getOwnPropertyNames(r).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(r[n],t,i,n))})),s}(i(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,r)}(t,e)}function s(e,t){return o(e,t,i)}function a(e,t){return o(e,t,r)}function u(e){return{arrayItems:e}}function l(...e){return{unionMembers:e}}function c(e,t){return{props:e,additional:t}}function d(e){return{props:[],additional:e}}function f(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),f("Context"))}static contextToJson(e){return JSON.stringify(a(e,f("Context")),null,2)}static toContact(e){return s(JSON.parse(e),f("Contact"))}static contactToJson(e){return JSON.stringify(a(e,f("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),f("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,f("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),f("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,f("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),f("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,f("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),f("Country"))}static countryToJson(e){return JSON.stringify(a(e,f("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),f("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,f("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),f("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,f("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),f("Position"))}static positionToJson(e){return JSON.stringify(a(e,f("Position")),null,2)}};const p={Context:c([{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:c([{json:"contacts",js:"contacts",typ:u(f("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Contact:c([{json:"id",js:"id",typ:f("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),ContactID:c([{json:"email",js:"email",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")}],""),InstrumentList:c([{json:"instruments",js:"instruments",typ:u(f("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Instrument:c([{json:"id",js:"id",typ:f("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),InstrumentID:c([{json:"BBG",js:"BBG",typ:l(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:l(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"FIGI",js:"FIGI",typ:l(void 0,"")},{json:"ISIN",js:"ISIN",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")},{json:"RIC",js:"RIC",typ:l(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:l(void 0,"")},{json:"ticker",js:"ticker",typ:l(void 0,"")}],""),Country:c([{json:"id",js:"id",typ:f("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),CountryID:c([{json:"ISOALPHA2",js:"ISOALPHA2",typ:l(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:l(void 0,"")}],""),Organization:c([{json:"id",js:"id",typ:f("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:l(void 0,"")}],"any"),OrganizationID:c([{json:"FDS_ID",js:"FDS_ID",typ:l(void 0,"")},{json:"LEI",js:"LEI",typ:l(void 0,"")},{json:"PERMID",js:"PERMID",typ:l(void 0,"")}],""),Portfolio:c([{json:"positions",js:"positions",typ:u(f("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any"),Position:c([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:f("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:l(void 0,d(""))},{json:"name",js:"name",typ:l(void 0,"")}],"any")}},98832:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(88801),t),r(n(77661),t),r(n(80498),t),r(n(55972),t),r(n(74215),t),r(n(19600),t),r(n(89520),t),r(n(35644),t),r(n(66129),t),r(n(51854),t),r(n(55182),t),r(n(36611),t),r(n(91767),t),r(n(91966),t),r(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"}}')},87063:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}(i(57664)),t=v(i(80089)),n=i(96755),r=v(i(39319)),o=v(i(2807)),s=v(i(70010)),a=v(i(9562)),u=v(i(93802)),l=i(33998),c=v(i(73699)),d=i(75688),f=v(i(72551)),p=v(i(43190)),h=i(51742),m=v(i(5020)),w=v(i(32790)),g=v(i(44791)),y=v(i(15828));function v(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}p.default.initialize(),a.default.initialize(),s.default.initialize(),o.default.initialize(),f.default.start(),window.external={};class S extends n.BaseService{constructor(e){super({name:e,startupDependencies:{clients:["configClient"]},shutdownDependencies:{services:["windowService"]}}),this.assimilationWindowManager=null,this.port=8392,this.routerClient=r.default,this.readyFunction=null,this.appAssets=null,this.assimilationManifest=null,this.fullManifest=null,this.configCache={},this.uuidByName={},this.load=this.load.bind(this),this.getApplicationList=this.getApplicationList.bind(this),this.onBaseServiceReady((e=>{f.default.system.debug("assimilation.onBaseServiceReady"),h.System.getVersion((e=>{this.version=e})),r.default.addPubSubResponder(/.*humanInterface.*/,{}),this.load((()=>{this.Monitors=new u.default((()=>{e()}),Function.prototype,{System:h.System})})),m.default.waitForBootStage("earlyuser","stageEnter",this.getApplicationList)})),this.start()}convertHandle(e){let t=e.replace("native@0x","").toUpperCase();return t=`00000000${t}`,t=t.substr(t.length-8),t}createRouterEndpoints(){r.default.addResponder("Assimilation.setMonitorInfo",((e,t)=>{let n;if(this.ws)try{this.ws.setMonitorInfo(t.data)}catch(e){n={code:"assimilation_setMonitorInfo_failed",errorMessage:e.message}}else n={code:"assimilation_missing_socket_connection",errorMessage:"Assimilation socket connection does not exist, cannot set Monitor Info"};n?t.sendQueryResponse(n,null):t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.alwaysOnTop",((e,t)=>{this.assimilationWindowManager.alwaysOnTop(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.moveWindow",((e,t)=>{this.assimilationWindowManager.moveWindow(t.data,this.ws),t.sendQueryResponse(null,null)})),r.default.addListener("Assimilation.saveWindow",((e,t)=>{this.assimilationWindowManager.saveWindow(t)})),r.default.addResponder("Assimilation.showWindow",((e,t)=>{this.assimilationWindowManager.showWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.maximizeWindow",((e,t)=>{this.assimilationWindowManager.maximizeWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.restoreWindow",((e,t)=>{this.assimilationWindowManager.restoreWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.minimizeWindow",((e,t)=>{this.assimilationWindowManager.minimizeWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.hideWindow",((e,t)=>{this.assimilationWindowManager.hideWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.dockWindow",((e,t)=>{this.assimilationWindowManager.dockWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.undockWindow",((e,t)=>{this.assimilationWindowManager.undockWindow(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.bringToFront",((e,t)=>{this.assimilationWindowManager.bringToFront(t),t.sendQueryResponse(null,null)})),r.default.addResponder("Assimilation.closeWindow",((e,t)=>{this.assimilationWindowManager.closeWindow(t)})),r.default.addListener("Assimilation.hookWindowByHandle",((e,t)=>{this.assimilationWindowManager.updateSpawningWindowFromWindowObject(t)})),r.default.addResponder("Assimilation.getWindowLocation",((e,t)=>{if(!t.data.windowName)return t.sendQueryResponse(null,null);const n=this.assimilationWindowManager.getWindowByName(t.data.windowName);if(!n)return t.sendQueryResponse("no window found");if(n.outsideOfFinsemble||t.data.force){const e=`${Date.now()}_${Math.random()}`;r.default.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{t.sendQueryResponse(null,{location:n.data})})),this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:n.uuid,topic:"getBounds"}))}else t.sendQueryResponse(null,{location:n.location})})),r.default.addResponder("Assimilation.spawnNative",((e,t)=>{this.spawnAsset(this.constructNativeWindowParams(t),(()=>{t.sendQueryResponse(e,!0)}))})),r.default.addListener("Assimilation.windowClosed",((e,t)=>{console.log("Window closed!!!",t),f.default.system.debug("APPLICATION LIFECYCLE:Assmilation:windowClosed",t)})),r.default.addListener("Finsemble.Assimilation.register",((e,t)=>{const n=t.data,i=this.assimilationWindowManager.awaitingAssimilationSpawn;let o=!0;for(const e in i)if(i[e].name==n.windowName){if(o=!1,n.windowHandle){const t=this.convertHandle(n.windowHandle),i=this.assimilationWindowManager.updateSpawningWindow(e,t),r={left:i.descriptor.left,top:i.descriptor.top,right:i.descriptor.right,bottom:i.descriptor.bottom,width:i.descriptor.width,height:i.descriptor.height};this.assimilationWindowManager.handleSpawnComplete(i,r)}else{const t=this.assimilationWindowManager.updateSpawningWindow(e,null);this.assimilationWindowManager.handleSpawnComplete(t,null)}break}if(o){const e=`${Date.now()}_${Math.random()}`;n.windowHandle&&r.default.query("Finsemble.NewNativeWindow",{appUUID:e,name:n.windowName,windowType:"NativeWindow"},(async()=>{const{wrap:t}=await d.FinsembleWindow.getInstance({name:n.windowName}),i=this.convertHandle(n.windowHandle);t.uuid=i,t.outsideOfFinsemble=!0,this.assimilationWindowManager.activeWindows[i]=t,r.default.addListener(`${e}-Assimilation.boundsUpdate`,((e,n)=>{this.assimilationWindowManager.handleSpawnComplete(t,n.data)}));const{bounds:o}=n;o?this.assimilationWindowManager.handleSpawnComplete(t,o):this.assimilationWindowManager.sendSocketMessage(JSON.stringify({ref:e,uuid:t.uuid,topic:"getBounds"}))}))}}))}shouldHideTitleBar(e,n){return!!e||(0,t.default)(n,"customData.foreign.services.assimilationService.hideTitleBar",this.assimilationHelper.manifest.hideTitleBars)}constructNativeWindowParams(e){let n=e.data;const i=n.isWPF||(0,t.default)(n,"customData.window.argumentsAsQueryString");return n.hideTitleBar=this.shouldHideTitleBar(i,n),i&&(n={params:n,...this.getArgumentsWPF(e)},n.spawnDefaultViewer=!0),this.constructPath(n),n}getArgumentsWPF(e){const t={...e.data};t.generatedArguments=t.arguments||"",this.uuidByName[t.name]||(this.uuidByName[t.name]=`uuid${Date.now()}_${Math.round(1e4*Math.random())}`);const n=new Map([["finsembleWindowName",t.name],["componentType",t.customData.component.type],["uuid",this.uuidByName[t.name]],["left",t.defaultLeft],["top",t.defaultTop],["width",t.defaultWidth],["height",t.defaultHeight],["iac",!0],["serverAddress",this.serverAddress]]);return t.path&&t.customData.window.argumentsAsQueryString?n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments}&${n}=${e}`})):n.forEach(((e,n)=>{t.generatedArguments=`${t.generatedArguments} "${n}=${e}"`})),t.alias||t.path||(t.path=t.customData.window.path,t.alias=t.customData.window.alias),t.componentType=t.customData.component.type,this.configCache[t.name]=t,t}constructPath(e){if(void 0===e.path||e.customData&&e.customData.window&&!1===Boolean(e.customData.window.argumentsAsQueryString))return;const t=new URL(e.path),n=new URLSearchParams(e.generatedArguments),i=new URLSearchParams("");[...t.searchParams.entries(),...n.entries()].forEach((function(e){i.append(e[0],e[1])})),t.search=i.toString(),e.generatedPath=t.toString(),e.generatedArguments=""}launchAssimilationExe(){h.System.launchExternalProcess({alias:"assimilation",lifetime:"window",arguments:`PORT=${this.port}`,listener:e=>{"exited"===e.topic?(f.default.system.log("APPLICATION LIFECYCLE:Exited Assimilation Process",e),f.default.system.debug("APPLICATION LIFECYCLE:Exited Assimilation Process")):(f.default.system.log("APPLICATION LIFECYCLE:Running Assimilation Process",e),f.default.system.debug("APPLICATION LIFECYCLE:Running Assimilation Process"))}},(e=>{f.default.system.log("APPLICATION LIFECYCLE:Assimilation process successfully launched"),f.default.system.debug("APPLICATION LIFECYCLE:Assimilation process successfully launched",e.uuid),this.connectSockets()}),(e=>{f.default.system.error("Assimilation.launchAssimilationExe Error:",e),o.default.onReady((()=>{const e=new o.default.Notification,t=new o.default.Action;t.buttonText="Dismiss",t.type=o.default.ActionTypes.DISMISS,e.title="Critical Failure in Assimilation Service",e.details="Assimilation failed To launch. Native applications will not work.",e.actions=[t],o.default.notify(e)})),this.readyFunction()}))}getAllConfigs(t){const n=this;e.series([function(e){s.default.getValues(null,((t,i)=>{n.fullManifest=i;const r=i.finsemble.services.assimilationService.config,o=i.finsemble.servicesConfig.assimilation,s=i.finsemble.betaFeatures.assimilation;return s&&f.default.system.error("Assimilation is no longer a beta feature. Move assimilation under serviceConfigs."),n.assimilationManifest=Object.assign(r,o||s),n.appAssets=i.appAssets,n.assimilationHelper=new g.default({appAssets:i.appAssets,manifest:n.assimilationManifest}),n.assimilationWindowManager=new w.default(n.assimilationHelper),n.serverAddress=l.ConfigUtilInstance.getDefault(i,"fullManifest.finsemble.router.transportSettings.FinsembleTransport.serverAddress","ws://127.0.0.1:3376"),e(t)}))}],(e=>t(e)))}load(e){f.default.system.debug("APPLICATION LIFECYCLE:Assimilation:load");const n=this;this.getAllConfigs((()=>{if(!this.assimilationManifest.enabled)return f.default.system.log("APPLICATION LIFECYCLE:Assimilation Not Enabled"),e();if(-1==navigator.platform.indexOf("Win"))return f.default.system.warn("APPLICATION LIFECYCLE:Assimilation disabled due to incompatible platform",navigator.platform),e();f.default.system.debug("APPLICATION LIFECYCLE:Assimilation: Is Enabled");const i=(e,t)=>{const i=l.ConfigUtilInstance.getDefault(n.fullManifest,"manifest.finsemble.notificationURL",`${n.fullManifest.finsemble.moduleRoot}/components/system/notification/notification.html`);c.default.alert("dev","ONCE-SINCE-STARTUP",e,t,{url:i}),f.default.system.error("APPLICATION LIFECYCLE:Assimilation Error:",e,t)},r=this.assimilationHelper.findAssetByAlias("assimilation");return r?this.compareVersion("3.6.0",r.version)<0?(i("assimilationService-bad-version","This version of Finsemble requires assimilation version >= 3.6.0. Check your manifest."),e()):(this.assimilationWindowManager.setFloatingTitlebar((0,t.default)(n.fullManifest,"finsemble.Window Manager.floatingTitlebarComponent","floatingTitlebar")),this.createRouterEndpoints(),this.readyFunction=e,f.default.system.log("APPLICATION LIFECYCLE:Assimilation Enabled"),this.launchAssimilationExe()):i("assimilationService-not-found","Could not find assimilation asset. Ensure that appAssets is properly formatted in your application's manifest.")}))}onLoggerStateChanged(e){let t={topic:"onLogLevel"};["Error","Warn","Info","Log","Debug"].forEach((n=>{t[n.toLowerCase()]=e.system[n]})),this.ws.send(this.assimilationHelper.prepareAction(t))}onSocketConnected(){this.assimilationWindowManager.setWebsocket(this.ws),this.ws.setThrottle(this.assimilationManifest.throttle>=0?this.assimilationManifest.throttle:20),this.onLoggerStateChanged(f.default.setting()),this.readyFunction&&this.readyFunction()}connectSockets(){this.assimilationManifest.port&&(this.port=this.assimilationManifest.port),this.ws=new y.default(this.assimilationManifest,this.assimilationWindowManager),this.ws.connect(this.onSocketConnected.bind(this)),f.default.onStateChanged((e=>{this.onLoggerStateChanged(e)}))}compareVersion(e,t){if(!e)return 1;if(!t)return-1;const n=e.split("."),i=t.split(".");for(let e=0;e<Math.max(n.length,i.length);e++){if(e==n.length&&e==i.length)return 0;if(e>=i.length)return-1;if(e>=n.length)return 1;const t=parseInt(n[e]),r=parseInt(i[e]);if(t>r)return-1;if(r>t)return 1}return 0}spawnAsset(e,t){const n={name:e.name,uuid:e.uuid,componentType:e.componentType,windowType:"NativeWindow",waitForReady:!1};return d.FinsembleWindow.getInstance(n,((n,i)=>(e.minWidth=e.minWidth&&e.minWidth>100?e.minWidth:100,e.minHeight=e.minHeight&&e.minHeight>25?e.minHeight:25,e.maxWidth=e.maxWidth&&e.maxWidth>100?e.maxWidth:1/0,e.maxHeight=e.maxHeight&&e.maxHeight>25?e.maxHeight:1/0,e.maxWidth<e.defaultWidth&&(e.defaultWidth=e.maxWidth),e.minWidth>e.defaultWidth&&(e.defaultWidth=e.minWidth),e.maxHeight<e.defaultHeight&&(e.defaultHeight=e.maxHeight),e.minHeight>e.defaultHeight&&(e.defaultHeight=e.minHeight),i.descriptor=e,this.assimilationWindowManager.spawnWindow(i,this.ws),t())))}getApplicationList(){this.ws&&this.ws.getApplicationList()}}const C=new S("assimilationService");window.RouterClient=r.default,window.AssimilationService=C})()})();